var UA=(function(G,A){var H={ie:"msie",sf:"safari",tt:"tencenttraveler"},D={browser:"("+H.ie+"|"+H.sf+"|firefox|chrome|opera)",shell:"(maxthon|360se|theworld|se|theworld|greenbrowser|qqbrowser)",tt:"(tencenttraveler)",os:"(windows nt|macintosh|solaris|linux)"},B=function(_){var B=new RegExp(_+"\\b[ \\/]?([\\w\\.]*)","i"),$=A.match(B);return $?$.slice(1):["",""]},F=function(){var $=A.toLowerCase().indexOf("360chrome")>-1?!!1:!1,B;try{if(G.external&&G.external.twGetRunPath){B=G.external.twGetRunPath;if(B&&B.toLowerCase().indexOf("360se")>-1)$=!!1}}catch(_){$=!1}return $}(),C=function(){try{if(/(\d+\.\d)/.test(external.max_version))return parseFloat(RegExp.$1)}catch($){}}(),E=B(D.browser),_=B(D.shell),$=B(D.os);if(E[0].toLowerCase()===H.ie){if(F)_=["360se",""];else if(C)_=["maxthon",C];else if(_==",")_=B(D.tt)}else if(E[0].toLowerCase()===H.sf)E[1]=B("version")+"."+E[1];return{browser:E.join(","),shell:_.join(","),os:$.join(",")}})(window,navigator.userAgent),indexSetHome={config:{helpUrl:"http://www.hao123.com/redian/sheshouyef.htm",shell:{"360se":"02",maxthon:"03",se:"04",qqbrowser:"05",theworld:"10",greenbrowser:"12"},browser:{firefox:"ff",chrome:"08",opera:"09",safari:"11"}},set:function(C,G){var E=UA.browser.split(",")[0].toLowerCase(),_=UA.shell.split(",")[0].toLowerCase(),F=this.config,D=F.helpUrl,$="\u60a8\u7684\u6d4f\u89c8\u5668\u4e0d\u652f\u6301\uff0c\u8bf7\u624b\u52a8\u8bbe\u7f6e",B=function(){try{C.style.behavior="url(#default#homepage)";C.setHomePage(G)}catch(_){alert($)}};if(E==="msie"&&(!_||_==="tencenttraveler")){B();return false}else if(_&&F.shell[_]){D+="#"+F.shell[_];if(_==="maxthon"){try{if(external.max_version){window.open(D);return false}else{B();return false}}catch(A){B();return false}}else{window.open(D);return false}}else if(F.browser[E]){if(E==="chrome"){try{if(external.max_version){D+="#"+"03";window.open(D);return false}else{D+="#"+F.browser[E];window.open(D);return false}}catch(A){D+="#"+F.browser[E];window.open(D);return false}}else{D+="#"+F.browser[E];window.open(D);return false}}else{alert($);return false}},bind:function(_,B){_=typeof _==="string"?document.getElementById(_):_;if(_.href.indexOf("hao123.com")<0)return;B=B||_.href||window.location;var $=this,A=document.addEventListener?function($,A,_){$.addEventListener(A,_,!1)}:function($,A,_){$.attachEvent("on"+A,_)};A(_,"click",function(){$.set(_,B);return false});return this}},ieUserData={init:function(){this.defaultExps=365;this.input=C("input");this.input.type="hidden";this.input.id="ieuserdata";this.input.addBehavior("#default#userData");document.body.appendChild(this.input);return this},set:function($,A,_){this.input.load($);var B=new Date();_=_||this.defaultExps;B.setDate(B.getDate()+_);this.input.load($);this.input.expires=B.toUTCString();this.input.setAttribute("code",A);this.input.save($)},get:function(_,$){this.input.load(_);var $=$||function(){},A=this.input.getAttribute("code");$(A);return A},is:function(A,$){var _=this.get(A);return(_!=null&&_!="")?true:false},remove:function($){this.set($,false,-this.defaultExps)}},mozlliaStorage={init:function(){this.domain=getHost();return this},set:function(_,$){window.globalStorage[this.domain].setItem(_,$)},get:function(A,$){try{var $=$||function(){},B=window.globalStorage[this.domain].getItem(A)}catch(_){}$(B);return B},is:function(_){var $=this.get(_);return($!=null&&$!="")?true:false},remove:function($){window.globalStorage[this.domain].removeItem($)}},flashStorage=(function(){function $(){var _=document.createElement("span");_.style.position="absolute";_.style.display="block";var $='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="1" height="1" id="GlobalSharedObject">'+'<param name="movie" value="http://www.hao123.com/swf/SwfObject.swf?+'+new Date().getTime()+'" />'+'<param name="quality" value="low" />'+'<param name="flashvars" value="dbName=hao123&callbackName=FlashCallBack" />'+'<param name="wmode" value="transparent" />'+'<param name="swliveconnect" value="true" />'+'<param name="allowScriptAccess" value="always" />'+'<embed src="swf/SwfObject.swf?'+new Date().getTime()+'" flashvars="dbName=hao123&callbackName=FlashCallBack" quality="low" swLiveConnect="true" width="1" height="1" allowScriptAccess="always" wmode="transparent" name="GlobalSharedObject" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>'+"</object>";(document.body||document.documentElement).appendChild(_);_.innerHTML=$}function D(){return Browser.isIE?window.GlobalSharedObject:document.GlobalSharedObject}function C($,A){var _=D();_.set($,A)}function B($,A){var _=D(),A=A||function(){};data=_.get($);A(data);return data}function A(_){var $=B(_);return($!=undefined&&$!="")?true:false}function _($){C($,"")}return{init:$,set:C,get:B,is:A,remove:_}})(),userCookie={init:function($,B,A){var A=(A!==undefined)?A:365,_=new Date();_.setTime(_.getTime()+(86400*1000*A));this.domain=$||getHost();this.path=B||"/";this.expdate=_;this.time=A;return this},set:function(A,$,B){var _=this.expdate,B=B||this.domain;if(this.time==0)document.cookie=A+"="+$+";path="+this.path+";domain="+B;else document.cookie=A+"="+$+";expires="+_.toGMTString()+";path="+this.path+";domain="+B},get:function(C,_){var B=document.cookie.split(";"),C=C+"=",_=_||function(){};for(var $=0,A=B.length;$<A;$++)if(B[$].indexOf(C)!="-1"){var D=B[$].replace(C,"");_(D);return D}_(null);return null},is:function(_){var $=this.get(_);return($!=null&&$!="")?true:false},remove:function(_,$){$=$||this.domain;if(this.is(_))document.cookie=_+"="+((this.path)?"; path="+this.path:"")+((this.domain)?"; domain="+$:"")+"; expires=Thu, 01-Jan-70 00:00:01 GMT"}};if(!window.UserData){var UserData=null,bUseCookie=false;if(Browser.isIE)UserData=ieUserData.init();else if(Browser.isFF)UserData=mozlliaStorage.init();else if(Browser.isFlash){flashStorage.init();UserData=flashStorage}else if(Browser.isCookie){UserData=userCookie.init();bUseCookie=true}else alert("\u5bf9\u4e0d\u8d77\uff0c\u60a8\u7684\u6d4f\u89c8\u5668\u4e0d\u652f\u6301\u6570\u636e\u5b58\u50a8\uff0c\u8bf7\u5f00\u542fCookie\u6216\u5b89\u88c5flash6.0\u4ee5\u4e0a\u7248\u672c\uff01")}var MailLogin={mailCache:[],sendMail:function(){var B=G("hao_mail_username").value,D=G("hao_mail_passwd").value,F=G("hao_mail_options"),A=document.mail,_=F.selectedIndex,I=Config.MailConfig[_],H={u:B,p:D};if(I.val==0){alert("\u60a8\u6ca1\u6709\u9009\u62e9\u90ae\u7bb1\uff01");return}if(trim(H.u)==""){alert("\u7528\u6237\u540d\u4e0d\u80fd\u4e3a\u7a7a\uff01");return}if(trim(H.p)==""){alert("\u5bc6\u7801\u4e0d\u80fd\u4e3a\u7a7a\uff01");return}if(this.mailCache.index!=_){this.mailCache.index=_;for(var J=0,E=this.mailCache.length;J<E;J++)A.removeChild(this.mailCache[J]);this.mailCache=[]}A.action=I.action;for(J in I.params){var $=Ci(J,format(I.params[J],H));this.mailCache.push($);A.appendChild($)}G("hao_mail_username").value="";G("hao_mail_passwd").value="";A.submit();G("hao_mail_username").value=B;var C=G("hao_mail_options").selectedIndex;UserTrack.send({level:"1",page:"index",type:"mail",index:C})},change:function(_){var $=Config.MailConfig[_.selectedIndex];if($.type=="link"){UserTrack.send({level:"1",page:"index",type:"mail",index:_.selectedIndex});window.open($.action);_.selectedIndex=13}}},DynamicForm=(function(){var $="web";function D($){for(var A=0,_=$.length;A<_;A++)document.f.removeChild($[A]);return[]}var J={},B=[],A=null,I=[],E=null;function F(_,A){var D=C("input"),B=C("input"),$=C("input");D.type=B.type=$.type="hidden";D.name="oq",B.name="rsp",$.name="f";D.value=A;B.value=_-1;if(document.f.action=="http://zhidao.baidu.com/q")$.value="sug";else $.value="3";I.push(D);I.push(B);I.push($);document.f.appendChild(D);document.f.appendChild(B);document.f.appendChild($)}function _(){if(DynamicForm.sugCurIndex!=null)F(DynamicForm.sugCurIndex,DynamicForm.oq);if(DynamicForm.sugCurIndex==null&&I.length!=0)I=D(I);var C=cache.get("CURRENT_TAB_SCOURCE"),_=G("kww").value;if(B[0])B[0].value=_;document.f.submit();try{bdRecord.searchPolicy(_,$);bdRecord.printSearchRecord("hao_search_content",$)}catch(A){if(byId("content").offsetWidth==990)UserTrack.send({level:1,page:"index",type:"form"});else UserTrack.send({level:1,page:"indexk",type:"form"})}DynamicForm.sugCurIndex=null;I=D(I)}function H(N,H,_){var H=H,C=cache.set("CURRENT_TAB_SCOURCE",H),L=Config.FormConfig;$=H;var F=function(_,A){if(_.setSelectionRange){_.focus();_.setSelectionRange(A,A)}else if(_.createTextRange){var $=_.createTextRange();$.collapse(true);$.moveEnd("character",A);$.moveStart("character",A);$.select()}},M=G("kww"),K=M.value.length;F(M,K);function E(){var $=G("hao_img_logo");$.href=L[H].url;$.childNodes[0].src=L[H].imgLogo;$.childNodes[0].alt=L[H].imgAlt}function O(){if(J.key)J.key.className="tab_item";else G("wegTab").className="tab_item";N.className="tab_cur";J.key=N}function A(){var $=document.f;$.action=L[H].action;if(B.length!=0)B=D(B);for(var A in L[H].params){var _=Ci(A,L[H].params[A]);B.push(_);$.appendChild(_)}}function I(){var $=G("hao_search_content");$.innerHTML=L[H].content}if(!_)O();A();E();I()}return{tab:H,submit:_,sugCurIndex:A,oq:E}})();function bottomForm(){var $=document.bf.key.value;if(document.bf.sto[0].checked)if(byId("content").offsetWidth==990)window.open("http://www.baidu.com/s?tn=hao123&word="+$,"mspg6");else window.open("http://www.baidu.com/s?tn=sitehao123_1_pg&word="+$,"mspg6");if(document.bf.sto[1].checked)window.open("http://www.google.cn/search?hl=zh-CN&q="+$,"mspg4");if(document.bf.sto[2].checked)window.open("http://www.gougou.com/search?id=1&search="+$,"mspg1");if(document.bf.sto[3].checked)window.open("http://map.baidu.com/m?word="+$,"mspg14");if(document.bf.sto[4].checked)window.open("http://bk.baidu.com/?kw="+$+"&submit=search","mspg13");if(document.bf.sto[5].checked)window.open("http://search.hao123.com/search.php?query="+$,"mspg12");return false}function morePopup(_,A){var _=_||window.event,B=_.target||_.srcElement,C=G("hao_more_event"),$=G("hao_more_popup");switch(A){case"down":if($.style.display==""){C.border="1px solid #fff";$.style.display="none"}else{C.style.border="1px dotted #B0BEC7";$.style.display=""}if(_.stopPropagation)_.stopPropagation();else _.cancelBubble=true;break;case"over":C.style.border="1px solid #B0BEC7";break;case"out":C.style.border="1px solid #fff";break;case"click":setTimeout(function(){if($.style.display==""){C.border="1px solid #fff";$.style.display="none"}},200);break}}on(document.body,"mousedown",morePopup,"click");var indexWeather={init:function($,_){loadXSAjax({t:1,onsuccess:function(){if(typeof HaoForecast=="undefined"||HaoForecast==null)indexWeather.error();else indexWeather.show(HaoForecast)},onerror:function(){indexWeather.error()}})},show:function(B){var A=B.forecast,$="",_=isToday(A[0].Date)?0:1;if(A.length>3)$='<a target="_blank" href="shezhi.html"><b>'+B.Name+"</b>&nbsp;&nbsp;\u4eca\u665a&nbsp;"+A[_].Weather+A[_].Tmax;else $='<a target="_blank" href="shezhi.html"><b>'+B.Name+"</b>&nbsp;&nbsp;\u4eca\u5929&nbsp;"+A[_].Weather+A[_].Tmax+"\u2103/"+A[_].Tmin;$+="\u2103&nbsp;&nbsp;\u660e\u5929&nbsp;"+A[_+1].Weather+A[_+1].Tmax+"\u2103/"+A[_+1].Tmin+"\u2103&nbsp;&nbsp;[\u9009\u62e9\u57ce\u5e02]</a>";G("Forecast").innerHTML=$},error:function(){var $='<a href="javascript:void(0)" onclick="indexWeather.init(); return false" style="color:#999;">\u7531\u4e8e\u7f51\u7edc\u539f\u56e0\uff0c\u5929\u6c14\u52a0\u8f7d\u5931\u8d25...<b>\u70b9\u6b64\u91cd\u8bd5</b></a>';G("Forecast").innerHTML=$}};function byId($){return document.getElementById($)}function byTag($){return document.getElementsByTagName($)}function f(){return false}var theme={};theme.cookie={};theme.node={head:byTag("head")[0],init:function(B,A){var _={link:["rel","stylesheet"],style:["type","text/css"],script:["type","text/javascript"]},$={link:"href",script:"src"},C=null;if(byId(A))C=byId(A);else{C=document.createElement(B);C.id=A;C.setAttribute(_[B][0],_[B][1]);if(B!="style")C.setAttribute($[B],"about:blank");theme.node.head.appendChild(C)}return C},setStyle:function(_,$){if(_.styleSheet)_.styleSheet.cssText=$;else _.innerHTML=$},loader:{js:function(B,A,_,C){if(byId(A))_();else{var $=document.createElement("script");$.id=A;$.type="text/javascript";$.src=B;theme.node.head.appendChild($);$.onload=$.onreadystatechange=function(){if($.readyState&&$.readyState=="loading")return;_()};$.onerror=function(){theme.node.head.removeChild($);if(C)C()}}}}};theme.init=function(){theme.cookie.bgImg=trim(userCookie.get("bgImg")||"");theme.cookie.style=trim(userCookie.get("style")||"");theme.cookie.skinFolder=trim(userCookie.get("skinFolder")||"");var $=theme.cookie.skinFolder,_=theme.cookie.style,B=theme.cookie.bgImg,A=theme.node.init("link","themeLinkNode"),C=theme.node.init("style","userDefineStyleNode"),D="";D+=$||"";if(D.length>0)A.setAttribute("href","css/theme/skin/"+D+"/style.css");else{D+=_||"";if(D.length>0)A.setAttribute("href","css/theme/style/"+D+"/style.css");else A.setAttribute("href","about:blank")}if(B!="undefined"&&B!=null&&B.length>0)theme.node.setStyle(C,"body{background:url(images/bg/"+B+");}.left .box_outer, .bottom .box_outer,.box_body,.right .box_outer,.right .box_body,.bottom .box_outer,.bottom .box_body,.bg1,.bg2,#hao_my_like,#hao_my_site{background:none !important;}");else theme.node.setStyle(C,"")};theme.layer={show:function(){byId("themeLinkTip").style.display="none";theme.layer.btn=byId("btnTemple");theme.layer.wrap=byId("templeBox");theme.layer.box=byId("templeBoxContent");var $=theme.layer;$.btn.onclick=function(){return false};$.btn.style.cssText="background:#E6F4D0 url(images/theme_logo.gif) no-repeat 4px 5px; border-color:#DEE7F2;";$.btn.title="\u5173\u95ed\u66f4\u6362\u4e3b\u9898\u64cd\u4f5c\u6846";$.wrap.style.display="";if(!byId("loaderThemeScript")){$.loading=document.createElement("div");$.loading.id="templeBoxLoading";$.loading.innerHTML="\u6b63\u5728\u52a0\u8f7d\u4e2a\u6027\u5316\u6a21\u5757\uff0c\u8bf7\u7a0d\u5019...\u5982\u679c\u6301\u7eed\u65f6\u95f4\u8fc7\u957f\uff0c\u8bf7\u5237\u65b0\u91cd\u8bd5\uff01";$.wrap.appendChild($.loading);$.wrap.style.height="32px";theme.node.loader.js("js/theme.js?v=201106281200","loaderThemeScript",function(){setTimeout(function(){$.box.style.display="";$.wrap.removeChild($.loading);fx($.wrap,10,{height:250});byId("container").className="body_bg_down";document.body.className="body_bg_down";$.btn.onclick=theme.layer.control.hide},50)},function(){$.loading.innerHTML="\u53ef\u80fd\u56e0\u4e3a\u7f51\u901f\u592a\u6162\uff0c\u4e2a\u6027\u5316\u6a21\u5757\u52a0\u8f7d\u5931\u8d25\uff0c\u8bf7\u5237\u65b0\u9875\u9762\u91cd\u8bd5\uff01"})}else{$.box.style.display="";$.wrap.style.height="0px";fx($.wrap,10,{height:250});byId("container").className="body_bg_down";document.body.className="body_bg_down";$.btn.onclick=theme.layer.control.hide}}};theme.init();var bdRecord=(function(){var config={};config.recordClickNumber=10;config.recordClickWeight=5;config.recordClickShowNumber=10;config.recordSearchNumber=3;config.recordSearchWeight=2;config.recordSearchShowNumber=3;function scope(A,E,$){var A=A||window.event,C=A.target||A.srcElement,D={};if(C.tagName.toUpperCase()=="A"){var _=trim(sPurity(_(C.innerHTML)));if(_=="")return;D={anchor:encodeURIComponent(_),url:encodeURIComponent(C.href),count:0}}if(C.tagName.toUpperCase()=="AREA"){var B=trim(sPurity(_(C.alt)));D={anchor:encodeURIComponent(B),url:encodeURIComponent(C.href),count:0}}if(D.anchor==undefined||D.url==undefined)return;if(E)searchPolicy($,E);else clickPolicy(D)}function insertSort(C,$){var _,$=$||false;for(var B=1;B<C.length;B++){_=C[B];if($==false)for(var A=B;A>0&&_.count<C[A-1].count;A--)C[A]=C[A-1];else for(A=B;A>0&&_.count>C[A-1].count;A--)C[A]=C[A-1];C[A]=_}return C}function isClose($){if(userCookie.is("HAORECORDSTATUS")){var _=parseInt(userCookie.get("HAORECORDSTATUS"));if($=="click")if(_==1||_==3)return true;if($=="search")if(_==2||_==3)return true;return false}return false}function searchPolicy(v,tabType,isCode){if(isClose("search")||tabType!="web")return;v=trim(sPurity(sText(v))),v=isCode?v:encodeURIComponent(v);if(v==""||/(^https?)|(^ftp)/.test(v))return false;var aData=UserData.is("HAOSEARCHRECORD")?eval("("+UserData.get("HAOSEARCHRECORD")+")"):[],aData=insertSort(aData,true),isExist=false,params={anchor:v,count:0};for(var i=0;i<aData.length;i++){if(params.anchor==aData[i].anchor){aData[i].count+=1;aData=insertSort(aData,true);isExist=true;break}isExist=false}if(isExist==false){params.count=1;if(aData.length==config.recordSearchNumber)aData.splice(config.recordSearchWeight,1);aData.push(params)}UserData.set("HAOSEARCHRECORD",jsonToString(aData))}function clickPolicy(params){if(isClose("click"))return;var aData=UserData.is("HAORECORD")?eval("("+UserData.get("HAORECORD")+")"):[],aData=insertSort(aData,true),isExist=false;for(var i=0;i<aData.length;i++){if(params.url==aData[i].url&&params.anchor==aData[i].anchor){aData[i].count+=1;aData=insertSort(aData,true);isExist=true;break}isExist=false}if(isExist==false){params.count=1;if(aData.length==config.recordClickNumber)aData.splice(config.recordClickWeight-1,1);aData.push(params)}UserData.set("HAORECORD",jsonToString(aData))}function printSearchRecord(id,tabType){if(isClose("search")||tabType!="web")return;var aData=UserData.is("HAOSEARCHRECORD")?eval("("+UserData.get("HAOSEARCHRECORD")+")"):[],aDataLength=aData.length<config.recordSearchShowNumber?aData.length:config.recordSearchShowNumber;if(aDataLength==0)return;var tStr='<table><tr><td monkey="record_search" align=right >';for(var i=0;i<aDataLength;i++){var anchor=trim(sPurity(sText(decodeURIComponent(aData[i].anchor))));if(anchor=="")continue;var content=byteSlice(anchor,10);tStr+="<a onmousedown='bdRecord.searchPolicy(\""+anchor+'","web",true)\' href="http://www.baidu.com/s?word='+anchor+'&tn=comhao123" onmousedown="bdRecord.scope(event)">'+content+"</a>&nbsp;&nbsp;"}tStr+='</td><td align="center" width="50px" monkey="record_clear">'+'<a style="color:#205001" href="javascript:void(0)" onclick="bdRecord.close(\'search\');return false;">[\u6e05\u9664]</a><td><tr></table>';G(id).innerHTML=tStr;Config.FormConfig.web.content=tStr}function printClickRecord(id){if(isClose("click"))return;var aData=UserData.is("HAORECORD")?eval("("+UserData.get("HAORECORD")+")"):[],aDataLength=aData.length<config.recordClickShowNumber?aData.length:config.recordClickShowNumber;if(aDataLength==0)return;var tStr='<b style="color:#666">\u5feb\u6377\u8bbf\u95ee\uff1a</b>';for(var i=0;i<aDataLength;i++){var anchor=trim(sPurity(sText(decodeURIComponent(aData[i].anchor))));if(anchor=="")continue;tStr+='<a href="'+decodeURIComponent(aData[i].url)+'" >'+anchor+"</a>"}G(id).innerHTML=tStr+'<a style="color:#205001" href="javascript:void(0)" onclick="bdRecord.close(\'click\');return false;">[\u6e05\u9664]</a>';G(id).style.display="block"}function closeRecord(_){var $={click:1,search:2},A=0;userCookie.init();if(userCookie.is("HAORECORDSTATUS")){A=parseInt(userCookie.get("HAORECORDSTATUS"))+$[_];userCookie.set("HAORECORDSTATUS",A)}else if(_=="click"){userCookie.set("HAORECORDSTATUS","1");UserData.remove("HAORECORD")}else if(_=="search"){userCookie.set("HAORECORDSTATUS","2");UserData.remove("HAOSEARCHRECORD")}removeRecord(_)}function removeRecord($){switch($){case"click":UserData.remove("HAORECORD");G("BDRecord").style.display="none";break;case"search":UserData.remove("HAOSEARCHRECORD");G("hao_search_content").innerHTML="";break}}return{scope:scope,searchPolicy:searchPolicy,printSearchRecord:printSearchRecord,print:printClickRecord,remove:removeRecord,close:closeRecord}})()
