var w=window,d=document,n=navigator,k=d.f.wd,a=d.getElementById("nv").getElementsByTagName("a"),isIE=n.userAgent.indexOf("MSIE")!=-1;if(!isIE||window.opera){d.getElementById("st").style.display="none"}for(var i=0;i<a.length;i++){a[i].onclick=function(){if(k.value.length>0){var C=this,A=C.href,B=encodeURIComponent(k.value);if(A.indexOf("q=")!=-1){C.href=A.replace(/q=[^&$]*/,"q="+B)}else{this.href+="?q="+B}}}}(function(){if(/q=([^&]+)/.test(location.search)){k.value=decodeURIComponent(RegExp.$1)}})();if(n.cookieEnabled&&!/sug?=0/.test(d.cookie)){d.write('<script src=http://www.baidu.com/js/bdsug.js?v=1.0.3.0><\/script>')}function addEV(C,B,A){if(w.attachEvent){C.attachEvent("on"+B,A)}else{if(w.addEventListener){C.addEventListener(B,A,false)}}}function G(A){return d.getElementById(A)}var bdimeHW={};var imeTar="kw";var ime_t1=(new Date()).getTime();(function(){var O=G("mCon"),A=G("mMenu");var B=["ÊäÈë·¨","ÊÖÐ´","Æ´Òô"],Q=["cl","hw","py"],D=["","http://www.baidu.com/hw/hwInput_1.1.js","http://www.baidu.com/olime/bdime.js"],P=[0,0,0];var N=n.cookieEnabled;if(N&&/\bbdime=(\d)/.test(d.cookie)){H(Q[RegExp.$1],false)}var M=A.getElementsByTagName("a");for(var I=0;I<M.length;I++){M[I].onclick=F}if(isIE){var E=[];var R=O.getElementsByTagName("*");for(var I=0;I<R.length;I++){E.push(R[I])}E.push(O);var R=A.getElementsByTagName("*");for(var I=0;I<R.length;I++){E.push(R[I])}E.push(A);for(var I=0;I<E.length;I++){E[I].setAttribute("unselectable","on")}}else{try{var L=k.value.length;k.selectionStart=L;k.selectionEnd=L;bdimeHW.hasF=1}catch(K){}}function F(){ime_t1=(new Date()).getTime();var S=this.name.split("_")[1];if(w.bdime){bdime.control.closeIme()}H(S,true);return false}function H(W,S){var V=0;if(W==Q[1]){V=1;O.innerHTML='<span id="imeS" class="hw">'+B[1]+"</span>";if(isIE){G("imeS").setAttribute("unselectable","on")}function U(){if(!P[1]){if(d.selection&&d.activeElement.id&&d.activeElement.id=="kw"){bdimeHW.hasF=1}bdimeHW.input=imeTar;bdimeHW.submit="su";J(D[1]);setTimeout(function(){if(bdsug){bdsug.sug.initial()}},1000);P[1]=1}else{bdimeHW.reload(S)}}if(S){U()}else{addEV(G("imeS"),"click",U)}}else{if(W==Q[2]){V=2;O.innerHTML="<span>"+B[2]+"</span>";if(!P[2]){J(D[2]);P[2]=1}else{if(w.bdime){bdime.control.openIme()}}}else{O.innerHTML="<span>"+B[0]+"</span>"}}if(S&&N){var T=new Date();T.setTime(T.getTime()+365*24*3600*1000);d.cookie="bdime="+V+";domain=baidu.com;path=/;expires="+T.toGMTString()}}function J(S){if(S){var T=d.createElement("script");T.src=S;d.getElementsByTagName("head")[0].appendChild(T)}}function C(T){var T=T||window.event;var S=T.target||T.srcElement;A.style.display=S.id=="mCon"&&A.style.display!="block"?"block":"none"}addEV(d,"click",C)})();addEV(w,"load",function(){k.focus()});w.onunload=function(){};</script>