//bd - baidu,gg - google,d:search input default name,l:a link,a:action,p:hidden input
var Search={
bd:[{d:"word"},
{l:"www.baidu.com/index.php?tn=siteye1001_pg",a:"www.baidu.com/s",p:{tn:"siteye1001_pg",ct:"",lm:-1,kw:""}},
{l:"mp3.baidu.com",a:"mp3.baidu.com/m",p:{ct:134217728,lm:-1}},
{l:"image.baidu.com",a:"image.baidu.com/i",p:{ct:201326592,lm:-1}},
{l:"video.baidu.com",a:"video.baidu.com/v",p:{ct:301989888}},
{l:"zhidao.baidu.com/q?word=&ct=17&pn=0&tn=ikaslist&rn=10&pt=9991com_ik",a:"zhidao.baidu.com/q",p:{tn:"ikaslist",pt:"9991com_ik",ct:17,lm:"",kw:""}},
{l:"www.taobao.com",a:"search8.taobao.com/browse/search_auction.htm?pid=mm_12351394_0_0",p:{w:"q",pid:"mm_12351394_0_0"}},
{l:"news.baidu.com",a:"news.baidu.com/ns",p:{ct:"news"}}],
gg:[{d:"q"},
{l:"www.google.cn/search?client=aff-9991&hl=zh-CN&channel=searchlink",a:"www.google.cn/search",p:{client:"aff-9991",ie:"GB2312",oe:"utf8",hl:"zh-CN",channel:"searchbutton"}},
{l:"www.google.cn/music/homepage",a:"www.google.cn/music/search",p:{ie:"GB2312"}},
{l:"images.google.cn/images?client=aff-9991&hl=zh-CN&channel=searchlink",a:"images.google.cn/images",p:{}},
{l:"video.google.cn/videosearch?client=aff-9991&hl=zh-CN&channel=searchlink",a:"video.google.cn/videosearch",p:{}},
{l:"wenwen.soso.com",a:"wenwen.soso.com/z/SearchSolved.e",p:{w:"sp",ie:"GB2312"}},
{l:"gouwu.youdao.com/search",a:"gouwu.youdao.com/search",p:{}},
{l:"news.soso.com",a:"news.soso.com/n.q",w:"w",p:{sc:"news",ty:"c"}}]
};
//don't modify
function setVal(a,b,c){var d=$("_i"+a);if(!d){d=$c("INPUT");d.type="hidden";d.id="_i"+a;c.appendChild(d)}d.name=a;d.value=b};sh=function(a){if(a!=tab){if(typeof allCount!="undefined"){allCount("sh("+a+")");}$("lt"+a).className="active";$("lt"+tab).className="";var b=Search.bd[a];var c=Search.gg[a];$("srh_a").href='http://'+b.l;$("gl_a").href="http://"+c.l;_bf.action="http://"+b.a;_gf.action="http://"+c.a;var d=$("bdi");d.innerHTML="";for(key in b.p){if(key=="w")continue;setVal(key,b.p[key],d)}var e=$("gi");e.innerHTML="";for(key in c.p){if(key=="w")continue;setVal(key,c.p[key],e)}$('search1').name=b.w||Search.bd[0].d;$('search2').name=c.w||Search.gg[0].d;if(a!=1){$("search1").setAttribute("autocomplete","on");$("search2").setAttribute("autocomplete","on")}else{$('search1').setAttribute("autocomplete",g_cookie("auto1")=="0"?"on":"off");$('search2').setAttribute("autocomplete",g_cookie("auto2")=="0"?"on":"off")}$('gl_i').src='images/gl_'+a+'b.gif';$('srh_i').src='images/srh_'+a+'b.gif';_bf.word.focus();_bf.word.select();tab=a}var f=STxt[a],sTxt=getA(f[0].h,f[0].t,f[0].c);for(var g=1;g<f.length;g++){sTxt+=(g==1?(f[0].s1||STxt[0][0].s1):(f[0].s2||STxt[0][0].s2))+getA(f[g].h,f[g].t,f[g].c)}$("stxt").innerHTML=sTxt};sh(stab);