function delobj(obj){var e,dele;for(var i=0;i<obj.elements.length;i++){e = obj.elements[i];if(e.type=="hidden"){e.parentNode.removeChild(e);i=-1}}}
function addIt$(fm,nam,v){var ur=document.createElement('input');ur.type = "hidden";ur.name = nam;ur.value = v;fm.appendChild(ur)}
function mover(ob){ob.focus();ob.style.backgroundColor="#FFFFD8"}
function mout(ob){ob.style.backgroundColor="#FFFFFF"}
function mfocus(ob){ob.select()}
function $(ev){return document.getElementById(ev)}
function os(obj){return $(obj).style}
function regE(n,e,f){if(window.attachEvent)	n.attachEvent(e,f);	else n.addEventListener(e.replace(/^on/,''),f,false)}

var bdf=document.bdfm
cssver = "v=20110409";
taobaostr = "pid=mm_10601170_0_0&commend=all&search_type=auction&user_action=initiative&f=D9_5_1&at_topsearch=1&sort=&spercent=0";
googleUrl="http://www.365"+"j.com/Google.htm";
mainUrl="http://www.go2000.com/main.html";
var ssa={};
function addss(key,act,word,getstr,t){
	ssa[key]={};
	ssa[key]['q']=word;
	ssa[key]['link']="http://"+act+"?"+getstr+"&"+word+"=";
	ssa[key]['act']="http://"+act;
	ssa[key]['getstr'] = getstr;
	ssa[key]['t'] = t;
	ssa[key]['hothtm'] = '';
}
addss('web','www.baidu.com/baidu','word','tn='+bdtn,'百度一下');
addss('buy','search8.taobao.com/browse/search_auction.htm','q',taobaostr,'淘宝搜索');
addss('zd','zhidao.baidu.com/q','word','tn=ikaslist&pt=s565_ik&ct=17','百度一下');
addss('mp3','mp3.baidu.com/m','word','f=ms&rn=&tn=s565&ct=134217728&lm=-1','百度MP3');
addss('pic','image.baidu.com/i','word','tn='+bdtn+'&ct=201326592&lm=-1','百度一下');
addss('video','video.baidu.com/v','word','tn='+bdtn+'&ct=301989888&rn=20','百度一下');

var ech=function(i){return function(){Hover(i)}}
var ech2=function(i){return function(){ch(i)}}
var currTab = 'pic';
for (var ssai in ssa){regE($('lt'+ssai),'onclick',ech2(ssai));}
function ch(i) {
	delobj(bdf);
	if(i!=currTab) {
		ssrow = ssa[i];
		$('lt'+currTab).className=''
		$('lt'+i).className='checked'
		$('srh_a').href=ssrow['link'];
		$('srh_i').src='/img/ss/'+i+'.gif';
		bdf.action=ssrow['act'];
		if(ssrow['getstr']!=''){
			var getstr=ssrow['getstr'];
			getarr=getstr.split("&");
			gn=getarr.length;
			for (var gi=0; gi<gn; gi++){
				var gkv=getarr[gi].split("=");
				addIt$(bdf,gkv[0],gkv[1]);
			}
		}
		$('ssbutton').value=ssrow['t'];
	}
	$("q1").name=ssa[i]['q'];
	$("q1").focus();
	currTab = i;
}
ch('web');