BEGIN WEATHER FOR YOUR LIFE
function checkWhatForm(locid,ziptoloc,loctype,whatprefs) {
if (locid && whatprefs)
{
tmpLocId = locid+":"+loctype;
if(loctype != 4 && loctype != 1){
//Overwrite the locid value if not type 1 or 4
locid = ziptoloc;
}
// figure out tracking string for this command
var tstr = "";if (whatprefs == 'Weather36HourAchesAndPainsCommand'){ tstr = "&from=whatmenu_dropdown_achesandpains"; }else if (whatprefs == 'Weather36HourAirQualityCommand'){ tstr = "&from=whatmenu_dropdown_airquality"; }else if (whatprefs == 'Weather36HourAllergiesCommand'){ tstr = "&from=whatmenu_dropdown_allergies"; }else if (whatprefs == 'Weather36HourBoatAndBeachCommand'){ tstr = "&from=whatmenu_dropdown_boatandbeach"; }else if (whatprefs == ''){ tstr = "&from=whatmenu_dropdown_climateandgreen"; }else if (whatprefs == 'Weather36HourColdAndFluCommand'){ tstr = "&from=whatmenu_dropdown_coldandflu"; }else if (whatprefs == 'Weather36HourFitnessCommand'){ tstr = "&from=whatmenu_dropdown_fitness"; }else if (whatprefs == 'Weather36HourBusinessTravelerCommand'){ tstr = "&from=whatmenu_dropdown_businesstravel"; }else if (whatprefs == 'Weather36HourGolfCommand'){ tstr = "&from=whatmenu_dropdown_golf"; }else if (whatprefs == 'Weather36HourHealthCommand'){ tstr = "&from=whatmenu_dropdown_health"; }else if (whatprefs == 'Weather36HourHomeCommand'){ tstr = "&from=whatmenu_dropdown_homeplanner"; }else if (whatprefs == 'Weather36HourInterstateCommand'){ tstr = "&from=whatmenu_dropdown_driving"; }else if (whatprefs == 'Weather36HourGardenCommand'){ tstr = "&from=whatmenu_dropdown_lawn"; }else if (whatprefs == 'Weather36HourOutdoorsCommand'){ tstr = "&from=whatmenu_dropdown_outdoors"; }else if (whatprefs == 'Weather36HourPetsCommand'){ tstr = "&from=whatmenu_dropdown_pets"; }else if (whatprefs == 'Weather36HourSchooldayCommand'){ tstr = "&from=whatmenu_dropdown_schoolday"; }else if (whatprefs == 'Weather36HourSkiCommand'){ tstr = "&from=whatmenu_dropdown_ski"; }else if (whatprefs == 'Weather36HourSunSafetyCommand'){ tstr = "&from=whatmenu_dropdown_sunsafety"; }else if (whatprefs == 'Weather36HourSportsCommand'){ tstr = "&from=whatmenu_dropdown_sportingevents"; }else if (whatprefs == 'Weather36HourVacationPlannerCommand'){ tstr = "&from=whatmenu_dropdown_vacationplanner"; }else{ tstr = "&from=whatmenu_dropdown";}
if (getUserPreferences('16') && getUserPreferences('16').length > 1)
{
var currentVert = getUserPreferences('16');
tstr = "&from=whatmenu_dropdown_" + currentVert.toLowerCase();;
}
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.whatmenu.action=WWW_host+"/search/enhanced";
if (document.whatmenu.whatprefs.selectedIndex > 0) {
var thisVal = document.whatmenu.whatprefs.options[document.whatmenu.whatprefs.selectedIndex].value;
document.whatmenu.what.value = thisVal;
var retVal = changeCommandToVal(thisVal);
setUserPreferences('16',retVal);
} else if (getUserPreferences('16') && getUserPreferences('16').length > 1) {
var thisVal = getUserPreferences('16');
var retVal = changeValToCommand(thisVal);
document.whatmenu.what.value = retVal;
} else {
document.whatmenu.what.value = 'WeatherLocalUndeclared';
}
document.whatmenu.lswa.value=document.whatmenu.what.value;
if (document.whatmenu.lswe.value != '') {
var lp = "/weather/" + targetCmd + "/";
var wh = whatprefs;
var dayNum ='';
if (targetCmd=="wxdetail")dayNum = "&dayNum=1";
if (wh == 'Weather36HourAchesAndPainsCommand'){ lp = "/outlook/health/achesandpains/" + targetCmd + "/";
}else if (wh == 'Weather36HourAllergiesCommand'){ lp = "/outlook/health/allergies/" + targetCmd + "/";
if(loctype == 19){locid = tmpLocId;}
}else if (wh == 'Weather36HourAirQualityCommand'){ lp = "/outlook/health/airquality/" + targetCmd + "/";
}else if (wh == 'Weather36HourSunSafetyCommand'){ lp = "/outlook/health/skin/" + targetCmd + "/";
}else if (wh == 'Weather36HourColdAndFluCommand'){ lp = "/outlook/health/coldandflu/" + targetCmd + "/";
}else if (wh == 'Weather36HourHomeCommand'){ lp = "/outlook/homeandgarden/home/" + targetCmd + "/";
}else if (wh == 'Weather36HourGardenCommand'){ lp = "/outlook/homeandgarden/garden/" + targetCmd + "/";
}else if (wh == 'Weather36HourSchooldayCommand'){ lp = "/outlook/homeandgarden/schoolday/" + targetCmd + "/"; if(loctype == 17){locid = tmpLocId;}
}else if (wh == 'Weather36HourSportsCommand'){ lp = "/outlook/events/sports/" + targetCmd + "/";if(loctype == 20){locid = tmpLocId;}
}else if (wh == 'Weather36HourWeddingCommand'){ lp = "/outlook/events/weddings/" + targetCmd + "/";
}else if (wh == 'Weather36HourInterstateCommand'){ lp = "/outlook/driving/interstate/" + targetCmd + "/";if(loctype == 16){locid = tmpLocId;}
}else if (wh == 'Weather36HourBoatAndBeachCommand'){ lp = "/outlook/recreation/boatandbeach/" + targetCmd + "/";
}else if (wh == 'Weather36HourGolfCommand'){ lp = "/outlook/recreation/golf/" + targetCmd + "/";if(loctype == 5){locid = tmpLocId;}
}else if (wh == 'Weather36HourSkiCommand'){ lp = "/outlook/recreation/ski/" + targetCmd + "/";if(loctype == 11){locid = tmpLocId;}
}else if (wh == 'Weather36HourBusinessTravelerCommand'){ lp = "/outlook/travel/businesstraveler/" + targetCmd + "/";if(loctype == 9){locid = tmpLocId;}
}else if (wh == 'Weather36HourVacationPlannerCommand'){ lp = "/outlook/travel/vacationplanner/" + targetCmd + "/";
}else if (wh == 'Weather36HourOutdoorsCommand'){ lp = "/outlook/recreation/outdoors/" + targetCmd + "/";
}else if (wh == 'Weather36HourFitnessCommand'){ lp = "/outlook/health/fitness/" + targetCmd + "/";
}else if (wh == 'Weather36HourHealthCommand'){ lp = "/outlook/health/general/" + targetCmd + "/";
}else if (wh == 'Weather36HourPetsCommand'){ lp = "/outlook/homeandgarden/pets/" + targetCmd + "/";}
document.location = WWW_host+lp+locid+"?lswe="+document.whatmenu.lswe.value+"&lwsa="+document.whatmenu.lswa.value+tstr+dayNum;
return false;
} else {
return true;
}
}else{
//INVALID VALUES......
}
}
if(paramValue("lswe") != undefined){document.whatmenu.lswe.value = paramValue("lswe");}
Weather for your life
Weather Related to...
bz 6871 show vertical channel that the user is on - Richard Zhu - 01-17-2007 - start
Aches & Pains
Air Quality & Pollution
Allergies & Pollen
Boat & Beach
Cold & Flu
Fitness & Exercise
Flights & Business Travel
Golf Weather
Health
Home Improvement
Interstate Driving Forecast
Lawn & Garden
Outdoor Recreation
Pets
Schoolday Weather
Ski Conditions
Skin Protection
Sporting Events
Vacation & Travel Guide
Wedding Planner
bz 6871 show vertical channel that the user is on - Richard Zhu - 01-17-2007 - end
END WEATHER FOR YOUR LIFE
function setFlookie(){
try{
var listenerObj = new Object();
listenerObj.ready = function(){
var flCheck = GetCookie("flCheck");
//synchronize the flookie when userprefs is updated by an action of weather for your life dropdown
if (flCheck.indexOf("true")!=-1){ //if the user had opted in to save info in a flookie
//synchronize the flookie channelprefs param from userprefs
flCheckFlookie.set("in_channelprefs", getUserPreferences("16"));
}
}
Flookie.addListener(listenerObj);
}catch(err){
}
}
addEvent(window, "load", setFlookie);
if (getUserPreferences("5") && getUserPreferences("5")