var searchname="google";function $(a){return document.getElementById(a)}function CreateForm(){this.r=document.documentElement;this.f=document.createElement("FORM");this.f.id="TempForm";this.f.target="_blank";this.f.method="get";this.r.insertBefore(this.f,this.r.childNodes[0])}CreateForm.prototype.TSubmit=function(b,a,d,l,f){var k=$("TempForm").elements.length;for(var g=0;g<k;g++){if(IE()){$("TempForm").elements[0].removeNode(true)}else{$("TempForm").removeChild($("TempForm").elements[0])}}var m=document.createElement("input");m.id=b;m.name=b;m.value=a;m.type="hidden";this.f.appendChild(m);var j=l.split(";");for(var g=0;g<j.length;g++){var e=j[g].split("=");var h=document.createElement("input");h.id=e[0];h.name=e[0];h.value=e[1];h.type="hidden";this.f.appendChild(h)}this.f.action=d;document.charset=f;this.f.submit()};var NewFrom=new CreateForm();var IE=new Function("",'if(navigator.appName.indexOf("Explorer")>=0)return true;if(navigator.appName.indexOf("Netscape")>=0)return false');var sou=function(d,b,h){var e=$(d);var k=$(b);var f=false;var a;k.onmouseover=function(m){m||(m=window.event);var l=(typeof m.target!="undefined")?m.target:m.srcElement;l=l.tagName=="SPAN"?l.parentNode:l;if(l.tagName=="LI"){var n=l.parentNode;for(i=0;i<n.childNodes.length;i++){n.childNodes[i].className="div_ss_li"}l.className="hov"}};function j(m){m||(m=window.event);var l=(typeof m.target!="undefined")?m.target:m.srcElement;if(l.tagName=="LI"){if(l.parentNode.parentNode.id=="searchcontent"){e.value=l.firstChild.data;if(searchname=="google"){NewFrom.TSubmit("q",e.value,"http://www.google.cn/search","hl=zh-CN","utf-8")}else{NewFrom.TSubmit("wd",e.value,"http://www.baidu.com/s"," ","gb2312")}k.style.visibility="hidden";return}}if(l==e||l.id=="ChangeSearch"||l.id=="ChangeSearch1"||l.id=="ChangeSearch2"){return}k.style.visibility="hidden"}document.onmousedown=j;e.onkeydown=function(n){n||(n=window.event);switch(n.keyCode){case 40:if(k.style.visibility=="hidden"){return}f=true;var l=$("searchcontent").firstChild.childNodes;var m=new Object();for(i=0;i<l.length;i++){if(l[i].className=="hov"){m=l[i];break}}if(typeof m.className=="undefined"){m=l[0];m.className="hov";e.value=m.firstChild.data;return}m.className="div_ss_li";if(m==l[l.length-1]){e.value=a?a:"";return}e.value=m.nextSibling.firstChild.data;m.nextSibling.className="hov";break;case 38:if(k.style.visibility=="hidden"){return}f=true;var l=$("searchcontent").firstChild.childNodes;var m=new Object();for(i=0;i<l.length;i++){if(l[i].className=="hov"){m=l[i];break}}if(typeof m.className=="undefined"){m=l[l.length-1];m.className="hov";e.value=m.firstChild.data;return}m.className="div_ss_li";if(m==l[0]){e.value=a?a:"";return}e.value=m.previousSibling.firstChild.data;m.previousSibling.className="hov";break;case 13:NewFrom.TSubmit("wd",e.value,"http://www.baidu.com/s"," ","gb2312");break;default:if(!IE()){g()}f=false;break}};if(IE()){e.onkeyup=g}function g(){if(!f){a=e.value}else{return}if(e.value!=""){var m="";window.google={};window.google.ac={};window.google.ac.h=function(n){return;if(c.length<=2){return}else{for(i=1;i<c.length;i+=2){if(h==true){m+="<li class='div_ss_li'> "+c[i]+"<span class='div_ss_li_span'>"+c[i+1]+"</span></li>"}else{m+="<li class='div_ss_li'> "+c[i]+"</li>"}}k.style.visibility="visible";k.innerHTML="<div style='position:absolute;width:401px;' id='searchcontent'><ul class='div_ss_ul'>"+m+"</ul><ul style='text-align:right;color:#000000;background:#bfdef5;border:solid 1px #b6cae3;border-top-style:none;' id='ChangeSearch'><span style='color:#666666' id='ChangeSearch1'>\u8c37\u6b4c</span>&nbsp;|<span style='cursor:pointer' id='ChangeSearch2'>&nbsp;\u767e\u5ea6&nbsp;</span></ul></div>";$("ChangeSearch2").attachEvent("onclick",function(){searchname="baidu";g();$("inputtext").focus()})}};window.baidu={};window.baidu.sug=function(n){if(typeof(n)=="object"&&typeof(n.s)!="undefined"&&typeof(n.s[0])!="undefined"){for(i=1;i<n.s.length;i++){m+="<li class='div_ss_li'> "+n.s[i]+"</li>"}k.style.visibility="visible";k.innerHTML="<div style='position:absolute;width:401px;' id='searchcontent'><ul class='div_ss_ul'>"+m+"</ul><ul style='text-align:right;color:#000000;background:#bfdef5;border:solid 1px #b6cae3;border-top-style:none;' id='ChangeSearch'><span style='cursor:pointer' id='ChangeSearch1'>\u8c37\u6b4c</span>&nbsp;|<span style='color:#666666' id='ChangeSearch2'>&nbsp;\u767e\u5ea6&nbsp;</span></ul></div>";$("ChangeSearch1").attachEvent("onclick",function(){searchname="google";g();$("inputtext").focus()})}};if(IE()){if($("gsuggest")){$("gsuggest").removeNode(true)}}else{if($("gsuggest")){$("gsuggest").parentNode.removeChild($("gsuggest"))}}if(document.readyState=="complete"){var l=document.body.appendChild(document.createElement("script"));l.language="javascript";l.id="gsuggest";if(searchname=="google"){l.charset="utf-8";l.src="http://www.google.cn/complete/search?hl=zh-CN&client=suggest&js=true&q="+encodeURIComponent(e.value)+"&r="+Math.random()}else{l.charset="gb2312";l.src="http://suggestion.baidu.com/su?wd="+encodeURIComponent(e.value)+"&r="+Math.random()}}else{return}}else{k.style.visibility="hidden"}}};function CreateHtml(){this.Separate="{{[|]}}.";this.Class=new Array();this.Image=new Array();this.Image["\u8c37\u6b4c"]="google.gif";this.Class["\u8c37\u6b4c"]=new Array(["Google\u641c\u7d22","http://www.google.cn/search","q","hl=zh-CN","utf-8"]);this.Image["\u767e\u5ea6"]="baidu.gif";this.Class["\u767e\u5ea6"]=new Array(["Baidu\u641c\u7d22","http://www.baidu.com/s","wd"," ","gb2312"]);this.Image["\u7f51\u9875"]="web.gif";this.Class["\u7f51\u9875"]=new Array(["\u8c37\u6b4c\u641c\u7d22","http://www.google.cn/search","q","hl=zh-CN","utf-8"],["\u767e\u5ea6\u641c\u7d22","http://www.baidu.com/s","wd"," ","gb2312"],["\u96c5\u864e\u641c\u7d22","http://one.cn.yahoo.com/s","p","v=web","utf-8"],["\u6709\u9053\u641c\u7d22","http://www.youdao.com/search","q","ue=gb2312","gb2312"]);this.Image["\u8d44\u8baf"]="zixun.gif";this.Class["\u8d44\u8baf"]=new Array(["\u8c37\u6b4c\u8d44\u8baf","http://news.google.cn/news/search","q","hl=zh-CN","utf-8"],["\u767e\u5ea6\u65b0\u95fb","http://news.baidu.com/ns","word","","gb2312"],["\u96c5\u864e\u8d44\u8baf","http://one.cn.yahoo.com/s","p","v=news;pid=hp","utf-8"]);this.Image["\u89c6\u9891"]="shipin.gif";this.Class["\u89c6\u9891"]=new Array(["\u767e\u5ea6\u89c6\u9891","http://video.baidu.com/v","word"," ","gb2312"],["\u8c37\u6b4c\u89c6\u9891","http://video.google.cn/videosearch","q","hl=zh-CN","utf-8"],["\u4f18\u9177\u7f51","http://so.youku.com/search_video","q","searchdomain=http://so.youku.com;searchType=video","utf-8"],["\u571f\u8c46\u7f51","http://so.tudou.com/isearch.do","kw","","gb2312"]);this.Image["\u56fe\u7247"]="tupian.gif";this.Class["\u56fe\u7247"]=new Array(["\u8c37\u6b4c\u56fe\u7247","http://images.google.cn/images","q","hl=zh-CN","utf-8"],["\u767e\u5ea6\u56fe\u7247","http://image.baidu.com/i","word","tn=baiduimage;lm=-1;ct=201326592;z=0;cl=2","gb2312"],["\u641c\u641c\u56fe\u7247","http://image.soso.com/image.cgi","w","sc=img;ch=s.p.nores.i;pid=p.nores.i;ity=0;","gb2312"],["\u96c5\u864e\u56fe\u7247","http://one.cn.yahoo.com/s","p","v=image","utf-8"]);this.Image["\u97f3\u4e50"]="yinyue.gif";this.Class["\u97f3\u4e50"]=new Array(["\u767e\u5ea6\u97f3\u4e50","http://mp3.baidu.com/m","word","tn=baidump3;f=ms;ct=134217728;","gb2312"],["\u8c37\u6b4c\u97f3\u4e50","http://www.google.cn/music/search","q","","utf-8"],["\u96c5\u864e\u97f3\u4e50","http://one.cn.yahoo.com/s","p","v=music","utf-8"],["\u641c\u72d7\u97f3\u4e50","http://mp3.sogou.com/music.so","query","","gb2312"]);this.Image["\u8f6f\u4ef6"]="ruanjian.gif";this.Class["\u8f6f\u4ef6"]=new Array(["\u8fc5\u96f7\u5728\u7ebf","http://soft.gougou.com/search","search","restype=2","utf-8"],["\u534e\u519b\u8f6f\u4ef6","http://search.newhua.com/search.asp?","Keyword","","gb2312"],["\u5929\u7a7a\u8f6f\u4ef6","http://www.skycn.com/search.php","ss_name","","gb2312"],["\u970f\u51e1\u8f6f\u4ef6","http://search.crsky.com/search.asp","keyword","sType=ResName","gb2312"]);this.Image["\u8d2d\u7269"]="gouwu.gif";this.Class["\u8d2d\u7269"]=new Array(["\u6dd8\u5b9d\u7f51","http://search1.taobao.com/browse/search_auction.htm?at_topsearch=1&ssid=s1-e","q","","gb2312"],["\u62cd\u62cd\u7f51","http://search.paipai.com/cgi-bin/comm_search","KeyWord","keywordtype=goods;sf=5","gb2312"],["\u767e\u5ea6\u6709\u554a","http://youa.baidu.com/search/s","keyword"," ","gb2312"],["\u6613\u8da3\u7f51","http://search.eachnet.com/Search","keyword","","utf-8"]);this.Image["\u77e5\u9053"]="zhidao.gif";this.Class["\u77e5\u9053"]=new Array(["\u767e\u5ea6\u77e5\u9053","http://zhidao.baidu.com/q","word","tn=ikaslist;fr=search;ie=utf-8;rn=10;ct=17","gb2312"],["\u96c5\u864e\u77e5\u8bc6\u5802","http://search.cn.yahoo.com/s","p","v=ks;pid=hp","utf-8"],["\u641c\u641c\u95ee\u95ee","http://wenwen.soso.com/z/SearchSolved.e","sp","","utf-8"],["\u7231\u95ee\u77e5\u8bc6\u4eba","http://iask.sina.com.cn/search_engine/search_knowledge_engine.php","key","","gb2312"])}CreateHtml.prototype.title=function(a){var b="<table style='width:950px;font-size:12px'><tr>";for(x in this.Class){if(x==a){b+="<td class='title' style='border:solid 2px #1287c2;font-size:14px;font-weight:bold;'>"+x+"</td><td class='title-line'>|</td>"}else{b+="<td class='title' onclick='IndexObj.WriteHtml(\""+x+"\")'>"+x+"</td><td class='title-line'>|</td>"}}b+="<td style='width:360px;text-align:right'><img src='images/searchbg.gif'></td>";b+="</tr></table>";return b};CreateHtml.prototype.content=function(a){var d="";d+="<table style='width:950px;'cellpadding='0' cellspacing='0'><td><img src='images/search_left.jpg'></td><td style='width:931px;background-image:url(images/search_bg.jpg)' align='left'>";d+="<table><tr><td style='width:15px'></td><td style='color:#ffffff;font-weight:bold'>\u7f51\u9875\u641c\u7d22</td> <td style='width:10px'></td>        <td><input type='text' style='width:400px;height:22px;border:solid 1px #eead99' id='inputtext' onfocus='sou(\"inputtext\",\"searchlist\",true)'></td><td>";d+="<table><tr>";for(var b=0;b<this.Class[a].length;b++){d+="<td style='width:8px'></td><td><input type='button' value='"+this.Class[a][b][0]+"' class='s_button' onclick='NewFrom.TSubmit(\""+this.Class[a][b][2]+'",$("inputtext").value,"'+this.Class[a][b][1]+'","'+this.Class[a][b][3]+'","'+this.Class[a][b][4]+"\")'></td>"}d+="</tr></table>";d+="</td></tr><tr><td></td><td></td><td></td><td id='searchlist'></td><td></td></tr></table>";d+="</td><td><img src='images/search_right.jpg'></td></tr></table>";return d};CreateHtml.prototype.WriteHtml=function(a){$("titles").innerHTML=this.title(a);$("contents").innerHTML=this.content(a)};
