var Fe=Fe||{version:"20080809",emptyFn:function(){}};if(Object.prototype.propertyIsEnumerable){Fe.propertyIsEnumerable=function(A,B){return Object.prototype.propertyIsEnumerable.call(A,B)}}else{Fe.propertyIsEnumerable=function(A,C){if(C in A){for(var B in A){if(B==C){return true}}}return false}}Fe.isArray=function(A){return(A&&typeof A.length=="number"&&typeof A.splice!="undefined"&&!Fe.propertyIsEnumerable(A,"length"))};Fe.isObject=function(A){return(A&&(typeof (A)=="object"||typeof (A)=="function"))||false};Fe.trim=function(A){return A.replace(/(^[\s\t\xa0\u3000]+)|([\u3000\xa0\s\t]+$)/g,"")};Fe.format=function(I,K){if(arguments.length>1){var E=Fe.format,H=/([.*+?^=!:${}()|[\]\/\\])/g,F=(E.left_delimiter||"{").replace(H,"\\$1"),A=(E.right_delimiter||"}").replace(H,"\\$1");var C=E._r1||(E._r1=new RegExp("#"+F+"([^"+F+A+"]+)"+A,"g")),B=E._r2||(E._r2=new RegExp("#"+F+"(\\d+)"+A,"g"));if(typeof (K)=="object"){return I.replace(C,function(L,N){var M=K[N];if(typeof M=="function"){M=M(N)}return typeof (M)=="undefined"?"":M})}else{if(typeof (K)!="undefined"){var J=Array.prototype.slice.call(arguments,1);var D=J.length;return I.replace(B,function(L,M){M=parseInt(M,10);return(M>=D)?L:J[M]})}}}return I};Fe.format.delimiter=function(C,A){var B=Fe.format;B.left_delimiter=C||"{";B.right_delimiter=A||C||"}";B._r1=B._r2=null};Fe.each=function(E,A){if(typeof A!="function"){return E}if(E){if(E.length===undefined){for(var B in E){A.call(E[B],E[B],B)}}else{for(var C=0,D=E.length;C<D;C++){A.call(E[C],E[C],C)}}}return E};Fe.extend=function(F,D){if(F&&D&&typeof (D)=="object"){for(var E in D){F[E]=D[E]}var C=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"];for(var A=0,B;A<C.length;A++){B=C[A];if(Object.prototype.hasOwnProperty.call(D,B)){F[B]=D[B]}}}return F};Fe.Browser=(function(){var C=navigator.userAgent;var H=0,A=0,F=0,E=0;var D=0,I=0,B=0;if(typeof (window.opera)=="object"&&/Opera(\s|\/)(\d+(\.\d+)?)/.test(C)){A=parseFloat(RegExp.$2)}else{if(/MSIE (\d+(\.\d+)?)/.test(C)){H=parseFloat(RegExp.$1)}else{if(/Firefox(\s|\/)(\d+(\.\d+)?)/.test(C)){E=parseFloat(RegExp.$2)}else{if(navigator.vendor=="Netscape"&&/Netscape(\s|\/)(\d+(\.\d+)?)/.test(C)){B=parseFloat(RegExp.$2)}else{if(C.indexOf("Safari")>-1&&/Version\/(\d+(\.\d+)?)/.test(C)){F=parseFloat(RegExp.$1)}}}}}if(C.indexOf("Gecko")>-1&&C.indexOf("KHTML")==-1&&/rv\:(\d+(\.\d+)?)/.test(C)){I=parseFloat(RegExp.$1)}return{ie:H,firefox:E,gecko:I,netscape:B,opera:A,safari:F}})();window.FeBrowser=Fe.Browser;Fe.isGecko=(navigator.userAgent.indexOf("Gecko")>-1&&navigator.userAgent.indexOf("KHTML")==-1&&/rv\:(\d+(\.\d+)?)/.test(navigator.userAgent))?RegExp.$1:0;Fe.isStrict=(document.compatMode=="CSS1Compat");Fe.isIE=/MSIE (\d+(\.\d+)?)/.test(navigator.userAgent)?RegExp.$1:0;Fe.isFirefox=/Firefox(\s|\/)(\d+(\.\d+)?)/.test(navigator.userAgent)?RegExp.$2:0;Fe.isSafari=(navigator.userAgent.indexOf("Safari")>-1&&/Version\/(\d+(\.\d+)?)/.test(navigator.userAgent))?RegExp.$1:0;Fe.isWebkit=(navigator.userAgent.indexOf("KHTML")>-1&&/AppleWebKit\/([^\s]*)/.test(navigator.userAgent))?RegExp.$1:0;Fe.isOpera=(window.opera&&/Opera(\s|\/)(\d+(\.\d+)?)/.test(navigator.userAgent))?RegExp.$2:0;Fe.G=function(){for(var A=[],B=arguments.length-1;B>-1;B--){var C=arguments[B];A[B]=null;if(typeof C=="object"&&C&&C.dom){A[B]=C.dom}else{if((typeof C=="object"&&C&&C.tagName)||C==window||C==document){A[B]=C}else{if(typeof C=="string"&&(C=document.getElementById(C))){A[B]=C}}}}return A.length<2?A[0]:A};Fe.Q=function(E,D,B){if(typeof E!="string"||E.length<=0){return null}var J=[],B=(typeof B=="string"&&B.length>0)?B.toLowerCase():null,C=(Fe.G(D)||document);if(C.getElementsByClassName){Fe.each(C.getElementsByClassName(E),function(K){if(B!==null){if(K.tagName.toLowerCase()==B){J[J.length]=K}}else{J[J.length]=K}})}else{E=E.replace(/\-/g,"\\-");var A=new RegExp("(^|\\s{1,})"+Fe.trim(E)+"(\\s{1,}|$)"),H=(B===null)?(C.all?C.all:C.getElementsByTagName("*")):C.getElementsByTagName(B),F=H.length,I=F;while(F--){if(A.test(H[I-F-1].className)){J[J.length]=H[I-F-1]}}}return J};Fe.hide=function(){Fe.each(arguments,function(A){if(A=Fe.G(A)){A.style.display="none"}})};Fe.show=function(){Fe.each(arguments,function(A){if(A=Fe.G(A)){A.style.display=""}})};Fe.toggle=function(){Fe.each(arguments,function(A){if(A=Fe.G(A)){A.style.display=A.style.display=="none"?"":"none"}})};Fe.addClassName=function(C,D){if(!(C=Fe.G(C))){return }var A=C.className.split(" "),B=Fe.trim;if(!new RegExp("(^|\\s{1,})"+B(D)+"(\\s{1,}|$)").test(C.className)){C.className=B(A.concat(D).join(" "))}};Fe.ac=Fe.addClassName;Fe.removeClassName=function(B,C){if(!(B=Fe.G(B))){return }var A=Fe.trim,D=new RegExp("(^|\\s{1,})"+A(C)+"(\\s{1,}|$)","g");B.className=A(B.className.replace(D,"$2"))};Fe.rc=Fe.removeClassName;Fe.body=function(){var A=0,J=0,E=0,C=0,B=0,K=0;var F=window,D=document,I=D.documentElement;A=I.clientWidth||D.body.clientWidth;J=F.innerHeight||I.clientHeight||D.body.clientHeight;C=D.body.scrollTop||I.scrollTop;E=D.body.scrollLeft||I.scrollLeft;B=Math.max(D.body.scrollWidth,I.scrollWidth||0);K=Math.max(D.body.scrollHeight,I.scrollHeight||0,J);return{scrollTop:C,scrollLeft:E,documentWidth:B,documentHeight:K,viewWidth:A,viewHeight:J}};Fe.on=function(C,B,A){if(!(C=Fe.G(C))){return C}B=B.replace(/^on/,"").toLowerCase();if(C.attachEvent){C[B+A]=function(){A.call(C,window.event)};C.attachEvent("on"+B,C[B+A])}else{C.addEventListener(B,A,false)}return C};Fe.un=function(C,B,A){if(!(C=Fe.G(C))){return C}B=B.replace(/^on/,"").toLowerCase();if(C.attachEvent){C.detachEvent("on"+B,C[B+A]);C[B+A]=null}else{C.removeEventListener(B,A,false)}return C};Fe.css=function(C,H){if(!C||!H){return null}C=typeof C=="string"?document.getElementById(C):C;var B=!window.opera&&navigator.userAgent.indexOf("MSIE")!=-1;if(H=="float"){H=B?"styleFloat":"cssFloat"}H=H.replace(/(-[a-z])/gi,function(I,J){return J.charAt(1).toUpperCase()});if("opacity"==H&&B){var A=C.style.filter;return A&&A.indexOf("opacity=")>=0?(parseFloat(A.match(/opacity=([^)]*)/)[1])/100)+"":"1"}var F=null;if(F=C.style[H]){return F}if(C.currentStyle){return C.currentStyle[H]}else{var E=C.nodeType==9?C:C.ownerDocument||C.document;if(E.defaultView&&E.defaultView.getComputedStyle){var D=E.defaultView.getComputedStyle(C,"");if(D){return D[H]}}}return null};if(!window.console||!console.firebug){var names=["log","debug","info","warn","error","assert","dir","dirxml","group","groupEnd","time","timeEnd","count","trace","profile","profileEnd"];window.console=(typeof window.loadFirebugConsole=="function")?window.loadFirebugConsole():{};for(var i=0;i<names.length;++i){window.console[names[i]]=function(){}}}if(typeof (HTMLElement)!="undefined"&&!window.opera){HTMLElement.prototype.__defineGetter__("children",function(){for(var B=[],C=0,E,D=0,A=this.childNodes.length;D<A;D++){E=this.childNodes[D];if(E.nodeType==1){B[C++]=E;if(E.name){if(!B[E.name]){B[E.name]=[]}B[E.name][B[E.name].length]=E}if(E.id){B[E.id]=E}}}return B})}if(typeof (HTMLElement)!="undefined"&&!window.opera){HTMLElement.prototype.__defineGetter__("currentStyle",function(){return this.ownerDocument.defaultView.getComputedStyle(this,null)})}if(typeof (HTMLElement)!="undefined"&&!window.opera){HTMLElement.prototype.insertAdjacentHTML=function(A,B){var C=this.ownerDocument.createRange();C.setStartBefore(this);C=C.createContextualFragment(B);switch(A){case"beforeBegin":this.parentNode.insertBefore(C,this);break;case"afterBegin":this.insertBefore(C,this.firstChild);break;case"beforeEnd":this.appendChild(C);break;case"afterEnd":if(!this.nextSibling){this.parentNode.appendChild(C)}else{this.parentNode.insertBefore(C,this.nextSibling)}break}}}if(Fe.isFirefox&&window.Event){Event.prototype.__defineSetter__("returnValue",function(A){if(!A){this.preventDefault()}return A});Event.prototype.__defineSetter__("cancelBubble",function(A){if(A){this.stopPropagation()}return A});Event.prototype.__defineGetter__("srcElement",function(){var A=this.target;while(A.nodeType!=1){A=A.parentNode}return A});Event.prototype.__defineGetter__("fromElement",function(){var A;if(this.type=="mouseover"){A=this.relatedTarget}else{if(this.type=="mouseout"){A=this.target}}if(!A){return }while(A.nodeType!=1){A=A.parentNode}return A});Event.prototype.__defineGetter__("toElement",function(){var A;if(this.type=="mouseout"){A=this.relatedTarget}else{if(this.type=="mouseover"){A=this.target}}if(!A){return }while(A.nodeType!=1){A=A.parentNode}return A});Event.prototype.__defineGetter__("offsetX",function(){return this.layerX});Event.prototype.__defineGetter__("offsetY",function(){return this.layerY})}if(window.Document){}if(window.Node){Node.prototype.replaceNode=function(A){this.parentNode.replaceChild(A,this)};Node.prototype.removeNode=function(B){if(B){return this.parentNode.removeChild(this)}else{var A=document.createRange();A.selectNodeContents(this);return this.parentNode.replaceChild(A.extractContents(),this)}};Node.prototype.swapNode=function(B){var C=this.nextSibling;var A=this.parentNode;node.parentNode.replaceChild(this,B);A.insertBefore(node,C)}}if(window.HTMLElement){HTMLElement.prototype.__defineGetter__("all",function(){var A=this.getElementsByTagName("*");var B=this;A.tags=function(C){return B.getElementsByTagName(C)};return A});HTMLElement.prototype.__defineGetter__("parentElement",function(){if(this.parentNode==this.ownerDocument){return null}return this.parentNode});HTMLElement.prototype.__defineGetter__("children",function(){var C=[],A=0,D;for(var B=0;B<this.childNodes.length;B++){D=this.childNodes[B];if(D.nodeType==1){C[A++]=D;if(D.name){if(!C[D.name]){C[D.name]=[]}C[D.name][C[D.name].length]=D}if(D.id){C[D.id]=D}}}return C});HTMLElement.prototype.__defineGetter__("currentStyle",function(){return this.ownerDocument.defaultView.getComputedStyle(this,null)});HTMLElement.prototype.__defineSetter__("outerHTML",function(B){var A=this.ownerDocument.createRange();A.setStartBefore(this);var C=A.createContextualFragment(B);this.parentNode.replaceChild(C,this);return B});HTMLElement.prototype.__defineGetter__("outerHTML",function(){var A;var B=this.attributes;var D="<"+this.tagName;for(var C=0;C<B.length;C++){A=B[C];if(A.specified){D+=" "+A.name+'="'+A.value+'"'}}if(!this.canHaveChildren){return D+">"}return D+">"+this.innerHTML+"</"+this.tagName+">"});HTMLElement.prototype.__defineGetter__("canHaveChildren",function(){switch(this.tagName.toLowerCase()){case"area":case"base":case"basefont":case"col":case"frame":case"hr":case"img":case"br":case"input":case"isindex":case"link":case"meta":case"param":return false}return true});HTMLElement.prototype.__defineSetter__("innerText",function(B){var A=document.createTextNode(B);this.innerHTML=A;return A});HTMLElement.prototype.__defineGetter__("innerText",function(){var A=this.ownerDocument.createRange();A.selectNodeContents(this);return A.toString()});HTMLElement.prototype.__defineSetter__("outerText",function(B){var A=document.createTextNode(B);this.outerHTML=A;return A});HTMLElement.prototype.__defineGetter__("outerText",function(){var A=this.ownerDocument.createRange();A.selectNodeContents(this);return A.toString()});HTMLElement.prototype.attachEvent=function(C,B){var A=C.replace(/on/,"");B._ieEmuEventHandler=function(D){window.event=D;return B()};this.addEventListener(A,B._ieEmuEventHandler,false)};HTMLElement.prototype.detachEvent=function(C,B){var A=C.replace(/on/,"");if(typeof (B._ieEmuEventHandler)=="function"){this.removeEventListener(A,B._ieEmuEventHandler,false)}else{this.removeEventListener(A,B,true)}};HTMLElement.prototype.contains=function(A){do{if(A==this){return true}}while(A=A.parentNode);return false};HTMLElement.prototype.insertAdjacentElement=function(A,B){switch(A){case"beforeBegin":this.parentNode.insertBefore(B,this);break;case"afterBegin":this.insertBefore(B,this.firstChild);break;case"beforeEnd":this.appendChild(B);break;case"afterEnd":if(this.nextSibling){this.parentNode.insertBefore(B,this.nextSibling)}else{this.parentNode.appendChild(B)}break}};HTMLElement.prototype.insertAdjacentHTML=function(B,D){var C=this.ownerDocument.createRange();C.setStartBefore(this);var A=C.createContextualFragment(D);this.insertAdjacentElement(B,A)};HTMLElement.prototype.insertAdjacentText=function(B,C){var A=document.createTextNode(C);this.insertAdjacentElement(B,A)};HTMLElement.prototype.attachEvent=function(C,B){var A=C.replace(/on/,"");B._ieEmuEventHandler=function(D){window.event=D;return B()};this.addEventListener(A,B._ieEmuEventHandler,false)};HTMLElement.prototype.detachEvent=function(C,B){var A=C.replace(/on/,"");if(typeof (B._ieEmuEventHandler)=="function"){this.removeEventListener(A,B._ieEmuEventHandler,false)}else{this.removeEventListener(A,B,true)}}}var Fe=Fe||{version:"20080809",emptyFn:function(){}};Fe.Ajax={};Fe.Ajax.request=function(B,C,A){if(typeof C=="object"&&C){A=C;C=null}else{if(typeof C=="function"){A=A||{};A.onsuccess=C;C=null}}var D=new FeAjax(A);D.request(B,C);return D};function FeAjax(B){this.url="";this.data="";this.async=true;this.username="";this.password="";this.method="GET";if(typeof B=="object"&&B){for(var A in B){this[A]=B[A]}}}FeAjax.prototype.request=function(A,F){var E=this,C=FeAjax._getPool(),H=C.xhr;C.active=true;E.url=A;if(typeof F=="string"&&F){E.data=F}if(typeof E.onexecute=="function"){E.onexecute(H)}try{if(!E.username){H.open(E.method,E.url,E.async)}else{H.open(E.method,E.url,E.async,E.username,E.password)}if(E.async){H.onreadystatechange=D}if(E.method.toUpperCase()=="POST"){H.setRequestHeader("Content-Type","application/x-www-form-urlencoded")}H.send(E.data)}catch(B){if(typeof E.onerror=="function"){E.onerror(B)}}if(!E.async){D()}function D(){if(H.readyState==4){try{H.status}catch(I){if(typeof E.ondisconnect=="function"){E.ondisconnect(H)}C.active=false;return }if(typeof E["on"+H.status]=="function"){E["on"+H.status](H)}if(H.status==200&&H.statusText.toLowerCase()=="ok"){if(typeof E.onsuccess=="function"){E.onsuccess(H)}}else{if(typeof E.onfailure=="function"){E.onfailure(H)}}C.active=false;H.onreadystatechange=function(){}}}};FeAjax._xhrpools=[];FeAjax._getPool=function(){var C=this._xhrpools;for(var B=null,A=0;A<C.length;A++){B=C[A];if(!B.active){break}}if(A>=C.length){B={active:false,xhr:FeAjax._getXhr()};C[C.length]=B}return B};FeAjax._getXhr=function(){if(window.XMLHttpRequest){return new XMLHttpRequest()}else{if(window.ActiveXObject){var C=["MSXML2.XMLHttp.6.0","MSXML2.XMLHttp.3.0","MSXML2.XMLHttp.5.0","MSXML2.XMLHttp.4.0","Msxml2.XMLHTTP","MSXML.XMLHttp","Microsoft.XMLHTTP"];for(var B=0;C[B];B++){try{return new ActiveXObject(C[B])}catch(A){}}throw new Error("Your browser do not support XMLHttp")}}};Fe.Ajax.post=function(A,B,C){return this.request(A,B,{method:"POST",onsuccess:C})};Fe.Ajax.get=function(A,B){return this.request(A,B)};Fe.String={};Fe.String.parseQuery=function(D,C){var B=new RegExp("(^|&|\\?|#)"+C+"=([^&]*)(&|$)","i");var A=D.match(B);if(A){return A[2]}return null};Fe.Ajax.sio=function(D,I){if(!D||typeof D!="string"){throw new Error("invalid url parameter!")}var H=document.createElement("SCRIPT");var F=Fe.String.parseQuery(D,"callback");if(F===null){var C=false;H.onreadystatechange=H.onload=function(){if(C){return false}if(H.readyState=="loaded"||H.readyState=="complete"){C=true;try{I()}finally{if(H.parentNode){H.parentNode.removeChild(H)}H.onreadystatechange=null;H.onload=null;H=null}}}}else{var B="CB"+Math.floor(Math.random()*2147483648).toString(36);D=D.replace(/(&|\?)callback=([^&]*)(&|$)/,"callback="+B);window[B]=function(){try{var J=(I||window[F]);J.apply(null,arguments)}finally{if(H.parentNode){H.parentNode.removeChild(H)}H=null;window[B]=null}}}H.src=D;H.type="text/javascript";var E=document.getElementsByTagName("HEAD")[0];if(!E){var A=document.getElementsByTagName("body")[0];E=document.createElement("head");A.parentNode.insertBefore(E,A)}E.insertBefore(H,E.firstChild)};var g_pop=g_pop||function(){};if(!Array.prototype.push){Array.prototype.push=function(){var B=this.length;for(var A=0;A<arguments.length;A++){this[B+A]=arguments[A]}return this.length}}function G(){var C=new Array();for(var B=0;B<arguments.length;B++){var A=arguments[B];if(typeof A=="string"){A=document.getElementById(A)}if(arguments.length==1){return A}C.push(A)}return C}Function.prototype.bind=function(B){var A=this;return function(){A.apply(B,arguments)}};Function.prototype.bindAsEventListener=function(B){var A=this;return function(C){A.call(B,C||window.event)}};Object.extend=function(A,B){for(property in B){A[property]=B[property]}return A};if(!window.Event){var Event=new Object()}Object.extend(Event,{observers:false,element:function(A){return A.target||A.srcElement},isLeftClick:function(A){return(((A.which)&&(A.which==1))||((A.button)&&(A.button==1)))},pointerX:function(A){return A.pageX||(A.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft))},pointerY:function(A){return A.pageY||(A.clientY+(document.documentElement.scrollTop||document.body.scrollTop))},stop:function(A){if(A.preventDefault){A.preventDefault();A.stopPropagation()}else{A.returnValue=false;A.cancelBubble=true}},findElement:function(C,B){var A=Event.element(C);while(A.parentNode&&(!A.tagName||(A.tagName.toUpperCase()!=B.toUpperCase()))){A=A.parentNode}return A},_observeAndCache:function(D,C,B,A){if(!this.observers){this.observers=[]}if(D.addEventListener){this.observers.push([D,C,B,A]);D.addEventListener(C,B,A)}else{if(D.attachEvent){this.observers.push([D,C,B,A]);D.attachEvent("on"+C,B)}}},unloadCache:function(){if(!Event.observers){return }for(var A=0;A<Event.observers.length;A++){Event.stopObserving.apply(this,Event.observers[A]);Event.observers[A][0]=null}Event.observers=false},observe:function(D,C,B,A){if("string"==typeof D){D=G(D)}A=A||false;if(C=="keypress"&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||D.attachEvent)){C="keydown"}this._observeAndCache(D,C,B,A)},stopObserving:function(D,C,B,A){if("string"==typeof D){D=G(D)}A=A||false;if(C=="keypress"&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||D.detachEvent)){C="keydown"}if(D.removeEventListener){D.removeEventListener(C,B,A)}else{if(D.detachEvent){D.detachEvent("on"+C,B)}}}});Event.observe(window,"unload",Event.unloadCache,false);var Class=function(){var A=function(){this.initialize.apply(this,arguments)};for(i=0;i<arguments.length;i++){superClass=arguments[i];for(member in superClass.prototype){A.prototype[member]=superClass.prototype[member]}}A.child=function(){return new Class(this)};A.extend=function(B){for(property in B){A.prototype[property]=B[property]}};return A};var Popup=new Class();Popup.prototype={iframeIdName:"ifr_popup",initialize:function(A){this.config=Object.extend({contentType:1,isHaveTitle:true,scrollType:"no",isBackgroundCanClick:false,isSupportDraging:true,isShowShadow:true,isReloadOnClose:true,width:400,isPop:false,height:300},A||{});this.info={shadowWidth:3,title:"",contentUrl:"",contentHtml:"",callBack:null,parameter:null,confirmCon:"",alertCon:"",someHiddenTag:"select,object,embed",someDisabledBtn:"",someHiddenEle:"",overlay:0,coverOpacity:30};this.color={cColor:"#000",bColor:"#FFFFFF",tColor:"#709CD2",wColor:"#FFFFFF"};this.dropClass=null;this.someToHidden=[];this.someToDisabled=[];if(!this.config.isHaveTitle){this.config.isSupportDraging=false}this.iniBuild()},setContent:function(A,B){if(B!=""){switch(A){case"width":this.config.width=B;break;case"height":this.config.height=B;break;case"title":this.info.title=B;break;case"contentUrl":this.info.contentUrl=B;break;case"contentHtml":this.info.contentHtml=B;break;case"callBack":this.info.callBack=B;break;case"parameter":this.info.parameter=B;break;case"confirmCon":this.info.confirmCon=B;break;case"alertCon":this.info.alertCon=B;break;case"someHiddenTag":this.info.someHiddenTag=B;break;case"someHiddenEle":this.info.someHiddenEle=B;break;case"someDisabledBtn":this.info.someDisabledBtn=B;break;case"overlay":this.info.overlay=B}}},iniBuild:function(){var A=G("dialogCase");if(A){document.body.removeChild(A)}A=document.createElement("DIV");A.id="dialogCase";A.style.zIndex=65535;A.style.top=0;A.style.left=0;A.style.position="absolute";A.style.width="100%";document.body.appendChild(A)},build:function(){var B=10001+this.info.overlay*10;var I=B+2;this.iframeIdName="ifr_popup"+this.info.overlay;var K="http://img.baidu.com/hi/img/";var J='<div id="dialogBoxClose" style="width:18px;height:18px;cursor:pointer;margin-bottom:2px;"><div>';var F="filter: alpha(opacity="+this.info.coverOpacity+");opacity:"+this.info.coverOpacity/100+";";var L='<div id="dialogBoxBG" style="position:absolute;top:0px;left:0px;z-index:'+B+";"+F+"background-color:"+this.color.cColor+';display:none;"></div>';var E='<div id="dialogBox" style="border:1px solid #104987;display:none;z-index:'+I+";position:relative;width:"+this.config.width+'px;background:url(\'http://img.baidu.com/img/baike/editor/bgs.gif\') repeat-x scroll 0 -68px #1169B1;padding:1px;"><table width="100%" border="0" cellpadding="0" cellspacing="0" style="background:url(\'http://img.baidu.com/img/baike/editor/bgs.gif\') repeat-x 0 -144px">';if(this.config.isHaveTitle){E+='<tr height="29"><td style="background:url(\'http://img.baidu.com/img/baike/editor/edithelper.gif\') no-repeat right -68px transparent;"><table style="-moz-user-select:none;height:24px;" width="100%" border="0" cellpadding="0" cellspacing="0" ><tr><td width="6" height="24"></td><td id="dialogBoxTitle" style="color:'+this.color.wColor+';font-size:14px;font-weight:bold;">'+this.info.title+'&nbsp;</td><td id="dialogClose" width="18" align="right" valign="middle">'+J+'</td><td width="9"></td></tr></table></td></tr>'}else{E+='<tr height="10"><td align="right">'+J+"</td></tr>"}E+='<tr id="container-tr" style="height:'+(this.config.height-36)+'px" valign="top"><td style="position:relative;padding:1px;"><div style="border:1px solid #FFF;"><div style="background:url(\'http://img.baidu.com/img/baike/editor/bgs.gif\') repeat-x #FFF;height:13px;line-height:13px;font-size:1px;">&nbsp;</div><div id="dialogBody" style="background-color:#FFF;height:'+(this.config.height-46)+"px;width:"+(this.config.width-4)+'px"></div></div></td></tr></table></div><div id="dialogBoxShadow" style="display:none;z-index:'+B+';"></div>';if(!this.config.isBackgroundCanClick){G("dialogCase").innerHTML=L+E;var H=document,D=H.body,C=H.documentElement,A=H.compatMode=="BackCompat"?D:H.documentElement;G("dialogBoxBG").style.height=Math.max(C.scrollHeight,D.scrollHeight,A.clientHeight)+"px";G("dialogBoxBG").style.width=window.screen.width+"px"}else{G("dialogCase").innerHTML=E}Event.observe(G("dialogBoxClose"),"click",this.reset.bindAsEventListener(this),false);if(this.config.isSupportDraging){dropClass=new Dragdrop(this.config.width,this.config.height,this.info.shadowWidth,this.config.isSupportDraging,this.config.contentType);G("dialogBoxTitle").style.cursor="move"}this.lastBuild()},lastBuild:function(){var B='<div style="width:100%;height:100%;text-align:center;"><div style="margin:0 20px 0 20px;padding-top:20px;font-size:14px;line-height:16px;color:#000000;">'+this.info.confirmCon+'</div><div style="margin:20px;"><input id="dialogOk" type="button" value="  确定  "/>&nbsp;<input id="dialogCancel" type="button" value="  取消  "/></div></div>';var E='<div style="width:100%;height:100%;text-align:center;"><div style="margin:0 20px;font-size:14px;line-height:16px;color:#000000;">'+this.info.alertCon+'</div><div style="margin:20px;"><input id="dialogYES" type="button" value="  确定  "/></div></div>';var A=10001+this.info.overlay*10;var D=A+4;if(this.config.contentType==1){var C="<iframe style='height:"+(this.config.height-46)+"px;width:"+(this.config.width-4)+"px;' name='"+this.iframeIdName+"' id='"+this.iframeIdName+"' src='"+this.info.contentUrl+"' frameborder='0' scrolling='"+this.config.scrollType+"'></iframe>";var F="<div id='iframeBG' style='position:absolute;top:0px;left:0px;width:1px;height:1px;z-index:"+D+";filter: alpha(opacity=00);opacity:0.00;background-color:#ffffff;'><div>";G("dialogBody").innerHTML=C+F}else{if(this.config.contentType==2){G("dialogBody").innerHTML=this.info.contentHtml}else{if(this.config.contentType==3){G("dialogBody").innerHTML=B;Event.observe(G("dialogOk"),"click",this.forCallback.bindAsEventListener(this),false);Event.observe(G("dialogCancel"),"click",this.close.bindAsEventListener(this),false)}else{if(this.config.contentType==4){G("dialogBody").innerHTML=E;Event.observe(G("dialogYES"),"click",this.close.bindAsEventListener(this),false)}}}}},reBuild:function(){G("dialogBody").height=G("dialogBody").clientHeight;this.lastBuild()},show:function(){this.hiddenSome();this.middle();if(this.config.isShowShadow){this.shadow()}},resize:function(C,F,I){this.setContent("width",C);this.setContent("height",F);var H=G("dialogBox");var E=G("dialogBody");H.style["width"]=C+"px";H.style["height"]=F+"px";var D=G(this.iframeIdName);D.style["height"]=F-46+"px";D.style["width"]=C-4+"px";E.style["height"]=F-46+"px";E.style["width"]=C-4+"px";if(I){this.setContent("title",I);var B=G("dialogBoxTitle");B.innerHTML=I+"&nbsp;"}var A=G("container-tr");A.style["height"]=F-36+"px";this.show()},forCallback:function(){return this.info.callBack(this.info.parameter)},shadow:function(){var A=G("dialogBoxShadow");var B=G("dialogBox");A.style["top"]=B.offsetTop+this.info.shadowWidth+10+"px";A.style["left"]=B.offsetLeft+this.info.shadowWidth+6+"px";A.style["width"]=B.offsetWidth-6+"px";A.style["height"]=B.offsetHeight-10+"px";A.style["position"]="absolute";A.style["background"]="#000";A.style["display"]="";A.style["opacity"]="0.1";A.style["filter"]="alpha(opacity=20)"},middle:function(){if(!this.config.isBackgroundCanClick){G("dialogBoxBG").style.display=""}var F=G("dialogBox");F.style["position"]="absolute";F.style["display"]="";var C=(document.documentElement.clientWidth||document.body.clientWidth);var E=(document.documentElement.clientHeight||document.body.clientHeight);var B=(document.documentElement.scrollTop||document.body.scrollTop);var D=(C/2)-(F.offsetWidth/2);var A=(E/2+B)-(F.offsetHeight/2);if(A<B){A=20+B}if(D<1){D=20}F.style["left"]=D+"px";F.style["top"]=A+"px"},reset:function(A){this.close();if(typeof A!=="boolean"){A=false}if(this.config.isReloadOnClose||A){top.location.href=top.location.href.replace(/#.*$/g,"")}},close:function(){G("dialogBox").style.display="none";if(!this.config.isBackgroundCanClick){G("dialogBoxBG").style.display="none"}if(this.config.isShowShadow){G("dialogBoxShadow").style.display="none"}G("dialogBody").innerHTML="";this.showSome()},hiddenSome:function(){var A=this.info.someHiddenTag.split(",");if(A.length==1&&A[0]==""){A.length=0}for(var B=0;B<A.length;B++){this.hiddenTag(A[B])}var C=this.info.someHiddenEle.split(",");if(C.length==1&&C[0]==""){C.length=0}for(var B=0;B<C.length;B++){this.hiddenEle(C[B])}var C=this.info.someDisabledBtn.split(",");if(C.length==1&&C[0]==""){C.length=0}for(var B=0;B<C.length;B++){this.disabledBtn(C[B])}},disabledBtn:function(B){var A=document.getElementById(B);if(typeof (A)!="undefined"&&A!=null&&A.disabled==false){A.disabled=true;this.someToDisabled.push(A)}},hiddenTag:function(B){var C=document.getElementsByTagName(B);if(C!=null){for(var A=0;A<C.length;A++){if(C[A].style.display!="none"&&C[A].style.visibility!="hidden"){C[A].style.visibility="hidden";this.someToHidden.push(C[A])}}}},hiddenEle:function(B){var A=document.getElementById(B);if(typeof (A)!="undefined"&&A!=null){A.style.visibility="hidden";this.someToHidden.push(A)}},showSome:function(){for(var A=0;A<this.someToHidden.length;A++){this.someToHidden[A].style.visibility="visible"}for(var A=0;A<this.someToDisabled.length;A++){this.someToDisabled[A].disabled=false}},replaceIframe:function(A){this.setContent("contentUrl",A);G(this.iframeIdName).src=A}};var Dragdrop=new Class();Dragdrop.prototype={initialize:function(C,B,A,D,E){this.dragData=null;this.dragDataIn=null;this.backData=null;this.width=C;this.height=B;this.shadowWidth=A;this.showShadow=D;this.contentType=E;this.IsDraging=false;this.oObj=G("dialogBox");Event.observe(G("dialogBoxTitle"),"mousedown",this.moveStart.bindAsEventListener(this),false)},moveStart:function(A){this.IsDraging=true;if(this.contentType==1){G("iframeBG").style.display="";G("iframeBG").style.width=this.width+"px";G("iframeBG").style.height=this.height+"px"}Event.observe(document,"mousemove",this.mousemove.bindAsEventListener(this),false);Event.observe(document,"mouseup",this.mouseup.bindAsEventListener(this),false);Event.observe(document,"selectstart",this.returnFalse,false);this.dragData={x:Event.pointerX(A),y:Event.pointerY(A)};this.backData={x:parseInt(this.oObj.style.left),y:parseInt(this.oObj.style.top)};if(document.body.setCapture){document.body.setCapture()}},mousemove:function(A){if(!this.IsDraging){return }var C=Event.pointerX(A)-this.dragData.x+parseInt(this.oObj.style.left);var B=Event.pointerY(A)-this.dragData.y+parseInt(this.oObj.style.top);if(this.dragData.y<parseInt(this.oObj.style.top)){B=B-12}else{if(this.dragData.y>parseInt(this.oObj.style.top)+25){B=B+12}}this.oObj.style.left=C+"px";this.oObj.style.top=B+"px";if(this.showShadow){G("dialogBoxShadow").style.left=C+this.shadowWidth+6+"px";G("dialogBoxShadow").style.top=B+this.shadowWidth+10+"px"}this.dragData={x:Event.pointerX(A),y:Event.pointerY(A)};document.body.style.cursor="move"},mouseup:function(C){if(!this.IsDraging){return }if(this.contentType==1){G("iframeBG").style.display="none"}document.onmousemove=null;document.onmouseup=null;var B=Event.pointerX(C)-(document.documentElement.scrollLeft||document.body.scrollLeft);var A=Event.pointerY(C)-(document.documentElement.scrollTop||document.body.scrollTop);if(B<1||A<1||B>document.body.clientWidth||A>document.body.clientHeight){this.oObj.style.left=this.backData.x+"px";this.oObj.style.top=this.backData.y+"px";if(this.showShadow){G("dialogBoxShadow").style.left=this.backData.x+this.shadowWidth+6+"px";G("dialogBoxShadow").style.top=this.backData.y+this.shadowWidth+10+"px"}}this.IsDraging=false;document.body.style.cursor="";Event.stopObserving(window,"selectstart",this.returnFalse,false);if(document.body.releaseCapture){document.body.releaseCapture()}},returnFalse:function(){return false}};var Fe=Fe||{version:"20080809",emptyFn:function(){}};if(Object.prototype.propertyIsEnumerable){Fe.propertyIsEnumerable=function(A,B){return Object.prototype.propertyIsEnumerable.call(A,B)}}else{Fe.propertyIsEnumerable=function(A,C){if(C in A){for(var B in A){if(B==C){return true}}}return false}}Fe.isArray=function(A){return(A&&typeof A.length=="number"&&typeof A.splice!="undefined"&&!Fe.propertyIsEnumerable(A,"length"))};Fe.isObject=function(A){return(A&&(typeof (A)=="object"||typeof (A)=="function"))||false};Fe.trim=function(A){return A.replace(/(^[\s\t\xa0\u3000]+)|([\u3000\xa0\s\t]+$)/g,"")};Fe.format=function(I,K){if(arguments.length>1){var E=Fe.format,H=/([.*+?^=!:${}()|[\]\/\\])/g,F=(E.left_delimiter||"{").replace(H,"\\$1"),A=(E.right_delimiter||"}").replace(H,"\\$1");var C=E._r1||(E._r1=new RegExp("#"+F+"([^"+F+A+"]+)"+A,"g")),B=E._r2||(E._r2=new RegExp("#"+F+"(\\d+)"+A,"g"));if(typeof (K)=="object"){return I.replace(C,function(L,N){var M=K[N];if(typeof M=="function"){M=M(N)}return typeof (M)=="undefined"?"":M})}else{if(typeof (K)!="undefined"){var J=Array.prototype.slice.call(arguments,1);var D=J.length;return I.replace(B,function(L,M){M=parseInt(M,10);return(M>=D)?L:J[M]})}}}return I};Fe.format.delimiter=function(C,A){var B=Fe.format;B.left_delimiter=C||"{";B.right_delimiter=A||C||"}";B._r1=B._r2=null};Fe.each=function(E,A){if(typeof A!="function"){return E}if(E){if(E.length===undefined){for(var B in E){A.call(E[B],E[B],B)}}else{for(var C=0,D=E.length;C<D;C++){A.call(E[C],E[C],C)}}}return E};Fe.extend=function(F,D){if(F&&D&&typeof (D)=="object"){for(var E in D){F[E]=D[E]}var C=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"];for(var A=0,B;A<C.length;A++){B=C[A];if(Object.prototype.hasOwnProperty.call(D,B)){F[B]=D[B]}}}return F};Fe.Browser=(function(){var C=navigator.userAgent;var H=0,A=0,F=0,E=0;var D=0,I=0,B=0;if(typeof (window.opera)=="object"&&/Opera(\s|\/)(\d+(\.\d+)?)/.test(C)){A=parseFloat(RegExp.$2)}else{if(/MSIE (\d+(\.\d+)?)/.test(C)){H=parseFloat(RegExp.$1)}else{if(/Firefox(\s|\/)(\d+(\.\d+)?)/.test(C)){E=parseFloat(RegExp.$2)}else{if(navigator.vendor=="Netscape"&&/Netscape(\s|\/)(\d+(\.\d+)?)/.test(C)){B=parseFloat(RegExp.$2)}else{if(C.indexOf("Safari")>-1&&/Version\/(\d+(\.\d+)?)/.test(C)){F=parseFloat(RegExp.$1)}}}}}if(C.indexOf("Gecko")>-1&&C.indexOf("KHTML")==-1&&/rv\:(\d+(\.\d+)?)/.test(C)){I=parseFloat(RegExp.$1)}return{ie:H,firefox:E,gecko:I,netscape:B,opera:A,safari:F}})();window.FeBrowser=Fe.Browser;Fe.isGecko=(navigator.userAgent.indexOf("Gecko")>-1&&navigator.userAgent.indexOf("KHTML")==-1&&/rv\:(\d+(\.\d+)?)/.test(navigator.userAgent))?RegExp.$1:0;Fe.isStrict=(document.compatMode=="CSS1Compat");Fe.isIE=/MSIE (\d+(\.\d+)?)/.test(navigator.userAgent)?RegExp.$1:0;Fe.isFirefox=/Firefox(\s|\/)(\d+(\.\d+)?)/.test(navigator.userAgent)?RegExp.$2:0;Fe.isSafari=(navigator.userAgent.indexOf("Safari")>-1&&/Version\/(\d+(\.\d+)?)/.test(navigator.userAgent))?RegExp.$1:0;Fe.isWebkit=(navigator.userAgent.indexOf("KHTML")>-1&&/AppleWebKit\/([^\s]*)/.test(navigator.userAgent))?RegExp.$1:0;Fe.isOpera=(window.opera&&/Opera(\s|\/)(\d+(\.\d+)?)/.test(navigator.userAgent))?RegExp.$2:0;Fe.G=function(){for(var A=[],B=arguments.length-1;B>-1;B--){var C=arguments[B];A[B]=null;if(typeof C=="object"&&C&&C.dom){A[B]=C.dom}else{if((typeof C=="object"&&C&&C.tagName)||C==window||C==document){A[B]=C}else{if(typeof C=="string"&&(C=document.getElementById(C))){A[B]=C}}}}return A.length<2?A[0]:A};Fe.Q=function(E,D,B){if(typeof E!="string"||E.length<=0){return null}var J=[],B=(typeof B=="string"&&B.length>0)?B.toLowerCase():null,C=(Fe.G(D)||document);if(C.getElementsByClassName){Fe.each(C.getElementsByClassName(E),function(K){if(B!==null){if(K.tagName.toLowerCase()==B){J[J.length]=K}}else{J[J.length]=K}})}else{E=E.replace(/\-/g,"\\-");var A=new RegExp("(^|\\s{1,})"+Fe.trim(E)+"(\\s{1,}|$)"),H=(B===null)?(C.all?C.all:C.getElementsByTagName("*")):C.getElementsByTagName(B),F=H.length,I=F;while(F--){if(A.test(H[I-F-1].className)){J[J.length]=H[I-F-1]}}}return J};Fe.hide=function(){Fe.each(arguments,function(A){if(A=Fe.G(A)){A.style.display="none"}})};Fe.show=function(){Fe.each(arguments,function(A){if(A=Fe.G(A)){A.style.display=""}})};Fe.toggle=function(){Fe.each(arguments,function(A){if(A=Fe.G(A)){A.style.display=A.style.display=="none"?"":"none"}})};Fe.addClassName=function(C,D){if(!(C=Fe.G(C))){return }var A=C.className.split(" "),B=Fe.trim;if(!new RegExp("(^|\\s{1,})"+B(D)+"(\\s{1,}|$)").test(C.className)){C.className=B(A.concat(D).join(" "))}};Fe.ac=Fe.addClassName;Fe.removeClassName=function(B,C){if(!(B=Fe.G(B))){return }var A=Fe.trim,D=new RegExp("(^|\\s{1,})"+A(C)+"(\\s{1,}|$)","g");B.className=A(B.className.replace(D,"$2"))};Fe.rc=Fe.removeClassName;Fe.body=function(){var A=0,J=0,E=0,C=0,B=0,K=0;var F=window,D=document,I=D.documentElement;A=I.clientWidth||D.body.clientWidth;J=F.innerHeight||I.clientHeight||D.body.clientHeight;C=D.body.scrollTop||I.scrollTop;E=D.body.scrollLeft||I.scrollLeft;B=Math.max(D.body.scrollWidth,I.scrollWidth||0);K=Math.max(D.body.scrollHeight,I.scrollHeight||0,J);return{scrollTop:C,scrollLeft:E,documentWidth:B,documentHeight:K,viewWidth:A,viewHeight:J}};Fe.on=function(C,B,A){if(!(C=Fe.G(C))){return C}B=B.replace(/^on/,"").toLowerCase();if(C.attachEvent){C[B+A]=function(){A.call(C,window.event)};C.attachEvent("on"+B,C[B+A])}else{C.addEventListener(B,A,false)}return C};Fe.un=function(C,B,A){if(!(C=Fe.G(C))){return C}B=B.replace(/^on/,"").toLowerCase();if(C.attachEvent){C.detachEvent("on"+B,C[B+A]);C[B+A]=null}else{C.removeEventListener(B,A,false)}return C};Fe.css=function(C,H){if(!C||!H){return null}C=typeof C=="string"?document.getElementById(C):C;var B=!window.opera&&navigator.userAgent.indexOf("MSIE")!=-1;if(H=="float"){H=B?"styleFloat":"cssFloat"}H=H.replace(/(-[a-z])/gi,function(I,J){return J.charAt(1).toUpperCase()});if("opacity"==H&&B){var A=C.style.filter;return A&&A.indexOf("opacity=")>=0?(parseFloat(A.match(/opacity=([^)]*)/)[1])/100)+"":"1"}var F=null;if(F=C.style[H]){return F}if(C.currentStyle){return C.currentStyle[H]}else{var E=C.nodeType==9?C:C.ownerDocument||C.document;if(E.defaultView&&E.defaultView.getComputedStyle){var D=E.defaultView.getComputedStyle(C,"");if(D){return D[H]}}}return null};if(!window.console||!console.firebug){var names=["log","debug","info","warn","error","assert","dir","dirxml","group","groupEnd","time","timeEnd","count","trace","profile","profileEnd"];window.console=(typeof window.loadFirebugConsole=="function")?window.loadFirebugConsole():{};for(var i=0;i<names.length;++i){window.console[names[i]]=function(){}}}if(typeof (HTMLElement)!="undefined"&&!window.opera){HTMLElement.prototype.__defineGetter__("children",function(){for(var B=[],C=0,E,D=0,A=this.childNodes.length;D<A;D++){E=this.childNodes[D];if(E.nodeType==1){B[C++]=E;if(E.name){if(!B[E.name]){B[E.name]=[]}B[E.name][B[E.name].length]=E}if(E.id){B[E.id]=E}}}return B})}if(typeof (HTMLElement)!="undefined"&&!window.opera){HTMLElement.prototype.__defineGetter__("currentStyle",function(){return this.ownerDocument.defaultView.getComputedStyle(this,null)})}if(typeof (HTMLElement)!="undefined"&&!window.opera){HTMLElement.prototype.insertAdjacentHTML=function(A,B){var C=this.ownerDocument.createRange();C.setStartBefore(this);C=C.createContextualFragment(B);switch(A){case"beforeBegin":this.parentNode.insertBefore(C,this);break;case"afterBegin":this.insertBefore(C,this.firstChild);break;case"beforeEnd":this.appendChild(C);break;case"afterEnd":if(!this.nextSibling){this.parentNode.appendChild(C)}else{this.parentNode.insertBefore(C,this.nextSibling)}break}}}if(Fe.isFirefox&&window.Event){Event.prototype.__defineSetter__("returnValue",function(A){if(!A){this.preventDefault()}return A});Event.prototype.__defineSetter__("cancelBubble",function(A){if(A){this.stopPropagation()}return A});Event.prototype.__defineGetter__("srcElement",function(){var A=this.target;while(A.nodeType!=1){A=A.parentNode}return A});Event.prototype.__defineGetter__("fromElement",function(){var A;if(this.type=="mouseover"){A=this.relatedTarget}else{if(this.type=="mouseout"){A=this.target}}if(!A){return }while(A.nodeType!=1){A=A.parentNode}return A});Event.prototype.__defineGetter__("toElement",function(){var A;if(this.type=="mouseout"){A=this.relatedTarget}else{if(this.type=="mouseover"){A=this.target}}if(!A){return }while(A.nodeType!=1){A=A.parentNode}return A});Event.prototype.__defineGetter__("offsetX",function(){return this.layerX});Event.prototype.__defineGetter__("offsetY",function(){return this.layerY})}if(window.Document){}if(window.Node){Node.prototype.replaceNode=function(A){this.parentNode.replaceChild(A,this)};Node.prototype.removeNode=function(B){if(B){return this.parentNode.removeChild(this)}else{var A=document.createRange();A.selectNodeContents(this);return this.parentNode.replaceChild(A.extractContents(),this)}};Node.prototype.swapNode=function(B){var C=this.nextSibling;var A=this.parentNode;node.parentNode.replaceChild(this,B);A.insertBefore(node,C)}}if(window.HTMLElement){HTMLElement.prototype.__defineGetter__("all",function(){var A=this.getElementsByTagName("*");var B=this;A.tags=function(C){return B.getElementsByTagName(C)};return A});HTMLElement.prototype.__defineGetter__("parentElement",function(){if(this.parentNode==this.ownerDocument){return null}return this.parentNode});HTMLElement.prototype.__defineGetter__("children",function(){var C=[],A=0,D;for(var B=0;B<this.childNodes.length;B++){D=this.childNodes[B];if(D.nodeType==1){C[A++]=D;if(D.name){if(!C[D.name]){C[D.name]=[]}C[D.name][C[D.name].length]=D}if(D.id){C[D.id]=D}}}return C});HTMLElement.prototype.__defineGetter__("currentStyle",function(){return this.ownerDocument.defaultView.getComputedStyle(this,null)});HTMLElement.prototype.__defineSetter__("outerHTML",function(B){var A=this.ownerDocument.createRange();A.setStartBefore(this);var C=A.createContextualFragment(B);this.parentNode.replaceChild(C,this);return B});HTMLElement.prototype.__defineGetter__("outerHTML",function(){var A;var B=this.attributes;var D="<"+this.tagName;for(var C=0;C<B.length;C++){A=B[C];if(A.specified){D+=" "+A.name+'="'+A.value+'"'}}if(!this.canHaveChildren){return D+">"}return D+">"+this.innerHTML+"</"+this.tagName+">"});HTMLElement.prototype.__defineGetter__("canHaveChildren",function(){switch(this.tagName.toLowerCase()){case"area":case"base":case"basefont":case"col":case"frame":case"hr":case"img":case"br":case"input":case"isindex":case"link":case"meta":case"param":return false}return true});HTMLElement.prototype.__defineSetter__("innerText",function(B){var A=document.createTextNode(B);this.innerHTML=A;return A});HTMLElement.prototype.__defineGetter__("innerText",function(){var A=this.ownerDocument.createRange();A.selectNodeContents(this);return A.toString()});HTMLElement.prototype.__defineSetter__("outerText",function(B){var A=document.createTextNode(B);this.outerHTML=A;return A});HTMLElement.prototype.__defineGetter__("outerText",function(){var A=this.ownerDocument.createRange();A.selectNodeContents(this);return A.toString()});HTMLElement.prototype.attachEvent=function(C,B){var A=C.replace(/on/,"");B._ieEmuEventHandler=function(D){window.event=D;return B()};this.addEventListener(A,B._ieEmuEventHandler,false)};HTMLElement.prototype.detachEvent=function(C,B){var A=C.replace(/on/,"");if(typeof (B._ieEmuEventHandler)=="function"){this.removeEventListener(A,B._ieEmuEventHandler,false)}else{this.removeEventListener(A,B,true)}};HTMLElement.prototype.contains=function(A){do{if(A==this){return true}}while(A=A.parentNode);return false};HTMLElement.prototype.insertAdjacentElement=function(A,B){switch(A){case"beforeBegin":this.parentNode.insertBefore(B,this);break;case"afterBegin":this.insertBefore(B,this.firstChild);break;case"beforeEnd":this.appendChild(B);break;case"afterEnd":if(this.nextSibling){this.parentNode.insertBefore(B,this.nextSibling)}else{this.parentNode.appendChild(B)}break}};HTMLElement.prototype.insertAdjacentHTML=function(B,D){var C=this.ownerDocument.createRange();C.setStartBefore(this);var A=C.createContextualFragment(D);this.insertAdjacentElement(B,A)};HTMLElement.prototype.insertAdjacentText=function(B,C){var A=document.createTextNode(C);this.insertAdjacentElement(B,A)};HTMLElement.prototype.attachEvent=function(C,B){var A=C.replace(/on/,"");B._ieEmuEventHandler=function(D){window.event=D;return B()};this.addEventListener(A,B._ieEmuEventHandler,false)};HTMLElement.prototype.detachEvent=function(C,B){var A=C.replace(/on/,"");if(typeof (B._ieEmuEventHandler)=="function"){this.removeEventListener(A,B._ieEmuEventHandler,false)}else{this.removeEventListener(A,B,true)}}}var BaikeLogParams={};function imageReq(A){var C="iknowlog_"+(new Date()).getTime();var B=window[C]=new Image();B.onload=B.onerror=function(){window[C]=null};B.src=A;B=null}function nslog(B,D,A){var C=(new Date()).getTime();var E=["http://nsclick.baidu.com/v.gif?pid=103","url="+encodeURIComponent(B),"type="+D,"t="+C];Fe.each(A,function(H,F){E.push(F+"="+H)});if(BaikeLogParams){Fe.each(BaikeLogParams,function(H,F){E.push(F+"="+H)})}imageReq(E.join("&"))}var baikeLoginArgs=[];function userLogin(){switch(arguments.length){case 0:relogin();break;case 1:baikeLoginArgs=[arguments[0]];loginflag.setLoginArr("loginSt",0);loginflag.setLoginArr("loginUrl",arguments[0]);checkIfLogin();break;default:baikeLoginArgs=[arguments[0],arguments[1]];loginflag.setLoginArr("loginSt",1);loginflag.setLoginArr("isDetect",arguments[0]);loginflag.setLoginArr("loginTip",arguments[1]);checkIfLogin();break}nslog(location.href,88,{name:"login"})}function checkReloginResult(){afterLogin()}function afterLogin(){switch(baikeLoginArgs.length){case 0:try{bk.editor.unloadConfirm.clear()}catch(A){}window.location=location.href.replace(/#.*/,"");g_pop.close();break;case 1:window.location=baikeLoginArgs[0];g_pop.close();break;default:g_pop.close();if(loginflag.getLoginArr("isDetect")==3){Detect.detecting()}else{try{cnEdit()}catch(A){submitform()}}break}}function relogin(A){g_pop=new Popup({contentType:1,isReloadOnClose:false,width:408,height:345});g_pop.setContent("title","登录到百度百科");g_pop.setContent("contentUrl","/page/userlogin.html"+(A?("?fr="+A):""));g_pop.build();g_pop.show()}var userlogin=userlogin||function(){};userlogin.reg=function(A){var B="/page/userlogin.html?userreg"+(A?("&fr="+A):"");g_pop=new Popup({contentType:1,isReloadOnClose:false,width:408,height:345});g_pop.setContent("title","登录到百度百科");g_pop.setContent("contentUrl",B);g_pop.build();g_pop.show()};var regOkHandler=function(A){g_pop.replaceIframe("/page/regok.html?un="+encodeURIComponent(A));g_pop.resize(538,395)};var offlineTimer;function checkIfLogin(){var B="http://baike.baidu.com/login?s="+Math.random();var A=document.createElement("script");A.setAttribute("type","text/javascript");A.setAttribute("src",B);document.getElementsByTagName("head")[0].appendChild(A);offlineTimer=setTimeout(loginWarn,15000)}function wiki_relogin(){clearTimeout(offlineTimer);if(arguments[0]==1){if(loginflag.getLoginArr("loginSt")==0){loginflag.setLoginArr("loginTip",0);var C=loginflag.getLoginArr("loginUrl");var E=setParamURL(C);if(document.images){var B=new Image();var D=addURLParam("/js/blank.js","id",E);B.src=addURLParam(D,"logTp",0)}relogin(C)}else{relogin(loginflag.getLoginArr("isDetect"),loginflag.getLoginArr("loginTip"))}}else{if(loginflag.getLoginArr("loginSt")==0){window.location=loginflag.getLoginArr("loginUrl")}else{if(loginflag.getLoginArr("isDetect")==3){Detect.detecting()}else{try{cnEdit()}catch(A){submitform()}}}}}function loginWarn(){var A='			<br>			<div style="font-size:14px;font-weight:bold;text-align:center;padding:10px 10px">请检查您的网络链接，重新进行提交</div>	';g_pop=new Popup({contentType:2,isReloadOnClose:false,width:350,height:120});g_pop.setContent("title","提示");g_pop.setContent("contentHtml",A);g_pop.build();g_pop.show()}function addURLParam(C,B,A){C+=(C.indexOf("?")==-1?"?":"&");C+=B+"="+A;return C}function setParamURL(B){if(B.indexOf("id=")!=-1){var A=(B.match(/id=\d+/).toString().substr(3));return A}}var loginFlag=function(){};(function loginStatus(){var A=new Array();A.loginTip=0;loginFlag.prototype.setLoginArr=function(B,C){A[B]=C};loginFlag.prototype.getLoginArr=function(B){return A[B]}})();var loginflag=new loginFlag();function getCookie(C){var B="(?:; )?"+C+"=([^;]*);?";var A=new RegExp(B);if(A.test(document.cookie)){return decodeURIComponent(RegExp["$1"])}else{return null}}function setCookie(F,H,B,C,A,E){var D=F+"="+encodeURIComponent(H);if(B){D+="; expires="+B.toGMTString()}if(C){D+="; path="+C}if(A){D+="; domain="+A}if(E){D+="; secure"}document.cookie=D}function setSug(){g_pop=new Popup({contentType:1,isReloadOnClose:false,width:300,height:180});g_pop.setContent("title","设置");g_pop.setContent("contentUrl","/page/suggestion.html");g_pop.build();g_pop.show()}setTimeout(function(){if(G("usrbar")){var H=G("usrbar").getElementsByTagName("a");for(var D=0,A=H.length;D<A;D++){var F=H[D].href;if(F.indexOf("http://passport.baidu.com/center")!=-1){H[D].onmousedown=function(){nslog(F,80,{name:"userId"})}}else{if(F.indexOf("http://baike.baidu.com/uc/home")!=-1){H[D].onmousedown=function(){nslog(F,81,{name:"myBaike"})}}else{if(F.indexOf("http://baike.baidu.com/uc/effort")!=-1){H[D].onmousedown=function(){nslog(F,82,{name:"myContri"})}}else{if(F.indexOf("http://baike.baidu.com/uc/draft")!=-1){H[D].onmousedown=function(){nslog(F,83,{name:"myDraft"})}}else{if(F.indexOf("http://z.baidu.com/q?ct=24&cm=16&tn=ikusercenter#uscore")!=-1||F.indexOf("http://zhidao.baidu.com/q?ct=24&cm=16&tn=ikusercenter#uscore")!=-1){H[D].onmousedown=function(){nslog(F,84,{name:"myIknow"})}}else{if(F.indexOf("http://msg.baidu.com/")!=-1){H[D].onmousedown=function(){nslog(F,85,{name:"myMsg"})}}else{if(F.indexOf("http://hi.baidu.com/sys/checkuser/")!=-1&&F.indexOf("/3")!=-1){H[D].onmousedown=function(){nslog(F,86,{name:"mySpace"})}}else{if(F.indexOf("http://www.baidu.com")!=-1){H[D].onmousedown=function(){nslog(F,87,{name:"baiduIndex"})}}else{if(F.indexOf("baidu.com/?logout&u=")!=-1){H[D].onmousedown=function(){nslog(F,89,{name:"logOut"})}}}}}}}}}}}}if(G("nav_extra")){var E=G("nav_extra").getElementsByTagName("a");for(var C=0,B=E.length;C<B;C++){var F=E[C].href;if(F.indexOf("http://baike.baidu.com/uc/home")!=-1){E[C].onmousedown=function(){nslog(F,81,{name:"myBaike"})}}else{if(F.indexOf("http://baike.baidu.com/uc/effort")!=-1){E[C].onmousedown=function(){nslog(F,82,{name:"myContri"})}}else{if(F.indexOf("http://baike.baidu.com/uc/draft")!=-1){E[C].onmousedown=function(){nslog(F,83,{name:"myDraft"})}}else{if(F.indexOf("http://baike.baidu.com/uc/task")!=-1){E[C].onmousedown=function(){nslog(F,258,{name:"myTask"})}}else{if(F.indexOf("http://baike.baidu.com/uc/recommend")!=-1){E[C].onmousedown=function(){nslog(F,259,{name:"myRecommend"})}}}}}}}}},1000);function imageResize(B,H,F,C){if(B.width<=H&&B.height<=F){return }if(B.width>0&&B.height>0){var A=B.width;var E=B.height;var D=Math.min(H/A,F/E);B.style.height="";B.style.width="";B.height=Math.ceil(E*D);B.width=Math.ceil(A*D);if(C){B.style.marginTop=((F-B.height)/2)+"px"}}else{B.style.height="";B.style.width="";B.style.width=H;B.style.height=F}}function picLoaded(B,A){if(B.height>A){var D=A/B.height;var C=B.width;B.width=C*D;B.height=A}if(B.width>0){B.parentNode.parentNode.style.width=(B.width+6)+"px"}}function formatonlinpic(E,D,C){var F=document.getElementsByName(E);for(var A=0;A<F.length;A++){if(F[A].width>0&&F[A].height>0){var B=(D/F[A].width<C/F[A].height)?D/F[A].width:C/F[A].height;if(B<=1){F[A].width=F[A].width*B}}}}function formatPic(A){for(var B in A){var J=A[B].width;var K=A[B].height;var H=A[B].valign;var C=document.getElementsByName(B);for(var D=0;D<C.length;D++){var I=C[D].width;var E=C[D].height;if(I>0&&E>0){var F=Math.min(J/I,K/E);if(F<=1){C[D].width=I*F;C[D].height=E*F}if(H==1){C[D].style.marginTop=(K-C[D].height)/2+"px"}}}}}function imageFullSize(A){A.style.height="auto";A.style.width="auto"}function adjustDiv(B,E,D,A,C){imageResize(B,D,A,C);setTimeout(function(){if(Fe.G(E)){if(Fe.G(E).innerHTML.length<=0){Fe.G(E).parentNode.removeChild(Fe.G(E))}else{Fe.G(E).style.width=B.width+"px"}}},40)}baidu.dom.ready(function(){baidu.on(document,"mousedown",function(H){var L=baidu.event.get(H);var O=L.target;var M=3;var C=false;var F="";var K=true;var N=/nslog:(\d+)/;var A=/nslog-area/;var B=window.location.href;while(O){if(O.nodeType==1){var J=O.className.match(N);if(M>0){B=O.href?O.href:window.location.href;if(K&&J){var E={x:L.pageX,y:L.pageY};var D=O.getAttribute("log-data-detail");if(D){E["log-data-detail"]=D}nslog(B,J[1],E);K=false}if(!C&&O.href){C=true;F=B}}if(C&&A.test(O.className)){var I=O.getAttribute("data-nslog-type");var E={x:L.pageX,y:L.pageY};var D=O.getAttribute("log-data-detail");if(D){E["log-data-detail"]=D}if(I){nslog(F,I,E)}}}M--;O=O.parentNode}O=null;N=null;A=null})});if(typeof bk=="undefined"){bk={}}if(typeof bk.ui=="undefined"){bk.ui={}}bk.ui.enctip=function(){this.type=1;this.msg_url="/user/ajax/checknotice?entry="+this.type+"&r="+Math.random();this.has_login=true;this.id="encourage_tip_wrapper";this.cookie_name="bk_encourage_tip2";this.cookie_interval=1800000;this.init()};bk.ui.enctip.prototype={render:function(D){var A=document.createDocumentFragment();var C=document.createElement("div");C.id=this.id;C.className="enc-tip";C.innerHTML='<div class="ctr"><div class="tri out"></div><div class="tri in"></div></div><div class="enc-wrap"><div class="enc-content fix"><div class="fl"><a href="'+D.href+'" target="_blank" onclick="nslog(\''+window.location.href+'\', 434)"><img id="encTipIcon" src="" /></a></div><div class="fr"><h3><a href="'+D.href+'" target="_blank" onclick="nslog(\''+window.location.href+"', 434)\">"+D.title+'</a></h3><div class="enc-txt" id="encourage_body">'+D.text+'</div></div></div></div><a href="javascript:void(0)" class="close" title="关闭" onclick="var tipWrapper = baidu.g(\'encourage_tip_wrapper\');tipWrapper.parentNode.removeChild(tipWrapper);nslog(\''+window.location.href+"',442);\">关闭</a>";A.appendChild(C);document.body.appendChild(A);var B=baidu.g("encTipIcon");B.onload=function(){var F=baidu.browser.ie?262:264;var H=baidu.dom.query(".enc-content .fl")[0].offsetWidth;baidu.dom.setStyle(baidu.dom.query(".enc-content .fr")[0],"width",(F-H));baidu.q("enc-content")[0].style.zoom="1";baidu.q("enc-tip")[0].style.visibility="visible";B.onload=null;var J=baidu.dom.getPosition("my_home_container").left;var E=baidu.dom.getPosition(C.id).left;var I=J-E+20;baidu.q("ctr")[0].style.left=I+"px"};B.src=D.url;bk.ui.enctip.set_nslog_area_type("encourage_body",435)},close:function(){var A=baidu.g("encourage_tip_wrapper");A.parentNode.removeChild(A)},init:function(){var A=false;if(this.has_login){var B=baidu.cookie.get(this.cookie_name);if(!B){A=true;baidu.cookie.set(this.cookie_name,baidu.url.jsonToQuery({show:A}),{expires:this.cookie_interval})}}if(A){this.get_content()}},get_content:function(){var A=this;baidu.ajax.get(this.msg_url,function(E){var C=bk.ui.enctip.format_result(baidu.json.parse(E.responseText),A.type);var B=false;for(var D in C){B=true;break}if(B){A.render(C)}})}};bk.ui.enctip.format_result=function(E,C){var D={};var A=E.length;if(A==0){return D}switch(C){case 0:case 1:D.href=E[0].iconHref;D.url=E[0].iconUrl;D.title=E[0].title;D.text=E[0].text;return D;break;case 2:D.href=E[0].iconHref;D.url=E[0].iconUrl;D.banner_href=E[0].bannerHref;D.banner_url=E[0].bannerBigUrl;D.title=E[0].title;D.text=[];break;case 3:D.href=E[0].iconHref;D.title=E[0].title;D.text=[];break;case 4:D.banner_href=E[0].bannerHref;D.banner_url=E[0].bannerUrl;D.text=E[0].text;return D;break}if(A>0){for(var B=0;B<A;++B){D.text.push(E[B].text)}}return D};bk.ui.enctip.build_tip_generic=function(B,E){var D=function(F){return E.call(null,F)};var C=B;var A="/user/ajax/checknotice?entry="+C+"&r="+Math.random();baidu.ajax.get(A,function(I){var F=baidu.json.parse(I.responseText);if(F.length>0){var H=bk.ui.enctip.format_result(F,C);D(H)}})};bk.ui.enctip.set_nslog_area_type=function(C,A){var B=(typeof C==="string")?baidu.g(C):C;baidu.each(B.getElementsByTagName("a"),function(D){D.target="_blank";D.className="nslog:"+A})};bk.ui.enctip.build_edit_tip=function(){var A=function(C){var B='<div id="encourage_tipbar"><div class="push-close-btn" alt="关闭" title="关闭"  onclick="nslog(\''+window.location.href+'\', 443);var msg_pb = document.getElementById(\'encourage_tipbar\');msg_pb.parentNode.removeChild(msg_pb);msg_pb=null"></div><div><a class="icon-address" id="encourage_icon_href" href="'+C.href+'" target="_blank"><img id="encourage_icon_url" src="'+C.url+'" alt="打开链接" title="打开链接"  /></a><span id="encourage_text">'+C.text+"</span></div></div>";if(baidu.g("inputShowMainInfoBoxDiv")){baidu.dom.insertHTML("inputShowMainInfoBoxDiv","afterEnd",B);bk.ui.enctip.set_nslog_area_type("encourage_text",436)}};bk.ui.enctip.build_tip_generic(0,A)};bk.ui.enctip.build_usercenter_tip=function(){var A=function(H){var C=H.text.length;var B=[];for(var F=0;F<C;++F){B.push("<li><span>");B.push(H.text[F]);B.push("</span></li>")}var D=window.location.href;var E='<div class="push-ads" id="push_ads"><a id="banner_href" href="'+H.banner_href+'" class="icon-address" target="_blank" onclick="nslog(\''+H.banner_href+'\',437)"><img id="banner_url" src="'+H.banner_url+'" alt="打开链接" title="打开链接" width="778px" height="100px"/></a><a class="del" onclick="nslog(\''+D+'\', 444);var del = document.getElementById(\'push_ads\');del.parentNode.removeChild(del);del=null"><img src="http://img.baidu.com/img/baike/encourage/push-del.gif" alt="关闭" title="关闭" /></a></div><dl class="mod-push" id="enc_push_bar"><dt><p><a id="encourage_icon_href" href="'+H.href+'" class="icon-address" target="_blank"><img id="encourage_icon_url" src="'+H.url+'" alt="打开链接" title="打开链接" /></a><span id="encourage_title">'+H.title+'</span></p><div class="del" onclick="nslog(\''+D+'\', 445);var del = document.getElementById(\'enc_push_bar\');del.parentNode.removeChild(del);del=null" title="关闭"></div></dt><dd><ul id="encouragements">'+B.join("")+"</ul></dd></dl>";baidu.dom.insertHTML("col_main","afterBegin",E);bk.ui.enctip.set_nslog_area_type("encouragements",438)};bk.ui.enctip.build_tip_generic(2,A)};bk.ui.enctip.build_userinfo_tip=function(){var A=baidu.g("encourage");if(!A){return }var B=function(F){baidu.g("encourage_icon_href").href=F.href;var H=baidu.g("encourage_title");H.href=F.href;H.innerHTML=F.title;var C=F.text.length;var E=[];for(var D=0;D<C;++D){E.push("<li><span>");E.push(F.text[D]);E.push("</span></li>")}var I=baidu.g("encouragements");I.innerHTML=E.join("");baidu.removeClass(A,"dnone");baidu.removeClass(A.parentNode,"dnone");bk.ui.enctip.set_nslog_area_type(I,439)};bk.ui.enctip.build_tip_generic(3,B)};bk.ui.enctip.build_edit_success_tip=function(B){var A=function(F){var E='<a href="'+F.banner_href+'" onclick="nslog(\''+F.banner_href+'\',440)" target="_blank"><img width="450px" height="60px" src="'+F.banner_url+'" /></a>';var D=baidu.g("encourage_tip");D.innerHTML=E;D.style.display="block";var C=baidu.g("encourage_text");C.innerHTML=F.text;C.style.display="block"};bk.ui.enctip.build_tip_generic(4,A)};String.prototype.trim=function(){return this.replace(/(^[\s\t\xa0\u3000]+)|([\u3000\xa0\s\t]+$)/g,"")};String.prototype.byteLength=function(){return this.replace(/[^\u0000-\u007f]/g,"\u0061\u0061").length};var G=Fe.G;function picLoaded(B,A){if(B.height>A){var D=A/B.height;var C=B.width;B.width=C*D;B.height=A}if(B.width>0){B.parentNode.parentNode.style.width=(B.width+6)+"px"}}function marquee(C,F,B,J,E,H){var A;var K=false;B.innerHTML=F.innerHTML;C.onmouseover=function(){K=true};C.onmouseout=function(){K=false};C.scrollTop=0;function D(){A=setInterval(I,E);if(!K){C.scrollTop+=1}}function I(){if(C.scrollTop%J!=0){C.scrollTop+=1;if(C.scrollTop>=F.scrollHeight){C.scrollTop=0}}else{clearInterval(A);setTimeout(D,H)}}setTimeout(D,H)}var HistoryData=(function(){var monthList=["一","二","三","四","五","六","七","八","九","十","十一","十二"];var date=new Date();var year=date.getFullYear();var day=date.getDate();var month=date.getMonth();function onData(json){json=eval(json.responseText);if(json.length>1&&json[0].date){var curDate=json[0].date;day=curDate.slice(2,4)-0;month=curDate.slice(0,2)-1;var festival=json[0].festival;Fe.G("month").innerHTML=monthList[month]+"月";Fe.G("days").innerHTML=day;var list="<ul>";for(var i=1,l=json.length;i<l;i++){list+="<li"+(i+1==l?" class='clearBorder'":"")+"><span>"+json[i].year+"年，"+json[i].event+"</span></li>"}list+="</ul>";var daily=Fe.G("daily-content");daily.innerHTML=list;try{Fe.each(daily.getElementsByTagName("li"),function(key,val){Utils.cutTextByWidth(key.getElementsByTagName("span")[0],298)})}catch(ex){}if(festival&&festival.text.length>10){festival.text=""}Fe.G("daily-holiday").innerHTML=festival?"<a href='"+festival.link+"' target='_blank'>"+festival.text+"</a>":"";Fe.G("calendarMore").href="/daily-post/"+(month-0+1)+".html"}}function formatDay(d){var t=new Date(year,month,day);t.setDate(day-0+d);var m=t.getMonth()+1;var d=t.getDate();if(m<10){m="0"+m}if(d<10){d="0"+d}return""+m+d}function nextDay(){getDate(formatDay(1))}function preDay(){getDate(formatDay(-1))}function init(){try{getDate()}catch(e){alert("error")}Fe.on(Fe.G("preDay"),"click",preDay);Fe.on(Fe.G("nextDay"),"click",nextDay)}function getDate(date){Fe.Ajax.get("/api/indexData?datatype=lsjt"+(date?"&date="+date:"")+"&fr=bk&t="+(Math.random()*1000),onData)}return{set:onData,next:nextDay,pre:preDay,init:init}})();var Utils=(function(){function B(L,N,I,D,K){var K;var H=Fe.G(L);var M=D||4;if(K){K=Fe.G(K)}else{K=H}if(M<4){M=4}var F={width:"scrollWidth",height:"scrollHeight"};var J=F[I];if(K[J]<=N){return false}var E=H.innerHTML+"...";while(K[J]>N){E=E.substr(0,E.length-M)+"...";H.innerHTML=E}}function C(F,D,E){B(F,D,"height",8,E)}function A(F,E,D){B(F,E,"width",4,D)}return{cutTextByHeight:C,cutTextByWidth:A}})();try{if(document.execCommand){document.execCommand("BackgroundImageCache",false,true)}}catch(e){}var flag=0;var Msg_loopNum=5;function showMsg(){if(typeof (redmsg)!="undefined"){if(!redmsg||redmsg.length<1){return }redmsg=redmsg.replace(/\u6211\u7684/g,"");redmsg=redmsg.replace(/\/\d+\)/,")");if(/>0<\/span>/g.test(redmsg)||/\(0\)/g.test(redmsg)){redmsg=redmsg.replace(/\([^\)]+\)/g,"")}document.getElementById("mnum").innerHTML=redmsg}else{if(Msg_loopNum>0){setTimeout(function(){showMsg()},100);Msg_loopNum--}}}function g(){var A=location.search;if(A.indexOf("q=")!=-1){try{var B=(A.match(new RegExp("q=[^&$]*")).toString());document.f1.word.value=decodeURIComponent(B.substr(2))}catch(C){}}}function cutText(H,F){if(F){if(typeof (document.getElementsByTagName("body")[0].style.textOverflow)!="undefined"&&typeof (window.opera)!="undefined"){return }}for(var B in H){var E=H[B];var A=document.getElementsByName(B);for(var C=A.length-1;C>=0;C--){if(A[C].scrollWidth>E){A[C].innerHTML+="..."}var D=A[C].innerHTML;while(A[C].scrollWidth>E){D=D.substr(0,D.length-4)+"...";A[C].innerHTML=D}}}}function formatPic(A){for(var B in A){var J=A[B].width;var K=A[B].height;var H=A[B].valign;var C=document.getElementsByName(B);for(var D=0;D<C.length;D++){var I=C[D].width;var E=C[D].height;if(I>0&&E>0){var F=Math.min(J/I,K/E);if(F<=1){C[D].width=I*F;C[D].height=E*F}if(H==1){C[D].style.marginTop=(K-C[D].height)/2+"px"}}}}}var SwitchTab=(function(){var A=function(D,B){for(var C=1;C<=2;C++){G(B+"tab_"+C).className="";G(B+"tab_con_"+C).style.display="none";G(B+"tab_more_"+C).style.display="none"}G(B+"tab_"+D).className=B+"tab_on";G(B+"tab_con_"+D).style.display="block";G(B+"tab_more_"+D).style.display="block"};return{lc:A}})();function cutTextByByte(A,D,E){var C=[];if(typeof A=="string"){C=baidu.dom.query(A)}else{C=[A]}var B=E.byteLength();baidu.each(C,function(I){var J=I.innerHTML;var H=J.byteLength();if(H>D){var F=D-B;I.innerHTML=baidu.string.subByte(J,F)+E}})}baidu.dom.ready(function(){cutTextByByte('#tobePer a[name="mltitle"]',13,"...")});function s(E,D){if(document.f1.word.value.length>0){var C=E.href;var B=encodeURIComponent(document.f1.word.value);if(C.indexOf("q=")!=-1){E.href=C.replace(new RegExp("q=[^&$]*"),"q="+B)}else{var A=D?"&":"?";E.href=E.href+A+"q="+B}}}var Detect={detecting:function(){handle_doDetect()},url:"",id:"",content:""};function formatDetect(B){var A=Fe.Dialog.open("/page/detect.html",{title:B,width:"388px",height:"190px",buttonbar:true,buttonAccept:true,buttonCancel:true,contentType:"HTMLUrl",locked:true});return A}function formatDetect_privcheck(B){var A=Fe.Dialog.open("/page/privcheck.html",B);return A}function handle_doDetect(){baidu.sio.callByBrowser("/js/Dialog/Dialog.js",doDetect)}function doDetect(){var _str="tp=0&r="+Math.random()+"&lemmaid="+Detect.id+"&lemmaVersionId=0";var _url="/getConflictInfo/?"+_str;Fe.Ajax.get(_url,function(xhr){callback(eval("("+xhr.responseText+")"))})}function callback(B){if(B.isMidNight==1){Detect.content='您当前的编辑时间属百科<a href="http://www.baidu.com/search/baike_help.html#&#20160;&#20040;&#26159;&#22812;&#38388;&#32534;&#36753;&#25552;&#31034;" target="_blank">特殊编辑时段</a>。<br><br>为保证您的编辑成果在提交后的最短时间内生效，百科建<br>议您选择其他时间进行编辑：）<br><br>仍然要继续编辑吗？';var A=formatDetect("编辑提示");A.onaccept=function(){window.location=Detect.url}}else{window.location=Detect.url}}var BKLog={};var sid=((new Date()).getTime()+"_"+Math.round(Math.random()*2147483637));BKLog.sendEnterBaikeStat=function(C){if(document.images){var B=new Image();var A=(new Date()).getTime();window["BK_"+A]=B;B.src="/js/blank.js?func="+C+"&sid="+sid+"&t="+A}};function sendStat(B){var A=new Image();window["bd_stat_"+(new Date()).getTime()]=A;A.src="/js/blank.js?func="+B+"&sid="+sid+"&t="+(new Date()).getTime()}function moreLemmaMouseOnTr(A){A.className="over"}function moreLemmaMouseOutTr(A){A.className=""}function moreLemmaMouseOnTd(A){if(A.className.indexOf("listBar0")!=-1){A.title="完善空间极大"}else{if(A.className.indexOf("listBar1")!=-1){A.title="完善空间大"}else{if(A.className.indexOf("listBar2")!=-1){A.title="完善空间中"}else{if(A.className.indexOf("listBar3")!=-1){A.title="完善空间小"}}}}}baidu.dom.ready(function(){baidu.sio.callByBrowser("http://baike.bdimg.com/js/bk.usercard.js?r="+Math.random())});var G=baidu.G;if(typeof baidu.ns=="undefined"||typeof baidu.ns.more=="undefined"){baidu.more=baidu.more||{};baidu.more.ns=function(E){var F=E.split(".");var B=window;for(var D=0,A=F.length;D<A;D++){var C=F[D];if(C==""){continue}B[C]=(B[C]||{});B=B[C]}}}if(typeof nslog=="undefined"){function nslog_inner(B,D,A){var C=(new Date()).getTime();var E=["http://nsclick.baidu.com/v.gif?pid="+nslog.pid,"url="+encodeURIComponent(B),"type="+D,"t="+C];for(k in A){E.push(k+"="+A[k])}for(k in nslog.log_params){E.push(k+"="+nslog.log_params[k])}nslog.req(E.join("&"))}nslog=function(B,C,A){if(nslog.ie6){nslog.waitinglist.push([B,C,A]);if(!nslog.sending4ie6){nslog.sending4ie6=true;nslog.send4ie6()}}else{nslog_inner(B,C,A)}};nslog.ie6=false;nslog.waitinglist=[];nslog.sending4ie6=false;nslog.send4ie6=function(){if(nslog.waitinglist.length==0){nslog.sending4ie6=false}else{var A=nslog.waitinglist.shift();nslog_inner(A[0],A[1],A[2]);setTimeout(function(){nslog.send4ie6()},100)}};if(/msie (\d+\.\d)/i.test(navigator.userAgent)){var ie=document.documentMode||+RegExp["\x241"];nslog.ie6=ie==6}nslog.pid=103;nslog.log_params={};nslog.set=function(A,B){nslog.log_params[A]=B};nslog.sid=((new Date()).getTime()+"_"+Math.round(Math.random()*2147483637));nslog.stat=function(A){nslog.req("/js/blank.js?func="+A+"&sid="+nslog.sid+"&t="+(new Date()).getTime())};nslog.req=function(A){var C="iknowlog_"+(new Date()).getTime();var B=window[C]=new Image();B.onload=B.onerror=function(){window[C]=null};B.src=A;B=null};baidu.dom.ready(function(){baidu.on(document,"mousedown",function(H){var L=baidu.event.get(H);var O=L.target;var M=3;var C=false;var F="";var K=true;var N=/nslog:(\d+)/;var A=/nslog-area/;var B=window.location.href;while(O){if(O.nodeType==1){var J=O.className.match(N);if(M>0){B=O.href?O.href:window.location.href;if(K&&J){var E={x:L.pageX,y:L.pageY};var D=O.getAttribute("log-data-detail");if(D){E["log-data-detail"]=D}nslog(B,J[1],E);K=false}if(!C&&O.href){C=true;F=B}}if(C&&A.test(O.className)){var I=O.getAttribute("data-nslog-type");var E={x:L.pageX,y:L.pageY};var D=O.getAttribute("log-data-detail");if(D){E["log-data-detail"]=D}if(I){nslog(F,I,E)}}}M--;O=O.parentNode}O=null;N=null;A=null})})}if(typeof userlogin=="undefined"||typeof userlogin.check=="undefined"){var g_pop=g_pop||function(){};if(!Array.prototype.push){Array.prototype.push=function(){var B=this.length;for(var A=0;A<arguments.length;A++){this[B+A]=arguments[A]}return this.length}}function G(){var C=new Array();for(var B=0;B<arguments.length;B++){var A=arguments[B];if(typeof A=="string"){A=document.getElementById(A)}if(arguments.length==1){return A}C.push(A)}return C}Function.prototype.bind=function(B){var A=this;return function(){A.apply(B,arguments)}};Function.prototype.bindAsEventListener=function(B){var A=this;return function(C){A.call(B,C||window.event)}};Object.extend=function(A,B){for(property in B){A[property]=B[property]}return A};if(!window.Event){var Event=new Object()}Object.extend(Event,{observers:false,element:function(A){return A.target||A.srcElement},isLeftClick:function(A){return(((A.which)&&(A.which==1))||((A.button)&&(A.button==1)))},pointerX:function(A){return A.pageX||(A.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft))},pointerY:function(A){return A.pageY||(A.clientY+(document.documentElement.scrollTop||document.body.scrollTop))},stop:function(A){if(A.preventDefault){A.preventDefault();A.stopPropagation()}else{A.returnValue=false;A.cancelBubble=true}},findElement:function(C,B){var A=Event.element(C);while(A.parentNode&&(!A.tagName||(A.tagName.toUpperCase()!=B.toUpperCase()))){A=A.parentNode}return A},_observeAndCache:function(D,C,B,A){if(!this.observers){this.observers=[]}if(D.addEventListener){this.observers.push([D,C,B,A]);D.addEventListener(C,B,A)}else{if(D.attachEvent){this.observers.push([D,C,B,A]);D.attachEvent("on"+C,B)}}},unloadCache:function(){if(!Event.observers){return }for(var A=0;A<Event.observers.length;A++){Event.stopObserving.apply(this,Event.observers[A]);Event.observers[A][0]=null}Event.observers=false},observe:function(D,C,B,A){if("string"==typeof D){D=G(D)}A=A||false;if(C=="keypress"&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||D.attachEvent)){C="keydown"}this._observeAndCache(D,C,B,A)},stopObserving:function(D,C,B,A){if("string"==typeof D){D=G(D)}A=A||false;if(C=="keypress"&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||D.detachEvent)){C="keydown"}if(D.removeEventListener){D.removeEventListener(C,B,A)}else{if(D.detachEvent){D.detachEvent("on"+C,B)}}}});Event.observe(window,"unload",Event.unloadCache,false);var Class=function(){var A=function(){this.initialize.apply(this,arguments)};for(i=0;i<arguments.length;i++){superClass=arguments[i];for(member in superClass.prototype){A.prototype[member]=superClass.prototype[member]}}A.child=function(){return new Class(this)};A.extend=function(B){for(property in B){A.prototype[property]=B[property]}};return A};var Popup=new Class();Popup.prototype={iframeIdName:"ifr_popup",initialize:function(A){this.config=Object.extend({contentType:1,isHaveTitle:true,scrollType:"no",isBackgroundCanClick:false,isSupportDraging:true,isShowShadow:true,isReloadOnClose:true,width:400,isPop:false,height:300},A||{});this.info={shadowWidth:3,title:"",contentUrl:"",contentHtml:"",callBack:null,parameter:null,confirmCon:"",alertCon:"",someHiddenTag:"select,object,embed",someDisabledBtn:"",someHiddenEle:"",overlay:0,coverOpacity:30};this.color={cColor:"#000",bColor:"#FFFFFF",tColor:"#709CD2",wColor:"#FFFFFF"};this.dropClass=null;this.someToHidden=[];this.someToDisabled=[];if(!this.config.isHaveTitle){this.config.isSupportDraging=false}this.iniBuild()},setContent:function(A,B){if(B!=""){switch(A){case"width":this.config.width=B;break;case"height":this.config.height=B;break;case"title":this.info.title=B;break;case"contentUrl":this.info.contentUrl=B;break;case"contentHtml":this.info.contentHtml=B;break;case"callBack":this.info.callBack=B;break;case"parameter":this.info.parameter=B;break;case"confirmCon":this.info.confirmCon=B;break;case"alertCon":this.info.alertCon=B;break;case"someHiddenTag":this.info.someHiddenTag=B;break;case"someHiddenEle":this.info.someHiddenEle=B;break;case"someDisabledBtn":this.info.someDisabledBtn=B;break;case"overlay":this.info.overlay=B}}},iniBuild:function(){var A=G("dialogCase");if(A){document.body.removeChild(A)}A=document.createElement("DIV");A.id="dialogCase";A.style.zIndex=65535;A.style.top=0;A.style.left=0;A.style.position="absolute";A.style.width="100%";document.body.appendChild(A)},build:function(){var B=10001+this.info.overlay*10;var I=B+2;this.iframeIdName="ifr_popup"+this.info.overlay;var K="http://img.baidu.com/hi/img/";var J='<div id="dialogBoxClose" style="width:18px;height:18px;cursor:pointer;margin-bottom:2px;"><div>';var F="filter: alpha(opacity="+this.info.coverOpacity+");opacity:"+this.info.coverOpacity/100+";";var L='<div id="dialogBoxBG" style="position:absolute;top:0px;left:0px;z-index:'+B+";"+F+"background-color:"+this.color.cColor+';display:none;"></div>';var E='<div id="dialogBox" style="border:1px solid #104987;display:none;z-index:'+I+";position:relative;width:"+this.config.width+'px;background:url(\'http://img.baidu.com/img/baike/editor/bgs.gif\') repeat-x scroll 0 -68px #1169B1;padding:1px;"><table width="100%" border="0" cellpadding="0" cellspacing="0" style="background:url(\'http://img.baidu.com/img/baike/editor/bgs.gif\') repeat-x 0 -144px">';if(this.config.isHaveTitle){E+='<tr height="29"><td style="background:url(\'http://img.baidu.com/img/baike/editor/edithelper.gif\') no-repeat right -68px transparent;"><table style="-moz-user-select:none;height:24px;" width="100%" border="0" cellpadding="0" cellspacing="0" ><tr><td width="6" height="24"></td><td id="dialogBoxTitle" style="color:'+this.color.wColor+';font-size:14px;font-weight:bold;">'+this.info.title+'&nbsp;</td><td id="dialogClose" width="18" align="right" valign="middle">'+J+'</td><td width="9"></td></tr></table></td></tr>'}else{E+='<tr height="10"><td align="right">'+J+"</td></tr>"}E+='<tr id="container-tr" style="height:'+(this.config.height-36)+'px" valign="top"><td style="position:relative;padding:1px;"><div style="border:1px solid #FFF;"><div style="background:url(\'http://img.baidu.com/img/baike/editor/bgs.gif\') repeat-x #FFF;height:13px;line-height:13px;font-size:1px;">&nbsp;</div><div id="dialogBody" style="background-color:#FFF;height:'+(this.config.height-46)+"px;width:"+(this.config.width-4)+'px"></div></div></td></tr></table></div><div id="dialogBoxShadow" style="display:none;z-index:'+B+';"></div>';if(!this.config.isBackgroundCanClick){G("dialogCase").innerHTML=L+E;var H=document,D=H.body,C=H.documentElement,A=H.compatMode=="BackCompat"?D:H.documentElement;G("dialogBoxBG").style.height=Math.max(C.scrollHeight,D.scrollHeight,A.clientHeight)+"px";G("dialogBoxBG").style.width=window.screen.width+"px"}else{G("dialogCase").innerHTML=E}Event.observe(G("dialogBoxClose"),"click",this.reset.bindAsEventListener(this),false);if(this.config.isSupportDraging){dropClass=new Dragdrop(this.config.width,this.config.height,this.info.shadowWidth,this.config.isSupportDraging,this.config.contentType);G("dialogBoxTitle").style.cursor="move"}this.lastBuild()},lastBuild:function(){var B='<div style="width:100%;height:100%;text-align:center;"><div style="margin:0 20px 0 20px;padding-top:20px;font-size:14px;line-height:16px;color:#000000;">'+this.info.confirmCon+'</div><div style="margin:20px;"><input id="dialogOk" type="button" value="  确定  "/>&nbsp;<input id="dialogCancel" type="button" value="  取消  "/></div></div>';var E='<div style="width:100%;height:100%;text-align:center;background-color:#fff"><div style="margin:0 20px;font-size:14px;line-height:16px;color:#000000;">'+this.info.alertCon+'</div><div style="margin:20px;"><input id="dialogYES" type="button" value="  确定  "/></div></div>';var A=10001+this.info.overlay*10;var D=A+4;if(this.config.contentType==1){var C="<iframe style='height:"+(this.config.height-46)+"px;width:"+(this.config.width-4)+"px;' name='"+this.iframeIdName+"' id='"+this.iframeIdName+"' src='"+this.info.contentUrl+"' frameborder='0' scrolling='"+this.config.scrollType+"'></iframe>";var F="<div id='iframeBG' style='position:absolute;top:0px;left:0px;width:1px;height:1px;z-index:"+D+";filter: alpha(opacity=00);opacity:0.00;background-color:#ffffff;'><div>";G("dialogBody").innerHTML=C+F}else{if(this.config.contentType==2){G("dialogBody").innerHTML=this.info.contentHtml}else{if(this.config.contentType==3){G("dialogBody").innerHTML=B;Event.observe(G("dialogOk"),"click",this.forCallback.bindAsEventListener(this),false);Event.observe(G("dialogCancel"),"click",this.close.bindAsEventListener(this),false)}else{if(this.config.contentType==4){G("dialogBody").innerHTML=E;Event.observe(G("dialogYES"),"click",this.close.bindAsEventListener(this),false)}}}}},reBuild:function(){G("dialogBody").height=G("dialogBody").clientHeight;this.lastBuild()},show:function(){this.hiddenSome();this.middle();if(this.config.isShowShadow){this.shadow()}},resize:function(C,F,I){this.setContent("width",C);this.setContent("height",F);var H=G("dialogBox");var E=G("dialogBody");H.style["width"]=C+"px";H.style["height"]=F+"px";var D=G(this.iframeIdName);D.style["height"]=F-46+"px";D.style["width"]=C-4+"px";E.style["height"]=F-46+"px";E.style["width"]=C-4+"px";if(I){this.setContent("title",I);var B=G("dialogBoxTitle");B.innerHTML=I+"&nbsp;"}var A=G("container-tr");A.style["height"]=F-36+"px";this.show()},forCallback:function(){return this.info.callBack(this.info.parameter)},shadow:function(){var A=G("dialogBoxShadow");var B=G("dialogBox");A.style["top"]=B.offsetTop+this.info.shadowWidth+10+"px";A.style["left"]=B.offsetLeft+this.info.shadowWidth+6+"px";A.style["width"]=B.offsetWidth-6+"px";A.style["height"]=B.offsetHeight-10+"px";A.style["position"]="absolute";A.style["background"]="#000";A.style["display"]="";A.style["opacity"]="0.1";A.style["filter"]="alpha(opacity=20)"},middle:function(){if(!this.config.isBackgroundCanClick){G("dialogBoxBG").style.display=""}var F=G("dialogBox");F.style["position"]="absolute";F.style["display"]="";var C=(document.documentElement.clientWidth||document.body.clientWidth);var E=(document.documentElement.clientHeight||document.body.clientHeight);var B=(document.documentElement.scrollTop||document.body.scrollTop);var D=(C/2)-(F.offsetWidth/2);var A=(E/2+B)-(F.offsetHeight/2);if(A<B){A=20+B}if(D<1){D=20}F.style["left"]=D+"px";F.style["top"]=A+"px"},reset:function(A){this.close();if(typeof A!=="boolean"){A=false}if(this.config.isReloadOnClose||A){top.location.href=top.location.href.replace(/#.*$/g,"")}},close:function(){G("dialogBox").style.display="none";if(!this.config.isBackgroundCanClick){G("dialogBoxBG").style.display="none"}if(this.config.isShowShadow){G("dialogBoxShadow").style.display="none"}G("dialogBody").innerHTML="";this.showSome()},hiddenSome:function(){var A=this.info.someHiddenTag.split(",");if(A.length==1&&A[0]==""){A.length=0}for(var B=0;B<A.length;B++){this.hiddenTag(A[B])}var C=this.info.someHiddenEle.split(",");if(C.length==1&&C[0]==""){C.length=0}for(var B=0;B<C.length;B++){this.hiddenEle(C[B])}var C=this.info.someDisabledBtn.split(",");if(C.length==1&&C[0]==""){C.length=0}for(var B=0;B<C.length;B++){this.disabledBtn(C[B])}},disabledBtn:function(B){var A=document.getElementById(B);if(typeof (A)!="undefined"&&A!=null&&A.disabled==false){A.disabled=true;this.someToDisabled.push(A)}},hiddenTag:function(B){var C=document.getElementsByTagName(B);if(C!=null){for(var A=0;A<C.length;A++){if(C[A].style.display!="none"&&C[A].style.visibility!="hidden"){C[A].style.visibility="hidden";this.someToHidden.push(C[A])}}}},hiddenEle:function(B){var A=document.getElementById(B);if(typeof (A)!="undefined"&&A!=null){A.style.visibility="hidden";this.someToHidden.push(A)}},showSome:function(){for(var A=0;A<this.someToHidden.length;A++){this.someToHidden[A].style.visibility="visible"}for(var A=0;A<this.someToDisabled.length;A++){this.someToDisabled[A].disabled=false}},replaceIframe:function(A){this.setContent("contentUrl",A);G(this.iframeIdName).src=A}};var Dragdrop=new Class();Dragdrop.prototype={initialize:function(C,B,A,D,E){this.dragData=null;this.dragDataIn=null;this.backData=null;this.width=C;this.height=B;this.shadowWidth=A;this.showShadow=D;this.contentType=E;this.IsDraging=false;this.oObj=G("dialogBox");Event.observe(G("dialogBoxTitle"),"mousedown",this.moveStart.bindAsEventListener(this),false)},moveStart:function(A){this.IsDraging=true;if(this.contentType==1){G("iframeBG").style.display="";G("iframeBG").style.width=this.width+"px";G("iframeBG").style.height=this.height+"px"}Event.observe(document,"mousemove",this.mousemove.bindAsEventListener(this),false);Event.observe(document,"mouseup",this.mouseup.bindAsEventListener(this),false);Event.observe(document,"selectstart",this.returnFalse,false);this.dragData={x:Event.pointerX(A),y:Event.pointerY(A)};this.backData={x:parseInt(this.oObj.style.left),y:parseInt(this.oObj.style.top)};if(document.body.setCapture){document.body.setCapture()}},mousemove:function(A){if(!this.IsDraging){return }var C=Event.pointerX(A)-this.dragData.x+parseInt(this.oObj.style.left);var B=Event.pointerY(A)-this.dragData.y+parseInt(this.oObj.style.top);if(this.dragData.y<parseInt(this.oObj.style.top)){B=B-12}else{if(this.dragData.y>parseInt(this.oObj.style.top)+25){B=B+12}}this.oObj.style.left=C+"px";this.oObj.style.top=B+"px";if(this.showShadow){G("dialogBoxShadow").style.left=C+this.shadowWidth+6+"px";G("dialogBoxShadow").style.top=B+this.shadowWidth+10+"px"}this.dragData={x:Event.pointerX(A),y:Event.pointerY(A)};document.body.style.cursor="move"},mouseup:function(C){if(!this.IsDraging){return }if(this.contentType==1){G("iframeBG").style.display="none"}document.onmousemove=null;document.onmouseup=null;var B=Event.pointerX(C)-(document.documentElement.scrollLeft||document.body.scrollLeft);var A=Event.pointerY(C)-(document.documentElement.scrollTop||document.body.scrollTop);if(B<1||A<1||B>document.body.clientWidth||A>document.body.clientHeight){this.oObj.style.left=this.backData.x+"px";this.oObj.style.top=this.backData.y+"px";if(this.showShadow){G("dialogBoxShadow").style.left=this.backData.x+this.shadowWidth+6+"px";G("dialogBoxShadow").style.top=this.backData.y+this.shadowWidth+10+"px"}}this.IsDraging=false;document.body.style.cursor="";Event.stopObserving(window,"selectstart",this.returnFalse,false);if(document.body.releaseCapture){document.body.releaseCapture()}},returnFalse:function(){return false}};var baikeLoginArgs=[];function userLogin(){switch(arguments.length){case 0:relogin();break;case 1:baikeLoginArgs=[arguments[0]];loginflag.setLoginArr("loginSt",0);loginflag.setLoginArr("loginUrl",arguments[0]);checkIfLogin();break;default:baikeLoginArgs=[arguments[0],arguments[1]];loginflag.setLoginArr("loginSt",1);loginflag.setLoginArr("isDetect",arguments[0]);loginflag.setLoginArr("loginTip",arguments[1]);checkIfLogin();break}nslog(location.href,88,{name:"login"})}function checkReloginResult(){afterLogin()}function afterLogin(){switch(baikeLoginArgs.length){case 0:try{bk.editor.unloadConfirm.clear()}catch(A){}window.location=location.href.replace(/#.*/,"");g_pop.close();break;case 1:window.location=baikeLoginArgs[0];g_pop.close();break;default:g_pop.close();if(loginflag.getLoginArr("isDetect")==3){Detect.detecting()}else{try{cnEdit()}catch(A){if(bk.editor){bk.editor.submiter.submitform()}else{submitform()}}}break}}function relogin(A){g_pop=new Popup({contentType:1,isReloadOnClose:false,width:408,height:345});g_pop.setContent("title","登录到百度百科");g_pop.setContent("contentUrl","/page/userlogin.html"+(A?("?fr="+A):""));g_pop.build();g_pop.show()}var userlogin=userlogin||function(){};userlogin.reg=function(A){var B="/page/userlogin.html?userreg"+(A?("&fr="+A):"");g_pop=new Popup({contentType:1,isReloadOnClose:false,width:408,height:345});g_pop.setContent("title","登录到百度百科");g_pop.setContent("contentUrl",B);g_pop.build();g_pop.show()};var regOkHandler=function(A){g_pop.replaceIframe("/page/regok.html?un="+encodeURIComponent(A));g_pop.resize(538,395)};var offlineTimer;function checkIfLogin(){var B="http://baike.baidu.com/login?s="+Math.random();var A=document.createElement("script");A.setAttribute("type","text/javascript");A.setAttribute("src",B);document.getElementsByTagName("head")[0].appendChild(A);offlineTimer=setTimeout(loginWarn,15000)}function wiki_relogin(){clearTimeout(offlineTimer);if(arguments[0]==1){if(loginflag.getLoginArr("loginSt")==0){loginflag.setLoginArr("loginTip",0);var C=loginflag.getLoginArr("loginUrl");var E=setParamURL(C);if(document.images){var B=new Image();var D=addURLParam("/js/blank.js","id",E);B.src=addURLParam(D,"logTp",0)}relogin(C)}else{relogin(loginflag.getLoginArr("isDetect"),loginflag.getLoginArr("loginTip"))}}else{if(loginflag.getLoginArr("loginSt")==0){window.location=loginflag.getLoginArr("loginUrl")}else{if(loginflag.getLoginArr("isDetect")==3){Detect.detecting()}else{try{cnEdit()}catch(A){if(bk.editor){bk.editor.submiter.submitform()}else{submitform()}}}}}}function loginWarn(){var A='			<br>			<div style="font-size:14px;font-weight:bold;text-align:center;padding:10px 10px">请检查您的网络链接，重新进行提交</div>	';g_pop=new Popup({contentType:2,isReloadOnClose:false,width:350,height:120});g_pop.setContent("title","提示");g_pop.setContent("contentHtml",A);g_pop.build();g_pop.show()}function addURLParam(C,B,A){C+=(C.indexOf("?")==-1?"?":"&");C+=B+"="+A;return C}function setParamURL(B){if(B.indexOf("id=")!=-1){var A=(B.match(/id=\d+/).toString().substr(3));return A}}var loginFlag=function(){};(function loginStatus(){var A=new Array();A.loginTip=0;loginFlag.prototype.setLoginArr=function(B,C){A[B]=C};loginFlag.prototype.getLoginArr=function(B){return A[B]}})();var loginflag=new loginFlag();function getCookie(C){var B="(?:; )?"+C+"=([^;]*);?";var A=new RegExp(B);if(A.test(document.cookie)){return decodeURIComponent(RegExp["$1"])}else{return null}}function setCookie(F,H,B,C,A,E){var D=F+"="+encodeURIComponent(H);if(B){D+="; expires="+B.toGMTString()}if(C){D+="; path="+C}if(A){D+="; domain="+A}if(E){D+="; secure"}document.cookie=D}function setSug(){g_pop=new Popup({contentType:1,isReloadOnClose:false,width:300,height:180});g_pop.setContent("title","设置");g_pop.setContent("contentUrl","/page/suggestion.html");g_pop.build();g_pop.show()}function userlogin(B,A){userlogin.onLoginSuccess=B||userlogin.defalutLoginSuccess;userLogin()}userlogin.defalutLoginSuccess=userlogin.onLoginSuccess=function(){window.location.href=window.location.href.replace(/#.*$/g,"")};userlogin.onLoginFailed=function(){window.location="http://passport.baidu.com/?login&tpl=wk&u="+escape("http://baike.baidu.com/")};userlogin.check=function(D,A,C){function B(F,H,E){if(baidu.trim(F.responseText)=="0"){if(E){E()}else{userlogin(H,C)}return false}if(H){H()}return true}baidu.ajax.get("/api/login/?t="+(new Date()).getTime()+(C?("&fr="+C):""),function(E){B(E,D,A)})};userlogin.api=(function(){var loginConfig={immediate:true,jumpUrl:"http://baike.baidu.com/page/logincallback.html?fr=loginapi",labelName:{password:"密\u3000码："},onSuccess:function(){window.location=location.href.replace(/#.*/,"")},onSystemError:function(){window.location=["http://passport.baidu.com/?login","tpl=wk",("u="+escape("http://baike.baidu.com/"))].join("&")},container_id:"user-login-container"};var loginParams={};function getPassportConfig(){var loginUrl=["http://passport.baidu.com/api/?login","tpl=wk","callback=userlogin.api.init",("time="+new Date().getTime())].join("&");baidu.sio.callByServer(loginUrl)}function setConfig(conf){baidu.object.extend(loginConfig,conf)}function configInit(conf){loginParams=eval(conf);if(loginParams.error_no==1){}else{baidu.sio.callByBrowser(loginParams.jslink,buildLoginPage)}}function buildLoginPage(){bdPass.LoginTemplate.render(loginParams,loginConfig.container_id,loginConfig)}return{get:getPassportConfig,set:setConfig,init:configInit,render:buildLoginPage}})();userlogin.userbarinit=function(){var A=baidu.G("logout");if(A&&(A.className!="goto-index")){A.href="https://passport.baidu.com/?logout&u="+escape(location.href)}};baidu.dom.ready(userlogin.userbarinit);baidu.more.ns("bk.userbar");bk.userbar.check=function(){baidu.ajax.get("/api/login/?t="+(new Date()).getTime(),function(A){bk.userbar.build(A)})};bk.userbar.build=function(req){var user=eval("("+req.responseText+")");var userbarHtml=[];if(user){userbarHtml.push('<strong><a href="http://passport.baidu.com/center" target="_blank" id="login-user-name" class="nslog:80">'+user.name+"</a></strong> "+user.title);if(user.forbid){userbarHtml.push('<span class="red">禁止发表词条</span>')}userbarHtml.push('<span id="mnum" class="nslog-area" data-nslog-type="85"></span><span class="usrbar-split">|</span><span id="my_home_container"><a id="my_home" target="_blank" class="nslog:81" href="http://baike.baidu.com/uc/home">我的百科</a></span><span class="usrbar-split">|</span><a target="_blank" href="http://zhidao.baidu.com/q?ct=24&amp;cm=16&amp;tn=ucframework&amp;fr=wk" class="nslog:84">我的知道</a>');if(user.hasspace=="true"){userbarHtml.push('<span class="usrbar-split">|</span><a target="_blank" href="http://hi.baidu.com/sys/checkuser/'+user.name+'/3" class="nslog:86">我的空间</a>')}userbarHtml.push('<span class="usrbar-split">|</span><a href="http://www.baidu.com" class="nslog:87">百度首页</a> <span class="usrbar-split">|</span> ');userbarHtml.push('<a id="logout" target="_self" href="https://passport.baidu.com/?logout&amp;u=http://baike.baidu.com" nslog:89">退出</a>')}else{userbarHtml.push('<a href="http://www.baidu.com" class="nslog:87">百度首页</a><span class="usrbar-split">|</span><a href="https://passport.baidu.com/?login&amp;tpl=wk" class="nslog:88" onclick="userlogin();return false">登录</a>')}if(user){userbarHtml.push('<div id="nav_extra" style="display:none"><div class="top"><a href="/uc/home" class="nslog:81" target="_blank">我的百科</a></div><div class="body">');if(user.channeladmin){userbarHtml.push('<div><a target="_blank" href="http://baike.baidu.com/channel-admin/" class="nslog:1002">分类管理员</a></div>')}userbarHtml.push('<div><a target="_blank" class="nslog:82" href="http://baike.baidu.com/uc/effort">我的贡献</a></div><div><a target="_blank" class="nslog:83" href="http://baike.baidu.com/uc/draft">草稿箱</a></div><div><a target="_blank" class="nslog:1003" href="http://baike.baidu.com/uc/task">我的任务</a></div><div><a target="_blank" class="nslog:1004" href="http://baike.baidu.com/uc/recommend">为我推荐</a></div></div></div>')}baidu.g("usrbar").innerHTML=userbarHtml.join("");bk.userbar.init();baidumessage();userlogin.userbarinit();if(user){bk.event.fire("bk.event.user.login");new bk.ui.enctip()}}}(function(){baidu.more.ns("bk.activity");bk.activity.Egg=function(A){this.egg=null;this.typeId=A};baidu.lang.inherits(bk.activity.Egg,baidu.lang.Class);baidu.extend(bk.activity.Egg.prototype,{show:function(){this.egg.style.display="block"},hide:function(){this.egg.style.display="none"},close:function(A){if(this.egg){this.egg.parentNode.removeChild(this.egg)}this.dispatchEvent("onClose",{flag:A})},setPosition:function(A){},build:function(){},click:function(){this.dispatchEvent("onClick")}});bk.activity.fiveYearEgg=baidu.lang.createClass(function(A){bk.activity.Egg.call(this,A)},{superClass:bk.activity.Egg}).extend({build:function(){if(!this.egg){var B=document.createElement("div");B.id="fiveYearAnniversaryEgg";B.style.position="absolute";B.style.left="-1000px";B.style.top="-1000px";document.body.appendChild(B);var A=baidu.swf.createHTML({url:"http://img.baidu.com/img/baike/usercenter/task/5yearegg"+this.typeId+".swf",width:250,height:200,wmode:"transparent",allowscriptaccess:"always"});B.innerHTML=A;this.egg=B}},setPosition:function(A){this.egg.style.left=A.l+"px";this.egg.style.top=A.t+"px"}})})();(function(){bk.activity.rule=function(){this.nextRule=null;this.validateResult=false};baidu.extend(bk.activity.rule.prototype,{validate:function(){},dispatch:function(){if(this.validateResult){this.dispatchEvent("onValidateOK");if(this.nextRule){this.nextRule.validate()}else{this.m.dispatchEvent("onValidateOver")}}else{this.dispatchEvent("onValidateError")}}});baidu.lang.inherits(bk.activity.rule,baidu.lang.Class);bk.activity.ratioRule=baidu.lang.createClass(function(A){this.p=A||0.3},{superClass:bk.activity.rule}).extend({validate:function(){this.validateResult=(this.p>=Math.random());this.dispatch()}});bk.activity.fiveYearLemmaRule=baidu.lang.createClass(function(B,A){this.lemmaTitle=B;this.lemmaRules=A},{superClass:bk.activity.rule}).extend({validate:function(){for(var D=0,B=this.lemmaRules.length;D<B;++D){var F=this.lemmaRules[D];if(Object.prototype.toString.apply(F)=="[object Array]"){var C=new Date;var E=C.getMonth()+1;var A=C.getDate();if(F[0]==this.lemmaTitle&&E+"."+A==F[1]){this.validateResult=true;break}}else{if(F==this.lemmaTitle){this.validateResult=true;break}}}this.dispatch()}});bk.activity.getRewardRule=baidu.lang.createClass(function(A){this.checkEggUrl="/fiveyear/coloregg/?"+baidu.url.jsonToQuery({action:"checkEgg",eggType:A.typeId,r:Math.random()})},{superClass:bk.activity.rule}).extend({validate:function(){var A=this;baidu.ajax.get(this.checkEggUrl,function(C){var B=baidu.json.parse(C.responseText);A.validateResult=B.success;A.dispatch()})}});bk.activity.dateRangeRule=baidu.lang.createClass(function(A,B){this.beginDate=A;this.endDate=B},{superClass:bk.activity.rule}).extend({validate:function(){var A=new Date();this.validateResult=(this.beginDate<=A&&this.endDate>=A);this.dispatch()}});bk.activity.fiveYearManager=function(F){var C=[];var D=this;function B(K){var I=C.length;if(I>0){var J=C[I-1];J.nextRule=K}K.m=D;C.push(K)}function H(){if(C.length>0){C[0].validate()}}baidu.extend(D,{add:B,run:H});var E=0,A=F.length;while(E<A){B(F[E++])}};baidu.lang.inherits(bk.activity.fiveYearManager,baidu.lang.Class)})();(function(){var B=[];var I=false;var E=false;var C=null;var D="bk.activity.5year.egg";var A="bk.activity.5year.bless";var F=1800000;if(baidu.browser.ie==6){try{document.execCommand("BackgroundImageCache",false,true)}catch(H){}}baidu.more.ns("bk.activity.fiveYearAct");bk.activity.fiveYearAct.init=function(N){N=parseInt(N,10);E=baidu.cookie.get(D);var M=null;var P=new bk.activity.dateRangeRule(Date.parse("4/11/2011"),Date.parse("6/11/2011"));switch(N){case 1:B.push(new bk.activity.ratioRule());break;case 2:case 3:B.push(new bk.activity.ratioRule(1));break;case 4:var Q=document.title.split("_");if(Q[0]=="百度百科"){N=4}if(Q[0]=="4月20日"){N=5}M=new bk.activity.fiveYearLemmaRule(Q[0],["百度百科",["4月20日","4.20"]]);B.push(M);B.push(new bk.activity.ratioRule(1));break}var L="/fiveyear/coloregg/?"+baidu.url.jsonToQuery({action:"getEgg",eggType:N,r:Math.random()});fiveYearEgg=new bk.activity.fiveYearEgg(N);fiveYearEgg.addEventListener("onClick",function(){if(I){fiveYearEgg.close();O()}else{fiveYearEgg.close();userlogin(function(){baidu.cookie.set(D,true);location.href=location.href.replace(/#.*$/g,"")})}});fiveYearEgg.addEventListener("onClose",function(R){if(R&&R.flag){nslog(location.href,457,{eggType:N})}});userlogin.check(function(){I=true;var R=new bk.activity.getRewardRule(fiveYearEgg);R.addEventListener("onValidateError",function(){if(E!=null){baidu.cookie.remove(D);eggPop=new Popup({width:400,height:150,contentType:2,isReloadOnClose:false});eggPop.setContent("title","百科五周年");eggPop.setContent("contentHtml",'<div><h3 style="margin:0 30px;font-size:14px;line-height:24px;">对不起！你已经领取过该彩蛋了。到<a href="/cms/s/5years/surprise.html" target="_blank" style="margin:0 2px;color:#004080;text-decoration:none;">嘉年华活动页</a>去看看你收集的彩蛋吧。</h3><div style="text-align:center;margin-top:20px;"><input id="blessBtn" type="button" style="width:68px;height:25px;background:url(http://img.baidu.com/img/baike/usercenter/usercard/usercard-setting.png) no-repeat -37px 0;font-size:14px;font-weight:bold;color:#0163AF;border:0;cursor:pointer;letter-spacing:2px;" value="确定" onclick="eggPop.close.call(eggPop);"/></div></div>');eggPop.build();eggPop.show()}});var S=[P];if(N==4||N==5){S.push(M)}S.push(R);J(S)},function(){B.unshift(P);J(B)});baidu.extend(bk.activity.fiveYearEgg,{getEgg:function(){fiveYearEgg.click()},close:function(){fiveYearEgg.close(true)}});function J(R){actManager=new bk.activity.fiveYearManager(R);actManager.addEventListener("onValidateOver",function(){if(E!=null){O()}else{fiveYearEgg.build();var S=baidu.page.getViewWidth();var V=baidu.page.getViewHeight();var U=(S-200)*0.5;var T=(V-150)*0.5;fiveYearEgg.setPosition({l:U,t:T});nslog(location.href,455,{eggType:N})}});actManager.run()}function O(){baidu.cookie.remove(D);baidu.ajax.get(L,function(S){var R=baidu.json.parse(S.responseText);if(R.success){nslog(location.href,456,{eggType:N});K()}else{alert(R.message)}})}function K(){if(!C){C=new Popup({width:465,height:295,contentType:2,isReloadOnClose:false});C.setContent("title","百科五周年");C.setContent("contentHtml",'<div style="width:460px;height:250px;background:url(http://img.baidu.com/img/baike/usercenter/task/5year-congra.png) no-repeat 0 0;"><div><a class="eggClose" title="查看彩蛋" target="_blank" href="/cms/s/5years/surprise.html" style="display:block;width:156px;height:40px;line-height:40px;position:relative;top:158px;margin-left:76px;text-indent:3000px;overflow:hidden;">查看彩蛋</a></div>');C.build();C.show();baidu.q("eggClose")[0].onclick=function(){C.close()}}}};bk.activity.fiveYearAct.view=function(){var N="/fiveyear/bless/?";var M="/fiveyear/bless/?r="+Math.random();var J="bk.activity.5year.view";var Q=baidu.cookie.get(J);function L(){var T=baidu.cookie.get("USERID");var S=A+T;if(baidu.cookie.get(S)){P();return }baidu.cookie.remove(J);baidu.ajax.get(N+baidu.url.jsonToQuery({r:Math.random(),action:"addBless"}),function(W){var V=W.responseText;if(V){var U=baidu.json.parse(W.responseText);if(U.success){R(U);baidu.cookie.set(S,Math.random().toString().slice(2),{expires:F})}else{P()}}else{alert("祝福失败")}})}function K(){baidu.ajax.get(M,function(T){var S=baidu.json.parse(T.responseText);R(S)})}function P(){location.hash="#nav";pop=new Popup({width:400,height:140,contentType:2,isReloadOnClose:false});pop.setContent("title","百科五周年");pop.setContent("contentHtml",'<div><h3 style="text-align:left;font-size:14px;text-indent:28px;line-height:24px;">亲爱的科友，今天您已经祝福过了，明天再来吧。</h3><div style="text-align:center;margin-top:20px;"><input id="blessBtn" type="button" style="width:68px;height:25px;background:url(http://img.baidu.com/img/baike/usercenter/usercard/usercard-setting.png) no-repeat -37px 0;font-size:14px;font-weight:bold;color:#0163AF;border:0;cursor:pointer;letter-spacing:2px;" value="确定" onclick="pop.close.call(pop);"/></div></div>');pop.build();pop.show()}function R(S){baidu.q("num")[0].innerHTML=S.totalBless;baidu.q("my-bless")[0].innerHTML=S.score}function O(){nslog(location.href,459);userlogin.check(L,function(){userlogin(function(){baidu.cookie.set(J,true);location.href=location.href.replace(/#.*$/g,"")})})}if(Q){L()}return{bless:O,getBlessInfo:K}};bk.activity.fiveYearAct.egg=function(){var J="/fiveyear/coloregg/?r="+Math.random();var L={1:"bai",2:"ke",3:"zhou",4:"nian",5:"wu"};function K(){baidu.ajax.get(J,function(Q){var O=baidu.json.parse(Q.responseText);if(O.colorEgg){var N=O.colorEgg.length;for(var P=0;P<N;++P){var M=O.colorEgg[P];baidu.g("fiveEgg"+M).src="img/egg_"+L[M]+".jpg"}}})}return{getEggInfo:function(){userlogin.check(K,function(){})}}}})();baidu.dom.ready(function(){if(location.href.indexOf("starlist")==-1){bk.activity.fiveYearAct.init(1)}});
