// var userEng         = true;
// var CookieAUTOREF   = "";

function ChangeImage (ImageName,FileName) {
        document[ImageName].src = FileName;
}

var qurls = new Array();qurls["sALTA"]="http://www.altavista.com/cgi-bin/query?pg=q&kl=XX&stype=stext&q=";qurls["sAOLN"]="http://netfind.aol.com/search.gw?c=web&lk=excite_netfind_us&src=1&search=";qurls["sEXCI"]="http://www.excite.com/search.gw?search=";qurls["sHOTB"]="http://www.hotbot.com/?SW=web&SM=MC&DC=10&DE=2&RG=NA&_v=2&act.search.x=89&act.search.y=7&MT=";qurls["sINFO"]="http://www.infoseek.com/Titles?col=WW&sv=M8&lk=noframes&nh=10&qt=";qurls["sLYCO"]="http://www.lycos.com/cgi-bin/pursuit?cat=dir&query=";qurls["sYAHO"]="http://search.yahoo.com/bin/search?hc=0&hs=0&p=";qurls["sMSN"]="http://search.msn.com/results.asp?RS=CHECKED&UN=doc&CO=20&Form=MSNH&MT=";qurls["sSNAP"]="http://hmc.snap.com/search/directory/results/1,61,hmc-0,00.html?tag=tt.hmc.sb&keyword=";

function getSearchQURL(prov) {
	var url = qurls[ prov ];
	return url;
}

function LinkToSearchsite(){
	var df=document.forms;
	var U;
	for(var i=0; i<df.length; i++){
		if(df[i].elements[0].name == 'SearchText'){
			var ss=df[i].elements[1].options[ df[i].elements[1].selectedIndex 			].value;
			var st=escape(df[i].elements[0].value);
			if(st==""){
				alert("Please type the word or words you wish to search for in 				the Search box.");
				break;
			}
			else{
				var intLoc=st.indexOf("+");
				while (intLoc>-1){
					st=st.substring(0, intLoc) + "%252B" + 					st.substring(intLoc + 1, st.length);
					intLoc=st.indexOf("+", intLoc);
				}
				
				var intLoc=st.indexOf("%20");

				while (intLoc>-1){
					st=st.substring(0, intLoc) + "%2B" + st.substring(intLoc 										+ 3, st.length);
					intLoc=st.indexOf("%20", intLoc);
				}

				if(""!=(U = getSearchQURL(ss))){
					window.location = U + st;
				}
				break ;
			}
		}
	}
}