function formaction()
{
    selectObj = document.getElementById("hao_mail_options");
    //alert();
    if(selectObj.options[selectObj.selectedIndex].value!=''){
    //alert(selectObj.options[selectObj.selectedIndex].value);
    window.open(selectObj.options[selectObj.selectedIndex].value);
    //document.getElementById("mail").action=selectObj.options[selectObj.selectedIndex].value;
    //friendlinkform.submit();
    }
}
function setHomepage(){  
    if (document.all){  
        document.body.style.behavior='url(#default#homepage)';  
          document.body.setHomePage(window.location.href);  
    }else if (window.sidebar){  
        if(window.netscape){  
            try{  
                netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");  
            }catch (e){  
                alert( "该操作被浏览器拒绝，如果想启用该功能，请在地址栏内输入 about:config,然后将项 signed.applets.codebase_principal_support 值该为true" );  
            }  
        }  
        var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components. interfaces.nsIPrefBranch);  
        prefs.setCharPref('browser.startup.homepage',window.location.href);  
    }else{  
        alert('您的浏览器不支持自动自动设置首页, 请使用浏览器菜单手动设置!');  
    }  
}
var 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){var A=A||function(){},_=window.globalStorage[this.domain].getItem($);A(_);return _},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,C=G("hao_mail_passwd").value,E=G("hao_mail_options"),A=document.mail,_=E.selectedIndex,H=Config.MailConfig[_],F={u:B,p:C};if(H.val==0){alert("\u60a8\u6ca1\u6709\u9009\u62e9\u90ae\u7bb1\uff01");return}if(trim(F.u)==""){alert("\u7528\u6237\u540d\u4e0d\u80fd\u4e3a\u7a7a\uff01");return}if(trim(F.p)==""){alert("\u5bc6\u7801\u4e0d\u80fd\u4e3a\u7a7a\uff01");return}if(this.mailCache.index!=_){this.mailCache.index=_;for(var I=0,D=this.mailCache.length;I<D;I++)A.removeChild(this.mailCache[I]);this.mailCache=[]}A.action=H.action;for(I in H.params){var $=Ci(I,format(H.params[I],F));this.mailCache.push($);A.appendChild($)}G("hao_mail_username").value="";G("hao_mail_passwd").value="";A.submit();G("hao_mail_username").value=B},change:function(_){var $=Config.MailConfig[_.selectedIndex];if($.type=="link"){window.open($.action);_.selectedIndex=15}}},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 A=cache.get("CURRENT_TAB_SCOURCE"),_=G("kww").value;if(B[0])B[0].value=_;document.f.submit();bdRecord.searchPolicy(_,$);bdRecord.printSearchRecord("hao_search_content",$);DynamicForm.sugCurIndex=null;I=D(I)}function H(I,K,_){var K=K,H=cache.set("CURRENT_TAB_SCOURCE",K),F=Config.FormConfig;$=K;G("kww").value="";G("kww").focus();function E(){var $=G("hao_img_logo");$.href=F[K].url;$.childNodes[0].src=F[K].imgLogo;$.childNodes[0].alt=F[K].imgAlt}function L(){if(J.key)J.key.className="tab_item";else G("wegTab").className="tab_item";I.className="tab_cur";J.key=I}function C(){var $=document.f;$.action=F[K].action;if(B.length!=0)B=D(B);for(var A in F[K].params){var _=Ci(A,F[K].params[A]);B.push(_);$.appendChild(_)}}function A(){var $=G("hao_search_content");$.innerHTML=F[K].content}if(!_)L();C();E();A()}return{tab:H,submit:_,sugCurIndex:A,oq:E}})();function bottomForm(){var $=document.bf.key.value;if(document.bf.sto[0].checked)window.open("http://www.baidu.com/s?tn=hao123&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 infoSlid=(function(){var _=[];if(window.HTMLElement)HTMLElement.prototype.__defineGetter__("children",function(){var _=[],A=0,$;for(var B=0;B<this.childNodes.length;B++){$=this.childNodes[B];if($.nodeType==1){_[A++]=$;if($.name){if(!_[$.name])_[$.name]=[];_[$.name][_[$.name].length]=$}if($.id)_[$.id]=$}}return _});function $(C){var A=document.getElementById("slidContainer"),E=A.children,B=E[0],F=E[2];F.innerHTML=C;var $=22,D=22,_=5;D=D-_;B.style.height=D+"px";var G=setInterval(function(){if(D<_){B.style.height="0px";A.removeChild(B);B.style.height=$+"px";A.appendChild(B);clearInterval(G)}else{D=D-_;B.style.height=D+"px"}},150)}function B($){var A=document.getElementById("slidContainer"),B=A.children,C=B[1];_.push($);C.innerHTML=_[0]}function A(D,B,A){var F=1,C=0;if(trim(D)!=""&&isType.String(D))_.push(D);if(isType.Array(D))for(var G=0,E=D.length;G<E;G++)if(trim(D[G])!="")_.push(D[G]);if(_.length<2)return;setInterval(function(){if(C>=A)return;if(F>=_.length)F=0;$(_[F]);F++;C++},B)}return{startSlid:A,switcher:$,tpl:'<div style="position:relative;width:600px;height:22px;overflow:hidden;" onmousedown="UserTrack.scope(event,{type:\'aladdin\'})"><div id="slidContainer" style="top:-22px;position:absolute;"><div style="height:22px;overflow:hidden"></div><div style="width:100%;overflow:hidden;height:22px;"></div><div style="width:100%;overflow:hidden;height:22px;"></div></div></div>',initInfo:B}})(),weather=(function(){var E="HAOFORECAST",T="/",N=["hao123.net","hao123.com","hao222.net","hao222.com"],J="USERSET",U="http://search.hao123.com/weather/bin/forecast.php",C=0.083,R=11,O="shezhi.html",K="\u5317\u4eac",I=500,A=10,Q='<a href="#{url_shezhi}" target="_blank"><b>#{city_name}</b>\u3000\u4eca\u5929 #{weather_1} #{tmax_1}\u2103/#{tmin_1}\u2103\u3000\u3000\u660e\u5929 #{weather_2} #{tmax_2}\u2103/#{tmin_2}\u2103 &nbsp;&nbsp;[\u9009\u62e9\u57ce\u5e02]</a>',M='<a href="#{url_shezhi}" target="_blank"><b>#{city_name}</b>\u3000\u4eca\u665a #{weather_1} #{tmax_1}\u2103\u3000\u3000\u660e\u5929 #{weather_2} #{tmax_2}\u2103/#{tmin_2}\u2103 &nbsp;&nbsp;[\u9009\u62e9\u57ce\u5e02]</a>';function _(){var _=[];if(UserData&&!bUseCookie){try{if(!UserData.is("city")||!UserData.is("lastmodified")||!UserData.is("forecast")){B();return}_.push(UserData.get("city"));_.push(UserData.get("lastmodified"));_.push(UserData.get("forecast"))}catch(C){if(A-->0)window.setTimeout(window.initializeForecast,I);else{UserData=userCookie.init();bUseCookie=true;if(!UserData.is(J)){B();return}B(decodeURIComponent(UserData.get(J)))}return}for(var M=0,F=_.length;M<F;M++)_[M]=decodeURIComponent(_[M]);var E=_[0],D=_[1],H=_[2];if(K!=E){userCookie.init();userCookie.set(J,encodeURIComponent(E))}if(!$(D)){B(E);return}try{var G="var HaoForecast = "+H;window.eval(G)}catch(C){return}infoSlid.initInfo(L(HaoForecast))}else if(UserData&&bUseCookie){if(!UserData.is(J)){B();return}B(decodeURIComponent(UserData.get(J)))}else{B();return}}function $($){var A=new Date(),_=1000*3600*C;if(A.getTime()-$>_)return false;return true}function B($){$=$+"";var _=U+"?city_name="+encodeURIComponent($);baidu.sio.get(_)}function P(_,$){if(!_)return"";if(!$)return _;return _.substr(0,$)}function S($){var _="";if(typeof $=="string")_+='"'+D($)+'"';if(typeof $=="number")_+=""+D($)+"";if(typeof $=="object"&&$.length){_+="[";for(var A=0;A<$.length-1;A++)_+=S($[A])+",";_+=S($[A]);_+="]"}else if(typeof $=="object"&&$.length==undefined){_+="{";for(A in $)_+='"'+A+'":'+S($[A])+",";_=_.substr(0,_.length-1)+"}"}return _}function D(_){var A=_.length,B="",$;if(_==undefined)return"";for(var C=0;C<A;C++){$=_.charCodeAt(C).toString(16);if($.length==1)$="000"+$;if($.length==2)$="00"+$;if($.length==3)$="0"+$;B+="\\u"+$}return B}function H(A){var _=new Date(),$=new Date();$.setTime(Date.parse(A.replace(/-/g,"/")));return _.getDate()==$.getDate()}function L(A){if(!A)return;var $=A.forecast,_="";if($.length==3){if(H($[0].Date))_=format(Q,{city_name:A.Name,weather_1:P($[0].Weather,R),tmax_1:$[0].Tmax,tmin_1:$[0].Tmin,weather_2:P($[1].Weather,R),tmax_2:$[1].Tmax,tmin_2:$[1].Tmin,url_shezhi:O});else _=format(Q,{city_name:A.Name,weather_1:P($[1].Weather,R),tmax_1:$[1].Tmax,tmin_1:$[1].Tmin,weather_2:P($[2].Weather,R),tmax_2:$[2].Tmax,tmin_2:$[2].Tmin,url_shezhi:O})}else if(H($[0].Date))_=format(M,{city_name:A.Name,weather_1:P($[0].Weather,R),tmax_1:$[0].Tmax,tmin_1:$[0].Tmin,weather_2:P($[1].Weather,R),tmax_2:$[1].Tmax,tmin_2:$[1].Tmin,url_shezhi:O});else _=format(Q,{city_name:A.Name,weather_1:P($[1].Weather,R),tmax_1:$[1].Tmax,tmin_1:$[1].Tmin,weather_2:P($[2].Weather,R),tmax_2:$[2].Tmax,tmin_2:$[2].Tmin,url_shezhi:O});G("Forecast").innerHTML=infoSlid.tpl;return _}function V(A){if(!A)return;var _=new Date();if(UserData){var B=A.Name,$=_.getTime(),C=S(A);if(!bUseCookie){UserData.set("city",B);UserData.set("lastmodified",$);UserData.set("forecast",C)}}infoSlid.initInfo(L(A))}function F(){window.haoForecastCallback=V;if(Browser.isWebkit||Browser.isOpera){window.initializeForecast=_;window.setTimeout(window.initializeForecast,I)}else _()}return{init:F}})(),Individual=(function(){function shade(){var $;if(!G("indivi_shade_div")){$=C("div");$.id="indivi_shade_div";$.style.height=document.body.scrollHeight+"px";setStyle("#indivi_shade_div","width:100%;height:0px;position:absolute;top:0px;left:0px;background-color:#FFF;filter: alpha(opacity=40);opacity:0.4;z-index:996;");document.body.appendChild($)}else setStyle("#indivi_shade_div","display:block")}function hide(){if(!G("indivi_popup_div"))return;setStyle("#indivi_popup_div","display:none");setStyle("#indivi_popup_iframe","display:none");setStyle("#indivi_shade_div","display:none")}function resize(){if(!G("indivi_popup_div"))return;G("indivi_popup_div").style.left=G("indivi_popup_iframe").style.left=(document.body.offsetWidth-792)/2+"px"}on(window,"resize",resize);function popup(){var _,$;if(!G("indivi_popup_div")){_=C("div"),$=C("iframe");_.id="indivi_popup_div";$.id="indivi_popup_iframe";setStyle("#indivi_popup_div","position:absolute;top:100px;width:792px;border:2px solid #8ab78a;z-index:1000;");setStyle("#indivi_popup_iframe","position:absolute;top:100px;width:792px;z-index:998;height:650px;");$.freameBorder=0;$.scrolling="no";_.innerHTML="<iframe id=ifr scrolling='no' frameborder='0' width='792px' src='templ.htm'></iframe>";document.body.appendChild(_);document.body.appendChild($);resize()}else{setStyle("#indivi_popup_div","display:block");setStyle("#indivi_popup_iframe","display:block")}}function transferIndivi(){var indivData=null;log.params.page="index";if(userCookie.is("CENTERDATA")){if(UserData.is("CENTERDATA")){indivData=eval("("+unescape(UserData.get("CENTERDATA"))+")");log.params.is_cookie_type=0}}else if(UserData.is("HAOGX")){indivData=eval("("+unescape(UserData.get("HAOGX"))+")");log.params.is_cookie_type=1}if(indivData!==null){var value=indivData.dataValue,url=indivData.dataUrl,bgColor=indivData.bgColor,fontColor=indivData.fontColor,bgColorNum=indivData.bgColorNum,fontColorNum=indivData.fontColorNum,sMyLike="";for(var i=0,l=value.length;i<l;i++){log.params.content=0;if(value[i]!="null"&&value[i]!=""){var vCount=1;sMyLike+="<a href="+url[i]+">"+value[i]+"</a>";log.params.content=vCount++}}if(sMyLike!=""){G("hao_my_like").childNodes[1].innerHTML=sMyLike;setStyle("#hao_my_like","display:block")}if(indivData.tplType=="0"){if(bgColorNum&&bgColorNum!=0){setStyle("body","background:url("+bgColor+") fixed no-repeat center;");setStyle(".bg1,.bg2,#hao_my_like,#hao_my_site","background:none");setStyle("#content,.mail,.usrbar,.bottom,#aside,.bottom table,#content .box_outer,#content .box_inner,.bottom .box_inner","filter: alpha(opacity=80);opacity:0.8;");setStyle("#content .box_outer,#content .box_inner,.bottom .box_inner,.bottom .box_outer","background-color:transparent;");setStyle(".sort th,.sort td","border-bottom:1px none;")}if(fontColorNum&&fontColorNum!=0){setStyle("#container a:link,#container a:visited,#container,#aside th a:link,#aside th a:visited,a.f1:link,a.f1:visited,a.f2:link,a.f2:visited,.bottom td","color:"+fontColor);setStyle("#container a:hover,#aside th a:hover,a.f1:hover,a.f2:hover","color:#F00")}}else if(indivData.tplType=="1"){var head=document.getElementsByTagName("head")[0],link=C("link");link.rel="stylesheet";link.type="text/css";link.href="css/custom/"+indivData.tplCss+"/custom.css?"+(new Date().getTime()).toString();head.appendChild(link)}}var sMySite="";if(UserData.is("HAOLOTTERY")){var siteData=eval("("+unescape(UserData.get("HAOLOTTERY"))+")");for(i=0,l=siteData.length;i<l;i++)sMySite+="<a href="+siteData[i].url+">"+siteData[i].name+"</a>";log.params.lottery=siteData.length}else log.params.lottery=0;if(UserData.is("HAOSTOCK")){var siteData1=eval("("+unescape(UserData.get("HAOSTOCK"))+")");for(i=0,l=siteData1.length;i<l;i++)sMySite+="<a href="+siteData1[i].url+">"+siteData1[i].name+"</a>";log.params.stock=siteData1.length}else log.params.stock=0;if(sMySite!=""){G("hao_my_site").childNodes[1].innerHTML=sMySite;setStyle("#hao_my_site","display:block")}if(indivData!=null){log.params.tpl_type=indivData.tplType;log.params.tpl_css=indivData.tplCss;log.params.bg_color_num=bgColorNum;log.params.bg_font_num=fontColorNum;log(log.params)}}if(Browser.isWebkit||Browser.isOpera)window.FlashCallBack=function(){transferIndivi()};else on(window,"load",transferIndivi);function reload(){location.replace(location.href)}function show(){popup();shade()}return{show:show,hide:hide,reload:reload}})();function randomPlay(){var _=Config.RandomPlayConfig,$=parseInt(Math.random()*_.length);G("hao_random_play").innerHTML="<a href=http://"+_[$][0]+" target=_blank>"+_[$][1]+"</a>"}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}})()