function createCookie(name,value,days,domain){if(days){var date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));var expires="; expires="+date.toGMTString()}else{var expires=""}document.cookie=name+"="+value+expires+"; path=/;domain="+domain.value}function SetCookie(param,link){if(param.indexOf("&amp;")==-1){param=param.replace("&","&amp;")}var lbl=document.getElementById("menuControl1_lblEmailPref");var aTag=document.getElementById("menuControl1_aTagEmail");var domain=document.getElementById("menuControl1_cookieDomain");if(aTag==null){aTag=document.getElementById("ctl00_menuControl1_aTagEmail")}if(lbl==null){lbl=document.getElementById("ctl00_menuControl1_lblEmailPref")}if(domain==null){domain=document.getElementById("ctl00_menuControl1_cookieDomain")}aTag.href=link;lbl.innerHTML=param;createCookie("EmailPref",param,90,domain)}function SetCookieSoc(param,link){var lblSoc=document.getElementById("menuControl1_lblSocPref");var aTagSoc=document.getElementById("menuControl1_aTagSoc");var domain=document.getElementById("menuControl1_cookieDomain");if(aTagSoc==null){aTagSoc=document.getElementById("ctl00_menuControl1_aTagSoc")}if(lblSoc==null){lblSoc=document.getElementById("ctl00_menuControl1_lblSocPref")}if(domain==null){domain=document.getElementById("ctl00_menuControl1_cookieDomain")}aTagSoc.href=link;lblSoc.innerHTML=param;createCookie("SocPref",param,90,domain)}function getCookie(Name){var search=Name+"=";if(document.cookie.length>0){offset=document.cookie.indexOf(search);if(offset!=-1){offset+=search.length;end=document.cookie.indexOf(";",offset);if(end==-1){end=document.cookie.length}return unescape(document.cookie.substring(offset,end))}}}function createPopup(url){window.open(url,"","width=450, height=500");return true}function httpFactory(){this._factories=[function(){return new XMLHttpRequest()},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}];this._factory=null}var HTTP=new httpFactory();HTTP.newRequest=function(){if(HTTP._factory!=null){return new HTTP._factory()}for(var i=0;i<HTTP._factories.length;i++){try{var factory=HTTP._factories[i];var request=factory();if(request!=null){HTTP._factory=factory;return request}}catch(e){continue}}HTTP._factory=function(){throw new Error("XMLHttpRequest not supported")};HTTP._factory()};function makeRequest(url){var request=HTTP.newRequest();request.open("GET",url,false);request.send(null);if(request.status==200){return request.responseText}else{return"Error"+request.status+": "+request.statusText}}var pagetitle=document.title;var pageurl=window.location;delicioussubmit='<a href="http://del.icio.us/submit?url='+pageurl+"&title="+pagetitle+'" target="_blank" class="delicious">del.icio.us</a>';diggsubmit='<a href="http://www.digg.com/submit?phase=2&url='+pageurl+'" target="_blank" class="digg">Digg</a>';stumblesubmit='<a href="http://www.stumbleupon.com/submit?url='+pageurl+"&title="+pagetitle+'" target="_blank" class="stumbleupon">StumbleUpon</a>';technoratisubmit='<a href="http://www.technorati.com/faves?add='+pageurl+'" target="_blank" class="technorati">Technorati</a>';function toggle(s){var choice=document.getElementById(s);var param=document.getElementById("param");if(choice.id.match("web")!=null){param.value=false;$(".search ul li").addClass("inactive");$(".search ul li:first").removeClass("inactive");$("#search_btn_copy").val("Search the Web");if($(".keywords").val()!="Search for..."){$(".keywords").css("color","#000").focus()}else{$(".keywords").css("color","#000").val("").focus()}}else{if(choice.id.match("site")!=null){param.value=true;$(".search ul li").removeClass("inactive");$(".search ul li:first").addClass("inactive");$("#search_btn_copy").val("Search the Site");$(".keywords").focus();if($(".keywords").val()!="Search for..."){$(".keywords").css("color","#000").focus()}else{$(".keywords").css("color","#000").val("").focus()}}}}function toggle2(s){var choice=document.getElementById(s);var param=document.getElementById("param2");if(choice.id.match("web2")!=null){param.value=false;$(".search2 ul li").addClass("inactive");$(".search2 ul li:first").removeClass("inactive");$("#search_btn_copy2").val("Search the Web");if($(".keywords2").val()!="Search for..."){$(".keywords2").css("color","#000").focus()}else{$(".keywords2").css("color","#000").val("").focus()}}else{if(choice.id.match("site2")!=null){param.value=true;$(".search2 ul li").removeClass("inactive");$(".search2 ul li:first").addClass("inactive");$("#search_btn_copy2").val("Search the Site");$(".keywords2").focus();if($(".keywords2").val()!="Search for..."){$(".keywords2").css("color","#000").focus()}else{$(".keywords2").css("color","#000").val("").focus()}}}}function updateweather(zip,unit,defaultZip){var weatherquery="zipcode="+zip+"&unit="+unit+"&defaultZip="+defaultZip;$.ajax({type:"GET",url:"../weatherxml.aspx",data:weatherquery,datatype:"xml",cache:false,success:function(xml){var _location=$(xml).find("dnam").text();_location=_location.split("(",1);if(_location==""){_location="Enter a valid zip code. "}$(xml).find("day").each(function(){var _count=$(this).attr("d");var _day=$(this).attr("t");var _hi=$(this).find("hi").text();var _low=$(this).find("low").text();var _icon=$(this).find("icon:first").text();if($(".weather")){$(".weather #weather_day"+_count).replaceWith('<div id="weather_day'+_count+'" class="weatherbin">'+_day+'<br /><img src="/images/weather/'+_icon+'.png" /><br />'+_low+"&deg;/"+_hi+"&deg;</div>")}});$(".weather_menu").html(" - "+_location+' <img src="/images/weather/topbar/'+$(xml).find("day icon:first").text()+'.png" /> '+$(xml).find("tmp").text()+"&deg;"+unit.toUpperCase());if($(".weather")){$(".weather #condition").replaceWith('<span id="condition"> '+$("cc > t",xml).text()+" "+$(xml).find("tmp").text()+"&deg;"+unit.toUpperCase()+"</span>");$(".weather #location").replaceWith('<span id="location">'+_location+"</span>");$(".weather #weatherlinks p").replaceWith('<p><a href="http://click.freeze.com/?clname=weatherlogo&wurl='+escape("http://www.weather.com/?prod=xoap&par=1029166254")+'" target="_blank"><img src="/images/TWClogo_64px.png" height="64" width="64" alt="weather.com" /></a><strong>featured on weather.com&reg;</strong><br /></p>');$(xml).find("link").each(function(){if($(this).attr("pos")!="4"){$(".weather #weatherlinks p").append('<a href="http://click.freeze.com/?clname=feature'+$(this).attr("pos")+"&wurl="+escape($(this).find("l").text())+'" target="_blank">'+$(this).find("t").text()+"</a><br />")}})}if(($(xml).find("dnam").text()==null||$(xml).find("dnam").text()=="")&&xml=="exceptionError"){document.getElementById("pnlWeather").innerHTML=""}}})}jQuery(function($){if($("#top10_tabmenu")){$("#top10_tabmenu li a:first").addClass("active");$("#top10_tabmenu li a").click(function(e){e.preventDefault();$("#top10_tabmenu li a").removeClass("active");$(this).addClass("active");$(".top10_content").hide();$($(this).attr("href")).show()})}$(".hdl_block").hover(function(){$(this).css({backgroundColor:"#efefef"})},function(){$(this).css({backgroundColor:"#fff"})});$(".gray").bind("mouseout",function(){$(".gray .hdl_block").css("background-color","#efefef")});jQuery.each($(".hdl_block_story img"),function(){if($(this).width()<2){$(this).css("display","none")}});jQuery.each($(".storyitem img"),function(){if($(this).width()<2){$(this).css("display","none")}});if(location.href.match("Help.aspx")==null){$(".searchbox").focus().css("color","#000")}$(".searchbox2").bind("focus",function(){$(this).css("color","#000");if($(this).val()=="Search for..."){$(this).val("")}});var elementwidth=-147;$(".topbar > a").each(function(){elementwidth=elementwidth+$(this).width()});$("#sharethispage").css("left",(elementwidth+24)+"px");$(".topbar a.closeshare").bind("mousedown",function(){$(".topbar a.showshare").click()});$(".topbar a.showshare").toggle(function(){$("#sharethispage").slideDown()},function(){$("#sharethispage").slideUp()});if(document.all){$("#header #nav ul li").hover(function(){$(this).addClass("hover")},function(){$(this).removeClass("hover")})}$("#header .infobar a.closeemail").bind("mousedown",function(){$("#header .infobar a.more").click()});$("#header .infobar a.more").toggle(function(){if($("#chg_soc").css("display")=="block"){$("#header .infobar a.moresoc").click()}$("#chg_email").slideDown()},function(){$("#chg_email").slideUp()});$("#header .infobar a.closesoc").bind("mousedown",function(){$("#header .infobar a.moresoc").click()});$("#header .infobar a.moresoc").toggle(function(){if($("#chg_email").css("display")=="block"){$("#header .infobar a.more").click()}$("#chg_soc").slideDown()},function(){$("#chg_soc").slideUp()});if(getCookie("index_weather")){updateweather(getCookie("index_weather").match(/\d{5}/),"f","10027")}});function IsNumeric(sText){var ValidChars="0123456789";var IsNumber=true;var Char;for(i=0;i<sText.length&&IsNumber==true;i++){Char=sText.charAt(i);if(ValidChars.indexOf(Char)==-1){IsNumber=false}}return IsNumber}function checkZipCookie(zip){var name=getCookie("myfrz_zip");if(!name){createCookie("myfrz_zip",zip,90,"my.freeze.com");return zip}else{return name}}function ChangeZip(){if($("#txtZip").val().length==5&&$("#txtZip").val()&&IsNumeric($("#txtZip").val())){updateweather($("#txtZip").val(),"f");$("#txtZip").val("")}}function changeweather(){$(".hdl_block #weather_change").toggle()}if(typeof urlParams=="undefined"){bookmarkParams=""}else{bookmarkParams=urlParams}function bookmarksite(title,url){if(window.sidebar){window.sidebar.addPanel(title,url+"?"+bookmarkParams,"")}else{if(window.opera&&window.print){var elem=document.createElement("a");elem.setAttribute("href",url+"?"+bookmarkParams);elem.setAttribute("title",title);elem.setAttribute("rel","sidebar");elem.click()}else{if(document.all){window.external.AddFavorite(url+"?"+bookmarkParams,title)}}}}var fullHomePageUrl="http://my.freeze.com/?"+bookmarkParams;function setHomePage(){if(showSetHomePage){if(document.all){document.write("<a href=\"javascript:history.go(0);\" onclick=\"this.style.behavior='url(#default#homepage)';this.setHomePage('"+fullHomePageUrl+"');\">");document.write("Make This Your Homepage</a> | ")}else{if(document.getElementById){document.write('<a href="'+fullHomePageUrl+'">Drag this link onto your Home button to make this your Home Page</a> | ')}else{if(document.layers){document.write("")}else{document.write("")}}}}}fullSearchPageUrl="http://search.freeze.com/Search.aspx";function setSearchPage(){if(document.all){document.write("<a href=\"javascript:history.go(0);\" onclick=\"this.style.behavior='url(#default#homepage)';this.setHomePage('"+fullSearchPageUrl+"');\">");document.write("Make This Your Homepage</a>")}else{if(document.getElementById){document.write('<a href="'+fullSearchPageUrl+'">Drag this link onto your Home button to make this your Home Page.</a>')}else{if(document.layers){document.write("")}else{document.write("")}}}}searchRandNum=(Math.floor((Math.random()*10)+1));function checkCookie(){var name=getCookie("SearchPageId");if(name!=null){if(name=="SearchPageId=find"){searchRandNum=5}if(name=="SearchPageId=find_v2"){searchRandNum=10}}}function rndSearch(){if(searchRandNum>0&&searchRandNum<10){document.write('<form name="search" action="../Search/SearchHandler.aspx" method="post">')}else{if(searchRandNum==10){document.write('<form name="search" action="../Search/SearchHandler.aspx" method="post">')}else{document.write('<form name="search" action="../Search/SearchHandler.aspx" method="post">')}}}function rndSearchType(){if(searchRandNum>0&&searchRandNum<10){document.write('<input name="type" id="type" type="hidden" value="t2v10" />')}else{if(searchRandNum==10){document.write('<input name="type" id="type" type="hidden" value="t2v10" />')}else{document.write('<input name="type" id="type" type="hidden" value="t2v10" />')}}};