function getWeatherZipcode() { var sCookieValue = polopoly.base64.stringDecode(polopoly.cookie.get("zipcoordinates")); if( (sCookieValue !== null) && (sCookieValue != "") ) { var HOME_ZIPCODE=0; var WEATHER_ZIPCODE=3; var saZip = sCookieValue.split(","); // 1) Get the Weather zipcode from the Cookie if( saZip.length > WEATHER_ZIPCODE ) { if( (saZip[WEATHER_ZIPCODE] !== null) && (saZip[WEATHER_ZIPCODE] !== "") && (saZip[WEATHER_ZIPCODE] != "null") ) { return saZip[WEATHER_ZIPCODE]; } } // 2) Get the Home Zip Code from the Cookie if the Weather zipcode is unavailablle if( (saZip[HOME_ZIPCODE] !== null) && (saZip[HOME_ZIPCODE] != "") ) { return saZip[HOME_ZIPCODE]; } } return "11751"; // Default Islip Zipcode } var gUserZip=getWeatherZipcode(); var gWeatherPath="/cmlink/imported.weather."+gUserZip+"?view=json_weather"; jQuery.getJSON(gWeatherPath, function(json) { jQuery.each(json.temps, function(i,temp){ jQuery('li#navWeather').html('' + temp.city + ', ' + temp.state + ' ' + temp.temp + '°' + '
' + temp.temp + '°
' + 'Hi ' + temp.todaysHigh + '° Lo ' + temp.todaysLow + '°
' + '' + temp.condition + '