function setCookie(D,A,B){var C=new Date();
C.setDate(C.getDate()+B);
document.cookie=D+"="+escape(A)+((B==null)?"":";expires="+C.toGMTString()+"; path=/")
}function getCookie(A){if(document.cookie.length>0){c_start=document.cookie.indexOf(A+"=");
if(c_start!=-1){c_start=c_start+A.length+1;
c_end=document.cookie.indexOf(";",c_start);
if(c_end==-1){c_end=document.cookie.length
}return unescape(document.cookie.substring(c_start,c_end))
}}return""
}function addEngine(C,D,E,B){var F=navigator.userAgent.toLowerCase();
if(F.indexOf("msie 7.0")!=-1){if(window.external&&("AddSearchProvider" in window.external)){try{window.external.AddSearchProvider(C);
setTimeout("postSearchProviderInstallation()",1000)
}catch(A){if(70==(A.number&65535)){alert("For security reasons, you must use the mouse\n(or the Enter key) to click the Install button.")
}else{alert("Unable to add search provider. ["+(A.number&65535)+"]")
}return false
}}}else{if(F.indexOf("firefox/")!=-1){try{if((typeof window.sidebar=="object")&&(typeof window.sidebar.addSearchEngine=="function")){window.sidebar.addSearchEngine(C,D,E,B);
setTimeout("postSearchProviderInstallation()",1000)
}}catch(A){if(70==(A.number&65535)){alert("For security reasons, you must use the mouse\n(or the Enter key) to click the Install button.")
}else{alert("Unable to add search provider. ["+(A.number&65535)+"]")
}return false
}}else{}}}function postSearchProviderInstallation(){if(getCookie("psp")=="noThanks"){$("#icePage_preferredSearchProvider_ClosedPanel").slideUp("0.20",function(){setCookie("psp","installed",365)
})
}else{$("#icePage_preferredSearchProvider_OpenedPanel").slideUp("0.20",function(){setCookie("psp","installed",365)
})
}}function checkSearchProviderInstallationStatus(){var E=navigator.userAgent.toLowerCase();
var D=0;
try{provider=location.protocol+"//"+location.host;
D=window.external.IsSearchProviderInstalled(provider);
if(getCookie("psp")=="installed"){D=1
}if(D>0){var B=document.getElementById("icePage_preferredSearchProvider_OpenedPanel");
var C=document.getElementById("icePage_preferredSearchProvider_ClosedPanel");
if(B!=null&&B.style.display!="none"){B.style.display="none";
return false
}else{if(C){if(C.style.display!="none"){C.style.display="none";
return false
}}}}}catch(A){}}function logClick(A){$.get(A)
}function pspNoThanks(A){if(A=="noThanks"){$("#icePage_preferredSearchProvider_OpenedPanel").slideUp("0.20",function(){$("#icePage_preferredSearchProvider_ClosedPanel").slideDown("0.20",function(){setCookie("psp","noThanks",365)
})
});
return false
}else{if(A=="never"){$("#icePage_preferredSearchProvider_ClosedPanel").slideUp("0.20",function(){setCookie("psp","never",365)
});
return false
}}}function ToggleVerticalTab(C,F){var D=document.getElementById("icePage_SearchBoxTop_qcat");
var G=document.getElementById("icePage_SearchBoxBottom_qcat");
if(D){D.value=C
}if(G){G.value=C
}var B=document.getElementsByTagName("a");
for(var A=0;
A<B.length;
A++){var H=B[A];
if(H.id.indexOf(C)!=-1){if(H.className=="VerticalTabInactive"){H.className="VerticalTabActive"
}}else{if(H.className=="VerticalTabActive"){H.className="VerticalTabInactive"
}}}if(C=="News"||C=="Video"){hideAdvSearch("true")
}else{hideAdvSearch("false")
}var E=document.getElementById("icePage_SearchBoxTop_ResultsFromChoices_ResultsFrom");
var I=document.getElementById("icePage_SearchBoxBottom_ResultsFromChoices_ResultsFrom");
if(E){if(C=="Web"){E.style.visibility="visible"
}else{E.style.visibility="hidden"
}}if(I){if(C=="Web"){I.style.visibility="visible"
}else{I.style.visibility="hidden"
}}}function toggleAdvSearch(A){var B=document.getElementById("icePage_advancedSearch_AdvSearchWrapper");
var C=document.getElementById("icePage_advancedSearch_advsearch");
var A=document.getElementById(A);
if(null!=B&&null!=C&&null!=A){if(B.style.display=="none"){C.value="true";
B.style.display="block";
A.className="advOptionLnkBold";
disableMainSearch("true")
}else{C.value="false";
B.style.display="none";
A.className="advOptionLnk";
disableMainSearch("false")
}}}function hideAdvSearch(E){var D=document.getElementById("icePage_advancedSearch_AdvSearchWrapper");
var B=document.getElementById("icePage_SearchBoxTop_AdvSearchLinkRight_AdvLnkWrapper_AdvOptionLnk");
var F=document.getElementById("icePage_SearchBoxTop_AdvSearchLinkBottom_AdvLnkWrapper_AdvOptionLnk");
var A=document.getElementById("icePage_SearchBoxTop_VerticalLinkSeperator2");
var C=document.getElementById("icePage_advancedSearch_advsearch");
if(E=="true"){if(B){B.style.visibility="hidden"
}if(D){D.style.visibility="hidden"
}if(F){F.style.display="none";
if(A){A.style.display="none"
}}}else{if(E=="false"){if(B){B.style.visibility="visible";
B.style.display="inline"
}if(F){F.style.display="block";
if(A){A.style.display="block"
}}if(D&&C&&C.value=="true"){D.style.visibility="visible";
B.style.visibility="visible";
if(F){F.style.display="block";
if(A){A.style.display="block"
}}}}}}function updateQAll(){var C=getAdvParam("qAll");
var B=getAdvParam("qPhrase");
var F=getAdvParam("qAny");
var E=getAdvParam("qNot");
if(C){qall=C.value
}if(B){qPhrase=B.value
}if(F){qAny=F.value
}if(E){qNot=E.value
}var D=document.getElementById("icePage_advancedSearch_AdvancedSearchWeb_domaint");
var A=document.getElementById("icePage_SearchBoxTop_qkw").value;
if(C&&B&&F&&F){if(null!=A){C.value=A
}B.value="";
F.value="";
E.value=""
}if(null!=document.getElementById("icePage_SearchResults_SearchBoxMarketing_mqkw")){document.getElementById("icePage_SearchResults_SearchBoxMarketing_mqkw").value=""
}if(null!=D){D.value=""
}}function validateAdSearchEntry(){var A=getAdvParam("qAll");
var C=getAdvParam("qPhrase");
var B=getAdvParam("qAny");
if(null==A&&null==C&&null==B){return
}if((trimAll(A.value)=="")&&(trimAll(C.value)=="")&&(trimAll(B.value)=="")){alert("You must also enter a word(s) in one or more of the following fields:\n- All of these words\n- The exact phrase\n- Any of these words\n");
A.focus();
return false
}return true
}function ZipSearch(){document.getElementById("icePage_SearchBoxTop_qkw").value=document.getElementById("icePage_SearchResults_IntelliFindContainer_IFMovieResult_IFMovieLocationHidden").value+" "+document.getElementById("icePage_SearchResults_IntelliFindContainer_IFMovieResult_IFMovieLocationTextBox").value
}function ZipSearchBottom(){document.getElementById("icePage_SearchBoxTop_qkw").value=document.getElementById("icePage_SearchResults_IntelliFindContainerBottom_IFMovieResult_IFMovieLocationHidden").value+" "+document.getElementById("icePage_SearchResults_IntelliFindContainerBottom_IFMovieResult_IFMovieLocationTextBox").value
}function HideRecentSearches(){var C=document.getElementById("icePage_SearchLinks_RecentSearches_RecentSearchRepeaterContainer");
if(C){C.style.display="none"
}var B=document.getElementById("icePage_SearchLinks_RecentSearches_HideButton");
if(B){B.style.display="none"
}var A=document.getElementById("icePage_SearchLinks_RecentSearches_ViewButton");
if(A){A.style.display="inline"
}document.cookie="wsViewRecent=0; path=/"
}function ViewRecentSearches(){var C=document.getElementById("icePage_SearchLinks_RecentSearches_RecentSearchRepeaterContainer");
if(C){C.style.display=""
}var A=document.getElementById("icePage_SearchLinks_RecentSearches_ViewButton");
if(A){A.style.display="none"
}var B=document.getElementById("icePage_SearchLinks_RecentSearches_HideButton");
if(B){B.style.display=""
}document.cookie="wsViewRecent=1; path=/"
}function SetRecentSearchesView(){if((document.cookie.length>0)&&(document.cookie.indexOf("wsViewRecent=0")!=-1)){HideRecentSearches()
}else{ViewRecentSearches()
}var A=document.getElementById("icePage_SearchLinks_RecentSearches_NoRecentSearches");
if(A){A.style.display="none"
}}function ClearRecentSearches(){document.cookie="wsRecent=; path=/";
document.cookie="wsViewRecent=; path=/";
var A=document.getElementById("icePage_SearchLinks_RecentSearches_RecentSearchesButtons");
if(A){A.style.display="none"
}var B=document.getElementById("icePage_SearchLinks_RecentSearches_RecentSearchRepeaterContainer");
if(B){B.style.display="none"
}var C=document.getElementById("icePage_SearchLinks_RecentSearches_NoRecentSearches");
if(C){C.style.display="block"
}}function trimAll(A){var B=/^(\s*)$/;
if(B.test(A)){A=A.replace(B,"");
if(A.length==0){return A
}}B=/^(\s*)([\W\w]*)(\b\s*$)/;
if(B.test(A)){A=A.replace(B,"$2")
}return A
}function disableMainSearch(D){var F=document.getElementById("icePage_SearchBoxTop_qkw");
var A=document.getElementById("icePage_SearchBoxBottom_qkw");
var E=document.getElementById("icePage_SearchBoxTop_qkwsubmit");
var B=document.getElementById("icePage_SearchBoxBottom_qkwsubmit");
var C=document.getElementById("icePage_SearchBoxTop_qcat").value;
if(C=="News"||C=="Video"){return
}if(D=="true"){if(F){F.disabled=true;
F.style.backgroundColor="#cfcfbf"
}if(A){A.disabled=true;
A.style.backgroundColor="#cfcfbf"
}if(E){E.disabled=true;
E.src=E.src.replace("goFetchBtn.gif","goFetchBtnGrayed.gif")
}if(B){B.disabled=true;
B.src=B.src.replace("goFetchBtn.gif","goFetchBtnGrayed.gif")
}}else{if(D=="false"){if(F){F.disabled=false;
F.style.backgroundColor="White"
}if(A){A.disabled=false;
A.style.backgroundColor="White"
}if(E){E.disabled=false;
E.src=E.src.replace("goFetchBtnGrayed.gif","goFetchBtn.gif")
}if(B){B.disabled=false;
B.src=B.src.replace("goFetchBtnGrayed.gif","goFetchBtn.gif")
}}}}function getAdvParam(A){var C=document.getElementById("icePage_SearchBoxTop_qcat").value;
if(C=="Images"){C="Image"
}if(C.toLowerCase()=="dns"){C="Web"
}var B=document.getElementById("icePage_advancedSearch_AdvancedSearch"+C+"_AdvancedSearchCommon_"+A);
return B
}function getAdvQuery(){var A=getAdvParam("qAll");
var D=getAdvParam("qPhrase");
var C=getAdvParam("qAny");
var B=getAdvParam("qNot");
if(A){A=A.value
}if(D){D=D.value
}if(C){C=C.value
}if(B){B=B.value
}var E="&padv=1";
if(A&&trimAll(A)!=""){E+="&qall="+encodeURIComponent(A)
}if(D&&trimAll(D)!=""){E+="&qphrase="+encodeURIComponent(D)
}if(C&&trimAll(C)!=""){E+="&qany="+encodeURIComponent(C)
}if(B&&trimAll(B)!=""){E+="&qnot="+encodeURIComponent(B)
}return E
}function Navigate_AdvSearch(A){var C=document.getElementById("icePage_SearchBoxTop_qcat").value;
var B=document.getElementById("icePage_SearchBoxTop_qkw").value;
if(C){A=A.replace("{qcat}",C)
}if(B){A=A.replace("{qkw}",B)
}else{A=A.replace("&qkw={qkw}",B)
}window.open(A,"_self","menubar=1,resizable=1,width=350,height=250")
}function QuoteSearch(){if(document.getElementById("icePage_SearchResults_IntelliFindContainer_IFStock_quoteSearchText").value!="Enter company symbol"){document.getElementById("icePage_SearchBoxTop_qkw").value=document.getElementById("icePage_SearchResults_IntelliFindContainer_IFStock_quoteSearchText").value
}};