var w=window,d=document,n=navigator,k=d.f.wd,a=d.getElementById("nv").getElementsByTagName("a");if(n.userAgent.indexOf("MSIE")==-1||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 o=this,h=o.href,q=encodeURIComponent(k.value);if(h.indexOf("q=")!=-1){o.href=h.replace(/q=[^&$]*/,"q="+q)}else{this.href+="?q="+q}}}};(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>')};if(w.attachEvent){w.attachEvent("onload",function(){k.focus();})}else{w.addEventListener('load',function(){k.focus()},true)};w.onunload=function(){};var hw={};hw.i=d.getElementById("sx");var il=false;if(/msie (\d+\.\d)/i.test(n.userAgent)){hw.i.setAttribute("unselectable","on")}else{var sL=k.value.length;k.selectionStart=sL;k.selectionEnd=sL}hw.i.onclick=function(B){var B=B||w.event;B.stopPropagation?B.stopPropagation():(B.cancelBubble=true);if(d.selection&&d.activeElement.id&&d.activeElement.id=="kw"){hw.hasF=1}else{if(!d.selection){hw.hasF=1}}if(!il){var A=d.createElement("script");A.setAttribute("src","http://www.baidu.com/hw/hwInput.js");d.getElementsByTagName("head")[0].appendChild(A);il=true;setTimeout(function(){if(baidu){baidu.sug.initial()}},1000)}};