// ext.js
// (c) June 9, 2007 wbf


isMinNS4=(document.layers)?1:0;isMinIE4=(document.all)?1:0;isMinIE5=(document.getElementById&&document.all)?1:0;isNS6=(document.getElementById&&!document.all)?1:0;var thisX=0;var thisY=0;var thistdX=0;var thistdY=0;var thisElement;var thistdElement;var newwindow='';var OAS_MJX_on;var isLocal=(window.location.hostname.indexOf("weather.com")>=0)?1:0;function getCookieVal(offset){if(!isLocal)return false;var endstr=document.cookie.indexOf(";",offset);if(endstr==-1)endstr=document.cookie.length;return unescape(document.cookie.substring(offset,endstr));}
function GetCookie(name){if(!isLocal)return false;var arg=name+"=";var alen=arg.length;var clen=document.cookie.length;var i=0;var j=0;while(i<clen){j=i+alen;if(document.cookie.substring(i,j)==arg)return getCookieVal(j);i=document.cookie.indexOf(" ",i)+1;if(i==0)break;}
return"";}
function fixBadUP(instring)
{instring=instring.replace(/\\\"/g,"");instring=instring.replace(/\"/g,"");instring=escape(instring);instring=instring.replace(/\%5E/g,"|");return instring;}
function unEscJava(string)
{var value=unescape(string);return value.replace(/\+/g," ");}
function getUserPreferences(itemno){var getUP=GetCookie("UserPreferences");if(getUP.length>4){if(0<getUP.indexOf("\""))
{getUP=fixBadUP(getUP);SetCookie("UserPreferences",getUP);}
var splitUP=getUP.split("|");if(splitUP[itemno]){var myVal=unEscJava(splitUP[itemno]);return myVal;}else{return"";}}else{return"";}}
function smartTrack(URL,TS){var referPath=escape(window.location.pathname);if(TS.length>=1){if(URL.indexOf('?')>1)URL=URL+'&from='+TS;else URL=URL+'?from='+TS;}
var thisUP=getUserPreferences(11);var thisLID=GetCookie('LocID');if(thisUP.length>=5)URL=URL.replace(/%uploc%/g,thisUP);else if(thisLID.length>=5)URL=URL.replace(/%uploc%/g,thisLID);else URL=URL.replace(/%uploc%/g,'');if(thisLID.length>=5)URL=URL.replace(/%locid%/g,thisLID);else URL=URL.replace(/%locid%/g,'');var finalURL=URL;var paramList="";if(finalURL.indexOf('?')>1){var finalOffset=finalURL.indexOf('?');paramList=finalURL.substring(finalOffset);finalURL=finalURL.substring(0,finalOffset);}
var parms=paramList.split('&');for(var i=0;i<parms.length;i++){var pos=parms[i].indexOf('#');if(pos>0){var key=parms[i].substring(pos);finalURL=finalURL+parms[i].substring(0,pos);}else{finalURL=finalURL+parms[i];}
if(i<parms.length-1){finalURL=finalURL+"&";}}
URL=finalURL.replace(/%ref%/g,finalURL);if(URL.indexOf('http')==-1){var HEADER_host=window.location.hostname;if(HEADER_host!='delta.weather.com'&&HEADER_host!='beta.weather.com'&&HEADER_host!='w3.weather.com')HEADER_host='www.weather.com';HEADER_host='http://'+HEADER_host;URL=HEADER_host+URL;}
if(key)URL=URL+"&ref="+referPath+key;else URL=URL+"&ref="+referPath;if(self.parent.frames.length!=0)self.parent.location=URL;else document.location=URL;return false;}
function splitLink(condition,trueLink,falseLink,TS){if(condition)
{return smartTrack(trueLink,TS);}
else
{return smartTrack(falseLink,TS);}}
function hugMe(typeOfUser){if(!isLocal)return;var WWW_host=window.location.hostname;if(WWW_host!='delta.weather.com'&&WWW_host!='w3.weather.com'&&WWW_host!='beta.weather.com')WWW_host='www.weather.com';WWW_host='http://'+WWW_host;hp_hugmeblock();var isHugged=false;var hasData=false;var hasAlert=false;if(hp_hugmedata&&hp_hugmedata[0]!='false'){isHugged=true;if(hp_hugmedata[1]!='false'){hasData=true;}
if(hp_hugmedata[2]!='false'){hasAlert=true;}}
if(isHugged){var locType='';if(hp_hugmedata[9]){locType=':'+hp_hugmedata[9];}
var locationURL=WWW_host+"/weather/local/"+hp_hugmedata[8]+locType+"?from=hugme&refer=hugme";var alertStr='<B>';var alertCloseStr='</B>';if(hp_hugmedata[2]!='false'){alertStr='<B STYLE="background-color:#9A0000;color:#FFFFFF;">';}
var fullLocationName=hp_hugmedata[7];var ind=fullLocationName.indexOf('(');if(ind>0){fullLocationName=fullLocationName.substring(0,ind-1);}
var locationName=fullLocationName;if(locationName.length>20){locationName=locationName.substring(0,17);locationName+="...";}
var hugltype=getUserPreferences("22");var hugVName=getUserPreferences("16");var myHugURL="";if(hugltype!="1"&&hugltype!="4"){myHugURL="http://www.weather.com/weather/hugme/"+getUserPreferences("23")+"?from=hat_hugchange&fromhsearch=true&selvid="+getUserPreferences("22")+"&hloc="+getUserPreferences("11")+"&hlocname="+getUserPreferences("10");}else{myHugURL="http://www.weather.com/weather/hugme/"+getUserPreferences("11")+"?from=hat_hugchange&fromhsearch=true&selname="+hugVName;}
if(typeOfUser=="notsignedin"){document.write('<DIV id="hbHTemp" class="hbText"><A HREF="'+locationURL+'" TITLE="'+fullLocationName+'">'+locationName+'</A> &nbsp;<A HREF="'+myHugURL+'">Edit</A>');document.write('&nbsp;<SPAN id="hbTempIDTwo" class="TempBackgroundNone">&nbsp;<A HREF="'+locationURL+'">'+alertStr+hp_hugmedata[3]+'&deg;'+alertCloseStr+hp_hugmedata[4]+'</A>&nbsp;</SPAN>');document.write('<div class="iconclass"><A HREF="'+locationURL+'"><IMG src="http://image.weather.com/web/common/wxicons/25/'+hp_hugmedata[6]+'.gif" width="20" height="20" border="0" align="middle"></A></div>');document.write('</DIV>');}else if(typeOfUser=="signedin"){document.write('<A HREF="'+locationURL+'" TITLE="'+fullLocationName+'">'+locationName+'</A> &nbsp;<A HREF="'+myHugURL+'">Edit</A>');document.write('&nbsp;<SPAN id="hbTempIDOne" class="TempBackgroundNone">&nbsp;<A HREF="'+locationURL+'">'+alertStr+hp_hugmedata[3]+'&deg;'+alertCloseStr+hp_hugmedata[4]+'</A>&nbsp;</SPAN>');document.write('<div class="icon32x32SignedIn"><A HREF="'+locationURL+'"><IMG src="http://image.weather.com/web/common/wxicons/25/'+hp_hugmedata[6]+'.gif" width="20" height="20" border="0" align="middle"></A></div>');}}else if(!isHugged&&typeOfUser!="signedin"){document.write('<div id=\"localOneClick\" class=\"hbText\"><A HREF=\"http://www.weather.com/weather/hugme?from=hugset&refer=hugset">Local weather in 1-click</a> | </div>');}}
function checkForm(){var WWW_host=window.location.hostname;if(WWW_host!='delta.weather.com'&&WWW_host!='w3.weather.com'&&WWW_host!='beta.weather.com')WWW_host='www.weather.com';WWW_host='http://'+WWW_host;document.whatwhere.action=WWW_host+"/search/enhanced";if(document.whatwhere.where.value=="Enter city or US zip"){return false;}else if(document.whatwhere.whatprefs.selectedIndex>0){var thisVal=document.whatwhere.whatprefs.options[document.whatwhere.whatprefs.selectedIndex].value;document.whatwhere.what.value=thisVal;var retVal=changeCommandToVal(thisVal);setUserPreferences('16',retVal);document.whatwhere.from.value="whatwhere_drop";}else if(getUserPreferences('16')&&getUserPreferences('16').length>1){var thisVal=getUserPreferences('16');var retVal=changeValToCommand(thisVal);document.whatwhere.what.value=retVal;}else{document.whatwhere.what.value='WeatherLocalUndeclared';}
whatWhereValue=stringFilterChecker(document.whatwhere.where.value);whatWhereValue=recognizeZipCode(whatWhereValue);document.whatwhere.where.value=whatWhereValue;document.whatwhere.lswa.value=document.whatwhere.what.value;document.whatwhere.lswe.value=document.whatwhere.where.value;if(document.whatwhere.where.value.length==5&&document.whatwhere.where.value>0&&document.whatwhere.where.value<100000){var lp="/weather/local/";var wh=document.whatwhere.what.value;if(document.whatwhere.from.value=='whatwhere'||document.whatwhere.from.value=='whatwhere_drop'){updateRecentSearch(document.whatwhere.where.value);}
if(wh=='Weather36HourAchesAndPainsCommand')lp="/outlook/health/achesandpains/local/";else if(wh=='Weather36HourAllergiesCommand')lp="/outlook/health/allergies/local/";else if(wh=='Weather36HourAirQualityCommand')lp="/outlook/health/airquality/local/";else if(wh=='Weather36HourSunSafetyCommand')lp="/outlook/health/skin/local/";else if(wh=='Weather36HourColdAndFluCommand')lp="/outlook/health/coldandflu/local/";else if(wh=='Weather36HourHomeCommand')lp="/outlook/homeandgarden/home/local/";else if(wh=='Weather36HourGardenCommand')lp="/outlook/homeandgarden/garden/local/";else if(wh=='Weather36HourSchooldayCommand')lp="/outlook/homeandgarden/schoolday/local/";else if(wh=='Weather36HourSportsCommand')lp="/outlook/events/sports/local/";else if(wh=='Weather36HourWeddingCommand')lp="/outlook/events/weddings/local/";else if(wh=='Weather36HourInterstateCommand')lp="/outlook/driving/interstate/local/";else if(wh=='Weather36HourBoatAndBeachCommand')lp="/outlook/recreation/boatandbeach/local/";else if(wh=='Weather36HourGolfCommand')lp="/outlook/recreation/golf/local/";else if(wh=='Weather36HourSkiCommand')lp="/outlook/recreation/ski/local/";else if(wh=='Weather36HourBusinessTravelerCommand')lp="/outlook/travel/businesstraveler/local/";else if(wh=='Weather36HourVacationPlannerCommand')lp="/outlook/travel/vacationplanner/local/";else if(wh=='Weather36HourOutdoorsCommand')lp="/outlook/recreation/outdoors/local/";else if(wh=='Weather36HourFitnessCommand')lp="/outlook/health/fitness/local/";else if(wh=='Weather36HourHealthCommand')lp="/outlook/health/general/local/";else if(wh=='Weather36HourPetsCommand')lp="/outlook/homeandgarden/pets/local/";document.location=WWW_host+lp+document.whatwhere.where.value+"?lswe="+document.whatwhere.lswe.value+"&lwsa="+document.whatwhere.lswa.value+"&from="+document.whatwhere.from.value;return false;}else{return true;}}
function recognizeZipCode(search){filteredNumbers="1234567890";var i;var returnString="";for(i=0;i<search.length;i++){var c=search.charAt(i);for(j=0;j<filteredNumbers.length;j++){if(c==filteredNumbers.charAt(j))returnString+=c;}}
if(returnString.length!=5){returnString=search;}
return returnString;}
function updateRecentSearch(where){getRecentSearch=getUserPreferences('27');if(getRecentSearch==''){setUserPreferences('27',where+':*:*');}else{alreadyExist=false;var splitUpSearches=getRecentSearch.split("^");for(var i=0;i<splitUpSearches.length;i++){var splitEachSearch=splitUpSearches[i].split(":");if(splitEachSearch[0]==where){alreadyExist=true;}}
if(!alreadyExist){if(splitUpSearches.length==6){tempRecentSearch=getRecentSearch.split("^").splice(0,5);var buff="";for(var j=0;j<tempRecentSearch.length;j++){if(j==0){buff+=tempRecentSearch[j];}else{buff+="^"+tempRecentSearch[j];}}
setUserPreferences('27',where+':*:*^'+buff);}else{setUserPreferences('27',where+':*:*^'+getRecentSearch);}}}}
function buildLocator(URL,locator,preText,postText){if(postText==null||postText==undefined)
{postText="";if(preText==null||preText==undefined)
{preText="for";if(locator==null)
{locator="locator";if(URL==null)
{return false;}}}}
if(getUserPreferences("11")&&getUserPreferences("11").length>1){thisUPLocID=getUserPreferences("11");thisUPPresName=thisUPLocID;thisUPLocType=getUserPreferences(22);if(thisUPLocType!="1"&&thisUPLocType!="4")
{thisUPLocID=getUserPreferences(23);thisUPPresName=getUserPreferences(24);}
else
{if(getUserPreferences("10")){thisUPPresName=getUserPreferences("10");}}
document.write(preText+" <A HREF=\"#\" onClick=\"return smartTrack('"+URL+thisUPLocID+"','"+locator+"')\" >"+thisUPPresName+"</a> "+postText+" <B>or</B><br><br>\n");}}
function doIntercept(mapUrl,mapHandle,mapParams){if(!getUserPreferences("3")||getUserPreferences("3")==" "||getUserPreferences("3")=="null"||!getUserPreferences("4")||getUserPreferences("4")==" "||getUserPreferences("4")=="null"){mapWindowOpen(mapUrl,mapHandle,mapParams);}else{var vertLocation=mapUrl.split("?");var newLocation=vertLocation[1].split("&");var newLoc=unEscJava(newLocation[0]);if(newLocation[1])smartTrack((newLoc+"?"+newLocation[1]),'%ref%');else smartTrack(newLoc,'%ref%');}
return false;}
function getChannelPrefs(itemno){var getUP=GetCookie("ChannelPrefs");if(getUP.length>2){var splitUP=getUP.split("|");if(splitUP[itemno]){var myVal=unEscJava(splitUP[itemno]);return myVal;}else{return"";}}else{return"";}}
function setUserPreferences(itemno,itemval){if(!isLocal)return false;var expdate=new Date();FixCookieDate(expdate);expdate.setTime(expdate.getTime()+(24*60*60*1000*365));var getUP=GetCookie("UserPreferences");var splitUP=getUP.split("|");if(!splitUP[1]||(splitUP[1].length<1))splitUP[1]=" ";if(!splitUP[0]||splitUP[0]!=3)
{var defaultUP=new Array("3"," ","0","real","fast","-1","-1","-1","-1","-1"," "," "," "," "," ","-1","Undeclared"," "," "," "," "," "," "," "," "," ","");for(var i=0;i<defaultUP.length;i++)
{if(!splitUP[i]||(splitUP[i].length<1))splitUP[i]=defaultUP[i];}
splitUP[0]=defaultUP[0];}
var myVal=escape(itemval);splitUP[itemno]=myVal;var vertCookie=splitUP.join("|");SetCookie("UserPreferences",vertCookie,expdate,"/",".weather.com");return true;}
function fixUserPreferences(){if(!isLocal)return false;var expdate=new Date();FixCookieDate(expdate);expdate.setTime(expdate.getTime()+(24*60*60*1000*365));var getUP=GetCookie("UserPreferences");var splitUP=getUP.split("|");if(!splitUP[1])splitUP[1]=" ";else if(splitUP[1].length<1)splitUP[1]=" ";if(splitUP[16])splitUP.splice(16,1);var vertCookie=splitUP.join("|");SetCookie("UserPreferences",vertCookie,expdate,"/",".weather.com");return true;}
function setChannelPrefs(itemno,itemval,itempath){if(!isLocal)return false;var expdate=new Date();FixCookieDate(expdate);expdate.setTime(expdate.getTime()+(24*60*60*1000*365));var getUP=GetCookie("ChannelPrefs");var splitUP=getUP.split("|");for(var i=0;i<=8;i++){if(!splitUP[i]||(splitUP[i].length<1))splitUP[i]=-1;}
splitUP[itemno]=itemval;var vertCookie=splitUP.join("|");SetCookie("ChannelPrefs",vertCookie,expdate,itempath,".weather.com");return true;}
function updateCookieExpDate(cookieName){var expdate=new Date();FixCookieDate(expdate);expdate.setTime(expdate.getTime()+(24*60*60*1000*365));var tempCookie=GetCookie(cookieName);if(tempCookie.length>0){SetExpDate(cookieName,tempCookie,expdate,"/",".weather.com");}
return true;}
function updateCookieUnescape(cookieName){var expdate=new Date();FixCookieDate(expdate);expdate.setTime(expdate.getTime()+(24*60*60*1000*365));var tempCookie=GetCookie(cookieName);if(tempCookie.length>0){SetCookieUnescapeValue(cookieName,tempCookie,expdate,"/",".weather.com");}
return true;}
function DeleteCookie(name,path,domain){if(!isLocal)return false;if(GetCookie(name))document.cookie=name+"="+((path)?"; path="+path:"")+((domain)?"; domain="+domain:"")+"; expires=Thu, 01-Jan-1970 00:00:01 GMT";}
function FixCookieDate(date){var base=new Date(0);var skew=base.getTime();if(skew>0)date.setTime(date.getTime()-skew);}
function SetCookie(name,value,expires,path,domain,secure){if(!isLocal)return false;document.cookie=name+"="+escape(value)+((expires)?"; expires="+expires.toGMTString():"")+((path)?"; path="+path:"")+((domain)?"; domain="+domain:"")+((secure)?"; secure":"");}
function SetCookieUnescapeValue(name,value,expires,path,domain,secure){if(!isLocal)return false;document.cookie=name+"="+unescape(value)+((expires)?"; expires="+expires.toGMTString():"")+((path)?"; path="+path:"")+((domain)?"; domain="+domain:"")+((secure)?"; secure":"");}
function goWhatWhere(thisWhat){if(document.whatwhere.where.value==""){return true;}else{document.whatwhere.what.value=thisWhat;document.whatwhere.submit();return false;}}
function mapSwap(url){if(url!=""){if(url=="special"){location.href="/maps/";}else{if(isMinIE4)document.all.mapI.src=url;if(isMinNS4)thisElement.src=url;if(isNS6)document.getElementById("mapI").src=url;}}
return false;}
function tdSwap(url){if(url!=""){if(isMinIE4)document.all.tdI.src=url;if(isMinNS4)thistdElement.src=url;if(isNS6)document.getElementById("tdI").src=url;}
return false;}
function mapWindowOpen(mapUrl,mapHandle,mapParams){var thisGuy=window.open(mapUrl,mapHandle,mapParams);if(isMinIE5||isNS6)thisGuy.focus();return false;}
function imgReplace(imgName,newImgSrc){if(document.images)document.images[imgName].src=newImgSrc;}
function goLocation(loc,trgt){if(loc!=null){if((loc.length>0)&&(loc.toLowerCase()!='default'))window.open(loc,trgt);}}
function makeObjectNS4(){var ItemElement=new Layer(306);ItemElement.name="mapN";ItemElement.src=mapNURL;ItemElement.visibility="show";ItemElement.pageY=thisY;ItemElement.pageX=thisX;ItemElement.zIndex="300";return ItemElement;}
function maketdObjectNS4(){var ItemtdElement=new Layer(306);ItemtdElement.name="tdN";ItemtdElement.src=tdNURL;ItemtdElement.visibility="show";ItemtdElement.pageY=thistdY;ItemtdElement.pageX=thistdX;ItemtdElement.zIndex="300";return ItemtdElement;}
function loadTenday(){thistdX=document.tdholdspace.x;thistdY=document.tdholdspace.y;thistdElement=maketdObjectNS4();}
function changeCommandToVal(whatVal){if(whatVal=='Weather36HourAchesAndPainsCommand')return'AchesAndPains';else if(whatVal=='Weather36HourAllergiesCommand')return'Allergies';else if(whatVal=='Weather36HourAirQualityCommand')return'AirQuality';else if(whatVal=='Weather36HourSunSafetyCommand')return'SunSafety';else if(whatVal=='Weather36HourColdAndFluCommand')return'ColdAndFlu';else if(whatVal=='Weather36HourHomeCommand')return'HomePlanner';else if(whatVal=='Weather36HourGardenCommand')return'Lawn';else if(whatVal=='Weather36HourSchooldayCommand')return'Schoolday';else if(whatVal=='Weather36HourSportsCommand')return'SportingEvents';else if(whatVal=='Weather36HourWeddingCommand')return'Weddings';else if(whatVal=='Weather36HourInterstateCommand')return'Interstate';else if(whatVal=='Weather36HourBoatAndBeachCommand')return'BoatAndBeach';else if(whatVal=='Weather36HourGolfCommand')return'Golf';else if(whatVal=='Weather36HourSkiCommand')return'Ski';else if(whatVal=='Weather36HourBusinessTravelerCommand')return'BusinessTravel';else if(whatVal=='Weather36HourVacationPlannerCommand')return'VacationPlanner';else if(whatVal=='Weather36HourOutdoorsCommand')return'Outdoors';else if(whatVal=='Weather36HourFitnessCommand')return'Fitness';else if(whatVal=='Weather36HourHealthCommand')return'Health';else if(whatVal=='Weather36HourPetsCommand')return'Pets';else if(whatVal=='WeatherLocalHealth')return'Health';else if(whatVal=='WeatherLocalTravel')return'BusinessTravel';else if(whatVal=='WeatherLocalRecreation')return'Golf';else if(whatVal=='WeatherLocalHomeAndGarden')return'Lawn';else if(whatVal=='WeatherLocalDriving')return'Interstate';else return' ';}
function changeValToCommand(whatVal){if(whatVal=='AchesAndPains')return'Weather36HourAchesAndPainsCommand';else if(whatVal=='Allergies')return'Weather36HourAllergiesCommand';else if(whatVal=='AirQuality')return'Weather36HourAirQualityCommand';else if(whatVal=='SunSafety')return'Weather36HourSunSafetyCommand';else if(whatVal=='ColdAndFlu')return'Weather36HourColdAndFluCommand';else if(whatVal=='HomePlanner')return'Weather36HourHomeCommand';else if(whatVal=='Lawn')return'Weather36HourGardenCommand';else if(whatVal=='Schoolday')return'Weather36HourSchoolDayCommand';else if(whatVal=='SportingEvents')return'Weather36HourSportsCommand';else if(whatVal=='Weddings')return'Weather36HourWeddingCommand';else if(whatVal=='Interstate')return'Weather36HourInterstateCommand';else if(whatVal=='BoatAndBeach')return'Weather36HourBoatAndBeachCommand';else if(whatVal=='Golf')return'Weather36HourGolfCommand';else if(whatVal=='Ski')return'Weather36HourSkiCommand';else if(whatVal=='BusinessTravel')return'Weather36HourBusinessTravelerCommand';else if(whatVal=='VacationPlanner')return'Weather36HourVacationPlannerCommand';else if(whatVal=='Outdoors')return'Weather36HourOutdoorsCommand';else if(whatVal=='NationalParks')return'Weather36HourOutdoorsCommand';else if(whatVal=='Fitness')return'Weather36HourFitnessCommand';else if(whatVal=='Pets')return'Weather36HourPetsCommand';else if(whatVal=='Health')return'Weather36HourHealthCommand';else if(whatVal=='Travel')return'Weather36HourBusinessTravelerCommand';else if(whatVal=='Recreation')return'Weather36HourGolfCommand';else if(whatVal=='HomeAndGarden')return'Weather36HourGardenCommand';else if(whatVal=='Driving')return'Weather36HourInterstateCommand';else return'WeatherLocalUndeclared';}
function newWindowFocus(url,wid,hei){mapWindowOpen(url,'nwin',"resizable=yes,toolbar=yes,status=yes,scrollbars=yes,location=yes,menubar=yes,directories=yes,width="+wid+",height="+hei);}
function addEvent(objObject,strEventName,fnHandler){if(objObject.addEventListener)
objObject.addEventListener(strEventName,fnHandler,false);else if(objObject.attachEvent)
objObject.attachEvent("on"+strEventName,fnHandler);}
function customHugMe(){if(!isLocal)return;var WWW_host=window.location.hostname;var gotMyPrefs=GetCookie("MyPrefs");if(WWW_host!='delta.weather.com'&&WWW_host!='w3.weather.com'&&WWW_host!='beta.weather.com')WWW_host='www.weather.com';WWW_host='http://'+WWW_host;var thisDay=new Date();if(getUserPreferences("11")&&getUserPreferences("11").length>1){thisUPLocID=getUserPreferences("11");if(getUserPreferences("10")&&getUserPreferences("10").length>1){thisUPPresName=getUserPreferences("10");}else{thisUPPresName=thisUPLocID;}
var thisUPURL="/weather/local/";var promoText="Local Forecast for ";if(getUserPreferences("16")&&getUserPreferences("16").length>1){var gup=getUserPreferences("16");if(gup=='Allergies'){thisUPURL="/outlook/health/allergies/local/";}else if(gup=='AchesAndPains'){thisUPURL="/outlook/health/achesandpains/local/";}else if(gup=='AirQuality'){thisUPURL="/outlook/health/airquality/local/";}else if(gup=='SunSafety'){thisUPURL="/outlook/health/skin/local/";}else if(gup=='ColdAndFlu'){thisUPURL="/outlook/health/coldandflu/local/";}else if(gup=='Golf'){thisUPURL="/outlook/recreation/golf/local/";}else if(gup=='Ski'){thisUPURL="/outlook/recreation/ski/local/";}else if(gup=='BoatAndBeach'){thisUPURL="/outlook/recreation/boatandbeach/local/";}else if(gup=='Outdoors'){thisUPURL="/outlook/recreation/outdoors/local/";}else if(gup=='NationalParks'){thisUPURL="/outlook/recreation/outdoors/local/";}else if(gup=='BusinessTravel'){thisUPURL="/outlook/travel/businesstraveler/local/";}else if(gup=='VacationPlanner'){thisUPURL="/outlook/travel/vacationplanner/local/";}else if(gup=='HomePlanner'){thisUPURL="/outlook/homeandgarden/home/local/";}else if(gup=='Lawn'){thisUPURL="/outlook/homeandgarden/garden/local/";}else if(gup=='Schoolday'){thisUPURL="/outlook/homeandgarden/schoolday/local/";}else if(gup=='SportingEvents'){thisUPURL="/outlook/events/sports/local/";}else if(gup=='Weddings'){thisUPURL="/outlook/events/weddings/local/";}else if(gup=='Interstate'){thisUPURL="/outlook/driving/interstate/local/";}else if(gup=='Fitness'){thisUPURL="/outlook/health/fitness/local/";}else if(gup=='Pets'){thisUPURL="/outlook/homeandgarden/pets/local/";}else if(gup=='Travel'){thisUPURL="/outlook/travel/businesstraveler/local/";setUserPreferences('16','BusinessTravel');}else if(gup=='Health'){thisUPURL="/outlook/health/general/local/";setUserPreferences('16','Health');}else if(gup=='Recreation'){thisUPURL="/outlook/recreation/golf/local/";setUserPreferences('16','Golf');}else if(gup=='HomeAndGarden'){thisUPURL="/outlook/homeandgarden/garden/local/";setUserPreferences('16','Lawn');}else if(gup=='Driving'){thisUPURL="/outlook/driving/interstate/local/";setUserPreferences('16','Interstate');}}
document.write("<FONT CLASS=\"captionText\"><A HREF=\""+WWW_host+thisUPURL+thisUPLocID+"?from=zipcode"+"\" CLASS=\"whiteVerdanaLink11\">"+promoText+"<BR>"+thisUPPresName+"</A></FONT>");}else if(gotMyPrefs.length>1){var myPageURL="/weather/my/";var promoText="View My Page";document.write("<A HREF=\""+WWW_host+myPageURL+"?from=zipcode"+"\" CLASS=\"whiteVerdanaLink11\">"+promoText+"</A></FONT>");}else{document.write("<A HREF=\""+WWW_host+"/weather/my/signup?from=zipcode\" CLASS=\"whiteVerdanaLink11\">Customize weather.com</A>");}}
function hatInfo(){if(!isLocal)return;var WWW_host=window.location.hostname;var PROFILE_URL="https://registration.weather.com/registration/myprofile/step1?from=hat_name&refer=hat_name";var getTicketWeb=GetCookie("Ticket_web");var gotMyPrefs=GetCookie("MyPrefs");if(WWW_host!='delta.weather.com'&&WWW_host!='w3.weather.com'&&WWW_host!='beta.weather.com')WWW_host='www.weather.com';WWW_host='http://'+WWW_host;var thisDay=new Date();var greetString="";if(getUserPreferences("12")){thisUPName=getUserPreferences("12");if(thisUPName.indexOf("@")!=-1&&thisUPName.indexOf(".")!=-1){thisUPName="";}else{if(thisUPName.length>8){thisUPName=thisUPName.substr(0,5)+"...";}}}else{thisUPName="";}
greetString="Welcome";if(thisUPName!=""&&gotUrs==1||thisUPName!=""&&gotTicketWeb.length>1){document.write(greetString+", <A HREF="+PROFILE_URL+">"+thisUPName+"</A>.");}else{document.write(greetString+".");}}
function searchTermType(){var locIdCheck=/^[A-Z]{4}\d{4}$/g;var zipCodeCheck=/^\d+$/g;var searchTermObject=window.location.pathname.split("/");var searchTermLocID=searchTermObject[searchTermObject.length-1];if(searchTermLocID.indexOf(":")!=-1){var searchTermLocType=searchTermLocID.split(":");if(searchTermLocType[searchTermLocType.length-1]=='5')return'golf';else if(searchTermLocType[searchTermLocType.length-1]=='9')return'airport';else if(searchTermLocType[searchTermLocType.length-1]=='11')return'ski';else if(searchTermLocType[searchTermLocType.length-1]=='16')return'street';else if(searchTermLocType[searchTermLocType.length-1]=='17')return'school';else if(searchTermLocType[searchTermLocType.length-1]=='19')return'park';else if(searchTermLocType[searchTermLocType.length-1]=='20')return'venue';}else if(searchTermLocID.match(locIdCheck)){return'city';}else if(searchTermLocID.match(zipCodeCheck)){return'zip';}else{return'';}}
function openvideoplayer(parms,player,dim,lid){var thisGuy;var isPop_up=true;if(isPop_up){thisGuy=window.open("/multimedia/videoplayer.html?"+parms,player,dim,lid);if(isMinIE5||isNS6)thisGuy.focus();}else{window.location.href="/multimedia/videoplayer.html?"+parms;}
return false;}
function openVideoPlayer(parms){var thisGuy;var isPop_up=true;if(isPop_up){thisGuy=window.open("/multimedia/videoplayer.html?"+parms,'player','width=1000,height=677,nostatus','lid2');if(isMinIE5||isNS6)thisGuy.focus();}else{if(self.parent.frames.length!=0)self.parent.location="/multimedia/videoplayer.html?"+parms;else window.location="/multimedia/videoplayer.html?"+parms;}
return false;}
setUserPreferences('0','3');var hmp=getUserPreferences('26');hmp=hmp.replace(/\&quot\;/g,'');hmp=hmp.replace(/\"/g,'');hmp=hmp.replace(/\\/g,'');setUserPreferences('26',hmp);if(getUserPreferences("26").length<1){if(window.location.pathname.indexOf("health/achesandpains")!=-1){setUserPreferences("16","AchesAndPains");}
if(window.location.pathname.indexOf("health/airquality")!=-1){setUserPreferences("16","AirQuality");}
if(window.location.pathname.indexOf("health/allergies")!=-1){setUserPreferences("16","Allergies");}
if(window.location.pathname.indexOf("recreation/boatandbeach")!=-1){setUserPreferences("16","BoatAndBeach");}
if(window.location.pathname.indexOf("travel/businesstraveler")!=-1){setUserPreferences("16","BusinessTravel");}
if(window.location.pathname.indexOf("health/coldandflu")!=-1){setUserPreferences("16","ColdAndFlu");}
if(window.location.pathname.indexOf("driving/interstate")!=-1){setUserPreferences("16","Driving");}
if(window.location.pathname.indexOf("health/fitness")!=-1){setUserPreferences("16","Fitness");}
if(window.location.pathname.indexOf("recreation/golf")!=-1){setUserPreferences("16","Golf");}
if(window.location.pathname.indexOf("health/general")!=-1){setUserPreferences("16","Health");}
if(window.location.pathname.indexOf("homeandgarden/home")!=-1){setUserPreferences("16","HomePlanner");}
if(window.location.pathname.indexOf("homeandgarden/garden")!=-1){setUserPreferences("16","Lawn");}
if(window.location.pathname.indexOf("recreation/outdoors")!=-1){setUserPreferences("16","Outdoors");}
if(window.location.pathname.indexOf("homeandgarden/pets")!=-1){setUserPreferences("16","Pets");}
if(window.location.pathname.indexOf("homeandgarden/schoolday")!=-1){setUserPreferences("16","Schoolday");}
if(window.location.pathname.indexOf("recreation/ski")!=-1){setUserPreferences("16","Ski");}
if(window.location.pathname.indexOf("events/sports")!=-1){setUserPreferences("16","SportingEvents");}
if(window.location.pathname.indexOf("health/skin")!=-1){setUserPreferences("16","SunSafety");}
if(window.location.pathname.indexOf("travel/vacationplanner")!=-1){setUserPreferences("16","VacationPlanner");}
if(window.location.pathname.indexOf("events/weddings")!=-1){setUserPreferences("16","Weddings");}}
function stringFilterChecker(s){filteredValues="*|/\":<>[]{}`\;()@&$#%";var i;var returnString="";for(i=0;i<s.length;i++){var c=s.charAt(i);if(filteredValues.indexOf(c)==-1)returnString+=c;}
while(returnString.substring(0,1)==' ')
returnString=returnString.substring(1,returnString.length);while(returnString.substring(returnString.length-1,returnString.length)==' ')
returnString=returnString.substring(0,returnString.length-1);return returnString;}
function analyticus(domainValue,productId){var protocol="http://";var domain=(domainValue==null||domainValue=="")?"":domainValue;var productID=(productId==null||productId=="")?"":"/"+productId;var actionID="";var cacheBuster="?cb="+new Date().getTime();var baseURLQryString=(window.location.search.length>0)?"&"+window.location.search.substring(1):"";function writeToServer(argActionID){if(productID==""||domain=="")return;actionID=(argActionID==null||argActionID=="")?"":"/"+argActionID;document.write('<img src="'+protocol+domain+productID+actionID+cacheBuster+baseURLQryString+'" width="1" height="1" />');}
this.logAction=function(actionID){writeToServer(actionID);};}

// divtools.js
// (c) June 9, 2007 wbf


var timerRunning=false;function findPosX(obj){var curleft=0;if(isNS6||isMinIE4){if(obj.offsetParent){while(obj.offsetParent){curleft+=obj.offsetLeft
obj=obj.offsetParent;}}}else if(isMinNS4)curleft+=obj.x;return curleft;}
function findPosY(obj){var curtop=0;if(isNS6||isMinIE4){if(obj.offsetParent){while(obj.offsetParent){curtop+=obj.offsetTop
obj=obj.offsetParent;}}}else if(isMinNS4)curtop+=obj.y;return curtop;}
function showImgX(imgName){if(isMinNS4){return document.images[imgName].x;}else if(isMinIE4){return findPosX(document.all[imgName]);}else if(isNS6){return findPosX(document.getElementById(imgName));}}
function showImgY(imgName){if(isMinNS4){return document.images[imgName].y;}else if(isMinIE4){return findPosY(document.all[imgName]);}else if(isNS6){return findPosY(document.getElementById(imgName));}}
function showDivX(divName){if(isMinNS4){return document.layers[divName].pageX;}else if(isMinIE4){return document.all[divName].style.left.replace(/px/,'');}else if(isNS6){return parseInt(document.getElementById(divName).style.left);}}
function showDivY(divName){if(isMinNS4){return document.layers[divName].clip.width;}else if(isMinIE4){return document.all[divName].style.top.replace(/px/,'');}else if(isNS6){return parseInt(document.getElementById(divName).style.top);}}
function moveDiv(divName,anchorName,osX,osY){if(isMinNS4){xposition=(anchorName!='null')?document.images[anchorName].x:0;yposition=(anchorName!='null')?document.images[anchorName].y:0;xPoint=(osX)?xposition+osX:xposition;yPoint=(osY)?yposition+osY:yposition;document.layers[divName].pageX=xPoint+'px';document.layers[divName].pageY=yPoint+'px';document.layers[divName].visibility="show";}else if(isMinIE4){var over=document.all[divName];xposition=(anchorName!='null')?findPosX(document.all[anchorName]):0;yposition=(anchorName!='null')?findPosY(document.all[anchorName]):0;xPoint=(osX)?xposition+osX:xposition;yPoint=(osY)?yposition+osY:yposition;over.style.left=xPoint+'px';over.style.top=yPoint+'px';over.style.visibility="visible";}else if(isNS6){var over=document.getElementById(divName);xposition=(anchorName!='null')?findPosX(document.getElementById(anchorName)):0;yposition=(anchorName!='null')?findPosY(document.getElementById(anchorName)):0;xPoint=(osX)?xposition+osX:xposition;yPoint=(osY)?yposition+osY:yposition;over.style.left=xPoint+'px';over.style.top=yPoint+'px';over.style.visibility="visible";}}
function writeDiv(divName,divContent){if(isMinNS4){document.layers[divName].document.write(divContent);document.layers[divName].document.close();}else if(isMinIE4){document.all[divName].innerHTML=divContent;}else if(isNS6){document.getElementById(divName).innerHTML=divContent;}}
function clipDiv(divName,clipTop,clipRight,clipBottom,clipLeft){if(isMinNS4){document.layers[divName].clip.left=clipLeft;document.layers[divName].clip.right=clipRight;document.layers[divName].clip.top=clipTop;document.layers[divName].clip.bottom=clipBottom;}else if(isMinIE4){document.all[divName].style.clip="rect("+clipTop+"px "+clipRight+"px "+clipBottom+"px "+clipLeft+"px)";}else if(isNS6){document.getElementById(divName).style.clip="rect("+clipTop+"px "+clipRight+"px "+clipBottom+"px "+clipLeft+"px)";}}
function hideDiv(divName){if(isMinNS4){document.layers[divName].visibility="hide";}else if(isMinIE4){document.all[divName].style.visibility="hidden";}else if(isNS6){document.getElementById(divName).style.visibility="hidden";}}
function showDiv(divName){if(isMinNS4){document.layers[divName].visibility="show";}else if(isMinIE4){document.all[divName].style.visibility="visible";}else if(isNS6){document.getElementById(divName).style.visibility="visible";}}
function stopSlide(){if(timerRunning)clearInterval(timerID);timerRunning=false;}
function startSlide(slideDiv,slideX,slideY,slideUnits,slideInt){stopSlide();timerRunning=true;xDone=false;yDone=false;var thisX=(slideX=='null')?showDivX(slideDiv):slideX;var thisY=(slideY=='null')?showDivY(slideDiv):slideY;slideFunc="slideDiv('"+slideDiv+"',"+thisX+","+thisY+","+slideUnits+")";timerID=setInterval(slideFunc,slideInt);}
function readDiv(divName){if(isMinIE4&&document.all[divName])return document.all[divName].innerHTML;else if(isNS6&&document.getElementById(divName))return document.getElementById(divName).innerHTML;else return'';}
function slideDiv(slideDivName,destX,destY,moveUnits){var yDone=false;var xDone=false;var divX=parseInt(showDivX(slideDivName));var divY=parseInt(showDivY(slideDivName));if(divX==destX||((divX<destX)&&(divX+moveUnits>=destX))||((divX>destX)&&(divX-moveUnits<=destX))){xDone=true;divX=parseInt(destX);}else if((divX+moveUnits)>destX){divX-=moveUnits;}else{divX+=moveUnits;}
if(divY==destY||((divY<destY)&&(divY+moveUnits>=destY))||((divY>destY)&&(divY-moveUnits<=destY))){yDone=true;divY=parseInt(destY);}else if((divY+moveUnits)>destY){divY-=moveUnits;}else{divY+=moveUnits;}
moveDiv(slideDivName,'null',divX,divY);if(xDone&&yDone){stopSlide();}}
function stringFilter(input){s=input.value;filteredValues="*|/\":<>[]{}`\;()@&$#%";var i;var returnString="";for(i=0;i<s.length;i++){var c=s.charAt(i);if(filteredValues.indexOf(c)==-1)returnString+=c;}
input.value=returnString;}

var myHugRSSURL="http://rss.weather.com/weather/rss/local/";var titleVal="The Weather Channel: Local Weather Outlook [RSS] for ";var linkElement="<LINK REL=\"alternate\" TYPE=\"application/rss+xml\" TITLE=\"";var hugmeLocationType='22';var hugmeLocationZip='23';var hugmeLocationZipPresentationName='24'
var favLocID='11';var favLocPresName='10';var urlTrackingStr="?cm_ven=LWO&cm_cat=rss&par=LWO_rss";try{var hugmeLocationTypeVal=getUserPreferences(hugmeLocationType);if(hugmeLocationTypeVal!="1"&&hugmeLocationTypeVal!="4"){myHugRSSURL+=getUserPreferences(hugmeLocationZip)+urlTrackingStr;titleVal+=getUserPreferences(hugmeLocationZipPresentationName);}else{myHugRSSURL+=getUserPreferences(favLocID)+urlTrackingStr;titleVal+=getUserPreferences(favLocPresName);}
linkElement+=titleVal+'" HREF="'+myHugRSSURL+'">';if(getUserPreferences(hugmeLocationZip)!=" "){document.write(linkElement);}}catch(err){var errorVal=err.toString();}
