//google.load("language","1");google.setOnLoadCallback(init);
var gotlatest=0;if(document.images)
{pic1=new Image();pic1.src="/images/loading.gif";}
function hdeall(only){var part1=new Array('ALL','MSN','Bing','Google','Yahoo','SearchHippo','AOL','Topix','YahooNews','BingNews','GoogleNews','BBCNews','Feedsfarm','Plazoo','GoogleBlogs','Technorati','Entireweb','Blogdigger','blogpulse','sitemap','translate','latest','topsearches','randomsearches','bigmovers','latests','randoms','loading');var i=27;var startj=0;if(only){startj=19}
for(j=startj;j<=i;j++){var part3=document.getElementById(part1[j]);if(part3)part3.className='hidden';}}
function shw(shwid,only){var part2=document.getElementById(shwid);if(part2.className==only){part2.className='hidden'}
else{hdeall(only);if(only){part2.className=only}
else{part2.className='visible'}}
if(shwid=="latest"||shwid=="randomsearches"){GetLatest();}}
function GoSite(gourl,wdow){if(wdow){testwindow=window.open(gourl,"wdow","menubar=1,resizable=1,status=1,toolbar=1,scrollbars=1,width=700,height=600");testwindow.focus();}
else{self.location.href=gourl;}}
function checkform(form)
{if(form.search.value==""){form.search.focus();return false;}
shw('loading','loading');return true;}
function handleError(){return true;}
window.onerror=handleError;function GetLatest()
{if(gotlatest==1){return true;}
gotlatest=1;var xhrlatest=loadXMLDoc("http://"+location.host+"/cgi-bin/latest.cgi?ajax=1");var results=xhrlatest.getElementsByTagName("results");var searches=results[0].getElementsByTagName("searches");var search=searches[0].getElementsByTagName("search");var searchhtml='';for(var i=0;i<search.length;i++){var initial=search[i].getAttribute("searchtype").substr(0,1);searchhtml=searchhtml+(i+1)+". <a title='"+search[i].firstChild.nodeValue+"' href='/"+initial+'-'+search[i].getAttribute("pagename")+".php'>"+search[i].firstChild.nodeValue+"("+initial+")</a><br>";}
document.getElementById("latestsearches").innerHTML=searchhtml;search=searches[1].getElementsByTagName("search");searchhtml='';for(var i=0;i<search.length;i++){var initial=search[i].getAttribute("searchtype").substr(0,1);searchhtml=searchhtml+(i+1)+". <a title='"+search[i].firstChild.nodeValue+"' href='/"+initial+'-'+search[i].getAttribute("pagename")+".php'>"+search[i].firstChild.nodeValue+"("+initial+")</a><br>";}
document.getElementById("random").innerHTML=searchhtml;return true;}
function loadXMLDoc(dname)
{var xmlDoc;if(window.ActiveXObject)
{xmlDoc=new ActiveXObject("Microsoft.XMLDOM");}
else if(document.implementation&&document.implementation.createDocument)
{xmlDoc=document.implementation.createDocument("","",null);}
else
{alert('Your browser cannot handle this script');}
xmlDoc.async=false;xmlDoc.load(dname);return(xmlDoc);}
function IsItEnglish(){
    if(document.form1.searchbox.value==""){document.form1.searchbox.focus();return false;}
    else{
    shw('loading','loading');
    for (var i=0; i < document.form1.type.length; i++)
   {
   if (document.form1.type[i].checked)
      {
      var rad_val = document.form1.type[i].value;
      }
   }
    var srch=document.form1.searchbox.value;
    srch=srch.replace(/ /g,"+");
    window.location="http://"+location.host+"/"+rad_val+'/'+srch+'.php';
    }
return false;
}
