var typ='sweb'; function changeClass(ID,ID2,ID3){ if (typ!=ID){ typ=ID; document.getElementById(ID).className="active"; document.getElementById(ID2).className="1"; document.getElementById(ID3).className="1"; if (document.frmSearch.q.value!=''){ if (typ=='sweb'){ typ1='web'; } if (typ=='simg'){ typ1='image'; } if (typ=='svid'){ typ1='video'; } document.frmSearch.action='http://www.go2seek.com/'+typ1+'/'+TN(document.frmSearch.q.value)+'/'; document.frmSearch.submit(); } } // document.getElementById(ID).setAttribute("class", "active"); // document.getElementById(ID2).setAttribute("class", ""); // document.getElementById(ID3).setAttribute("class", ""); } function geturl2(q){ if (q!=''){ location='http://www.go2seek.com/'+urlencode(q)+'/'; return false; } else{ return false; } } var TN = function(b){var a=encodeURIComponent||escape; var c= a(b).replace(/\+/g,"%2B"); c = c.replace(/%2F/g,"%252F"); c = c.replace(/\//g," "); c = c.replace(/\*/g," "); c = c.replace(/%20/g,"-"); c = c.replace(/ /g,"-"); return c; } function geturl(value){ if (typ=='sweb'){ typ1='web'; } if (typ=='simg'){ typ1='image'; } if (typ=='svid'){ typ1='video'; } document.frmSearch.action='http://www.go2seek.com/'+typ1+'/'+TN(value)+'/'; return true; } function geturl2(value){ if (typ=='sweb'){ typ1='web'; } if (typ=='simg'){ typ1='image'; } if (typ=='svid'){ typ1='video'; } document.frmSearch2.action='http://www.go2seek.com/'+typ1+'/'+TN(value)+'/'; return true; }