<!--
var zipVal = getCookie("fszip");
var stockList = getCookie("fsstocks");
var searchEngVal = getCookie("fssearch");
var searchEngNum = 1;
function prepareString(anyString,convertSpaces) {
 var spaces=0
for (var i=0;i<=anyString.length;i++){
 if (anyString.substr(i,1)==" ") { anyString=anyString.substr(0,i)+"+"+anyString.substr(i+1); spaces+=1 }
}
if (convertSpaces != 0) {
 if (spaces>0) {
  if (anyString.substr(0,1)!='"'){anyString='"'+anyString}
   if (anyString.substr(anyString.length-1,1)!='"'){anyString+='"'}
  }
 }
 return anyString
}
function goSearch() {
 var expDate = new Date();
 expDate.setTime(expDate.getTime() + (360*24*60*60*1000));
 setCookie("fssearch",searchEngNum, expDate);
 searchVal=prepareString(document.searchWeb.lookfor.value, 1)

 if (searchEngNum==1) { searchVal=prepareString(document.searchWeb.lookfor.value, 0); var searchURL="http://www.google.com/search?q="+searchVal+"&safe=active";}
 if (searchEngNum==2) { searchVal=prepareString(document.searchWeb.lookfor.value, 0); var searchURL="http://search.yahoo.com/bin/search?p="+searchVal;}
 if (searchEngNum==3) { searchVal=prepareString(document.searchWeb.lookfor.value, 0); var searchURL="http://php.searchopolis.com/cgi-bin/esearch?engine=internet&request="+searchVal;}
 if (searchEngNum==4) { searchVal=prepareString(document.searchWeb.lookfor.value, 0);
var searchURL="http://www.crosssearch.com/cgi-bin/search?s="+searchVal;}
 if (searchEngNum==5) { var searchURL="http://www.dogpile.com/texis/search?q="+searchVal+"&fs=web&to=thirty"; }
 if (searchEngNum==6) { searchVal=prepareString(document.searchWeb.lookfor.value, 0); var searchURL="http://www.lycos.com/srch/?lpv=1&loc=searchguard&query="+searchVal;
 }
 displayWindow = window.open(searchURL)
}
function getWeather() {
 var expDate = new Date();
 expDate.setTime(expDate.getTime() + (360*24*60*60*1000));
 setCookie("fszip",document.inputWeather.destination.value, expDate);
 var zipCityVal=prepareString(document.inputWeather.destination.value, 1)
 var weatherURL;
 if (zipCityVal != 0) { weatherURL="http://www.weather.com/weather/local/"+zipCityVal; }
 else { weatherURL="http://www.weather.com"; }
 weatherDisplayWindow = window.open(weatherURL);
}
function updateZip() {
 var expDate = new Date();
 expDate.setTime(expDate.getTime() + (360*24*60*60*1000));
 setCookie("fszip",document.inputWeather.destination.value, expDate);
 window.location.reload(true);
}
function getQuote() {
 var expDate = new Date();
 expDate.setTime(expDate.getTime() + (360*24*60*60*1000));
 setCookie("fsstocks",document.stockQuote.quoteField.value, expDate);
 var stockQuoteVal=prepareString(document.stockQuote.quoteField.value, 0);
 searchURL="http://finance.yahoo.com/q?s="+stockQuoteVal+"&d=v1";
 stockQuoteWindow = window.open(searchURL);
}
function getSymbol() {
 var stockQuoteVal=prepareString(document.stockSymbol.symbolField.value, 0);
 searchURL="http://finance.yahoo.com/l?s="+stockQuoteVal;
 stockQuoteWindow = window.open(searchURL);
}
function setCookie(name, value, expires, path, domain, secure) {
 var curCookie = name + "=" + escape(value) +
((expires) ? "; expires=" + expires.toGMTString() : "") +
((path) ? "; path=" + path : "") +
((domain) ? "; domain=" + domain : "") +
((secure) ? "; secure" : "");
document.cookie = curCookie;
}
function getCookie(name) {
 var dc = document.cookie;
 var prefix = name + "=";
 var begin = dc.indexOf("; " + prefix);
 if (begin == -1) { begin = dc.indexOf(prefix);
if (begin != 0) return null;
 } else
begin += 2;
 var end = document.cookie.indexOf(";", begin);
 if (end == -1) end = dc.length;
return unescape(dc.substring(begin + prefix.length, end));
}
function deleteCookie(name, path, domain) {
 if (getCookie(name)) {
document.cookie = name + "=" +
((path) ? "; path=" + path : "") +
((domain) ? "; domain=" + domain : "") +
"; expires=Thu, 01-Jan-70 00:00:01 GMT";
 }
}
function searchHelp() {
 if (searchEngNum == 1) { window.status = 'Google: default AND search, + to include, - to exclude';}
 if (searchEngNum == 2) { window.status = "Yahoo: use + to include a term, - to exclude. default OR search.";}
 if (searchEngNum == 3) { window.status = "Searchopolis: just enter the search term only.";}
 if (searchEngNum == 4) { window.status = "CrossSearch searches Christian sites. Search term only.";}
 if (searchEngNum == 5) { window.status = "Dogpile searches multiple search engines."; }
 if (searchEngNum == 6) { window.status = "Lycos: default AND search.";}
}
function setSearchEng(num) {
 searchEngNum = num + 1;
 window.status = "searchEngNum="+searchEngNum;
 searchHelp();
}
function setSearchEng2(num) {
 searchEngNum = document.searchWeb.whichSearch.options[num].value;
 searchHelp();
}
function searchHelpOff() {
 window.status = window.defaultStatus;
}
function loadPageVars() {
if (zipVal != null) { document.inputWeather.destination.value = zipVal; }
if (stockList != null) { document.stockQuote.quoteField.value = stockList; }
//if (searchEngVal != null && searchEngVal > 0) {
// document.searchWeb.whichSearch.options[1].selected = false;
// searchEngNum = searchEngVal;
// document.searchWeb.whichSearch.selectedIndex = searchEngNum;
// document.searchWeb.whichSearch.options[searchEngNum - 1].selected = true;
//}
}
// -->
