function getWeatherByGeo(lat,lng){ params = new Object(); params.lat = lat; params.lng = lng; jQuery.post("/services/getWX.cfm", params, setupWX, "json"); } function getContentByZip(zip){ jQuery("#dataPortlet").html('Loading...'); params = new Object(); params.zip = zip; params.targetpage = 'profile'; params.useClubId = 7531; jQuery.post("/services/getPortlet.cfm", params, setupPortlet, "text"); jQuery.post("/services/getWX.cfm", params, setupWX, "json"); } function setContentByZip(zip){ jQuery("#wx").html('  Loading...'); jQuery.post("/components/userinfo.cfc?method=editUserZip&zip="+zip, '', getContentByZip, "json"); } function setupPortlet(obj){ jQuery("#dataPortlet").html(obj); tooltip('fixed'); } function setupWX(obj){ var wxObj = eval(obj); var d=new Date(); var weekday=new Array("Sun","Mon","Tue","Wed","Thu","Fri","Sat"); var locstring = ""; var loc = ""; var hh; var mm; var tt; var curtime; var htmlOut; hh = d.getHours(); mm = d.getMinutes(); tt = (hh >= 12)?"pm":"am"; hh = (hh > 12)?hh-12:hh; hh = (hh == 0)?12:hh; mm = (mm < 10)?"0"+mm:mm; curtime = hh + ':' + mm; if(wxObj.weather==undefined){ htmlOut = "" + "New" + "Set your location to customize eGolfCertificates.com" + "set"; document.getElementById("wx").innerHTML = htmlOut; }else{ locstring = new String(wxObj.weather.loc.dnam); loc = locstring.split("("); htmlOut = "" + "" + wxObj.weather.cc.tmp + "" + "°F" + "" + loc[0] + "" + weekday[d.getDay()] + " " + "" + wxObj.weather.dayf.day[0].hi + "/" + wxObj.weather.dayf.day[0].low + "" + weekday[d.getDay()+1] + " " + "" + wxObj.weather.dayf.day[1].hi + "/" + wxObj.weather.dayf.day[1].low + "" + "Get 7 Day Forecast" + "edit"; document.getElementById("wx").innerHTML = htmlOut; } }