var Fe=Fe||{version:"20080809",emptyFn:function(){}};Fe.isArray=function(A){return A&&typeof (A)=="object"&&A.constructor==Array};Fe.isObject=function(A){return(A&&(typeof (A)=="object"||typeof (A)=="function"))||false};Fe.isString=function(A){return typeof A==="string"};Fe.trim=function(A){return A.replace(/(^[\s\t\xa0\u3000]+)|([\u3000\xa0\s\t]+$)/g,"")};Fe.format=function(H,J){if(arguments.length>1){var E=Fe.format,G=/([.*+?^=!:${}()|[\]\/\\])/g,F=(E.left_delimiter||"{").replace(G,"\\$1"),A=(E.right_delimiter||"}").replace(G,"\\$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 (J)=="object"){return H.replace(C,function(K,M){var L=J[M];if(typeof L=="function"){L=L(M)}return typeof (L)=="undefined"?"":L})}else{if(typeof (J)!="undefined"){var I=Array.prototype.slice.call(arguments,1);var D=I.length;return H.replace(B,function(K,L){L=parseInt(L,10);return(L>=D)?K:I[L]})}}}return H};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(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(D,A,C){if(C){Fe.extend(D,C)}if(D&&A&&typeof (A)=="object"){for(var B in A){D[B]=A[B]}}return D};Fe.extend(Fe,(function(){var D=navigator.userAgent;var E=0,C=0,A=0,F=0,G=0,B=0;if(D.indexOf("Safari")>-1&&/Version\/(\d+(\.\d+)?)/.test(D)){E=RegExp.$1}if(window.opera&&/Opera(\s|\/)(\d+(\.\d+)?)/.test(D)){A=RegExp.$2}if(D.indexOf("Gecko")>-1&&D.indexOf("KHTML")==-1&&/rv\:(\d+(\.\d+)?)/.test(D)){G=RegExp.$1}if(/MSIE (\d+(\.\d+)?)/.test(D)){F=RegExp.$1}if(/Firefox(\s|\/)(\d+(\.\d+)?)/.test(D)){B=RegExp.$2}if(D.indexOf("KHTML")>-1&&/AppleWebKit\/([^\s]*)/.test(D)){C=RegExp.$1}return({isStrict:document.compatMode=="CSS1Compat",isSafari:E,isWebkit:C,isOpera:A,isGecko:G,isIE:F,isFF:B})})());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 I=[],B=(typeof B=="string"&&B.length>0)?B.toLowerCase():null,C=(Fe.G(D)||document);if(C.getElementsByClassName){Fe.each(C.getElementsByClassName(E),function(J){if(B!=null){if(J.tagName.toLowerCase()==B){I[I.length]=J}}else{I[I.length]=J}})}else{E=E.replace(/\-/g,"\\-");var A=new RegExp("(^|\\s{1,})"+Fe.trim(E)+"(\\s{1,}|$)"),G=(B==null)?(C.all?C.all:C.getElementsByTagName("*")):C.getElementsByTagName(B),F=G.length,H=F;while(F--){if(A.test(G[H-F-1].className)){I[I.length]=G[H-F-1]}}}return I};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.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.ac=Fe.addClassName;Fe.rc=Fe.removeClassName;Fe.body=function(){var A=0,I=0,E=0,C=0,B=0,J=0;var F=window,D=document,G=D.documentElement;A=G.clientWidth||D.body.clientWidth;I=F.innerHeight||G.clientHeight||D.body.clientHeight;C=D.body.scrollTop||G.scrollTop;E=D.body.scrollLeft||G.scrollLeft;B=Math.max(D.body.scrollWidth,G.scrollWidth||0);J=Math.max(D.body.scrollHeight,G.scrollHeight||0,I);return{scrollTop:C,scrollLeft:E,documentWidth:B,documentHeight:J,viewWidth:A,viewHeight:I}};Fe.on=function(C,B,A){if(!(C=Fe.G(C))){return false}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)}};Fe.un=function(C,B,A){if(!(C=Fe.G(C))){return false}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)}};Fe.getStyle=function(B,C){B=Fe.G(B);if(!B||!C){return null}if(C=="float"){C=Fe.isIE?"styleFloat":"cssFloat"}C=C.replace(/(-[a-z])/gi,function(D,E){return E.charAt(1).toUpperCase()});var A=null;if(A=B.style[C]){return A}if(A=B.currentStyle[C]){return A}};if(typeof (HTMLElement)!="undefined"&&!window.opera){HTMLElement.prototype.__defineGetter__("currentStyle",function(){return this.ownerDocument.defaultView.getComputedStyle(this,null)});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});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}}}Fe.String={};Fe.String.trim=function(A){return A.replace(/(^[\s\t\xa0\u3000]+)|([\u3000\xa0\s\t]+$)/g,"")};Fe.String.DBC2SBC=function(C){var B;var A="";for(B=0;B<C.length;B++){str1=C.charCodeAt(B);if(str1<65296){A+=String.fromCharCode(C.charCodeAt(B));continue}if(str1<125&&!flag){A+=String.fromCharCode(C.charCodeAt(B))}else{A+=String.fromCharCode(C.charCodeAt(B)-65248)}}return A};Fe.String.getByteLength=function(A){return A.replace(/[^\x00-\xff]/g,"mm").length};Fe.String.escapeHTML=function(A){if(Fe.isString(A)){return A.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}else{return A}};Fe.String.escapeAttribute=function(A){if(Fe.isString(A)){return A.replace(/'/g,"&#39;").replace(/"/g,"&#34;")}else{return A}};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.String.insertWbr=function(){var A=null;return function(G,F){var B=A||(A=document.createElement("TEXTAREA"));if(!B){return G}B.innerHTML=Fe.String.escapeHTML(G);var C=B.value;var E=(F||5),D=new RegExp("(\\S{"+E+"})","gi");return C.replace(/(<[^>]+>)/gi,"$1<wbr/>").replace(/(>|^)([^<]+)(<|$)/gi,function(I,H,K,J){if(K.length<E){return I}return H+K.replace(D,"$1<wbr/>")+J}).replace(/&([^;]*)(<wbr\/?>)([^a-z;]*);/g,"&$1$3;")}}();Fe.Object={};Fe.Object.toQueryString=function(B){var C=[];for(var A in B){C.push(encodeURIComponent(A)+"="+encodeURIComponent(B[A]))}return C.join("&")};Fe.Object.extend=function(A,C){for(var B in C){A[B]=C[B]}return A};Fe.Array={};Fe.Array.indexOf=function(D,A,B){var C=D.length,E=Number(B)||0;E=(E<0)?Math.ceil(E):Math.floor(E);if(E<0){E+=C}for(;E<C;E++){if(E in D&&D[E]===A){return E}}return -1};Fe.Array.removeAt=function(B,A){return B.splice(A,1)};Fe.Array.remove=function(B,C){var A=Fe.Array.indexOf(B,C);if(A>=0){Fe.Array.removeAt(B,A)}return B};Fe.Array.contains=function(A,B){return Fe.Array.indexOf(A,B)>=0};Fe.Array.unique=function(B){var C=[];for(var A=0;A<B.length;A++){if(!Fe.Array.contains(C,B[A])){C.push(B[A])}}return C};Fe.Validator={};Fe.Validator.isEmail=function(A){return/^[\w-]+(\.[\w-]+)*\@([\w-]+\.)+(\d+|\w\w+)$/i.test(String(A))};Fe.Date={};Fe.Date.addDays=function(A,B){A.setDate(A.getDate()+B);return A};Fe.Date.isLeapYear=function(A){return(((A%4===0)&&(A%100!==0))||(A%400===0))};Fe.Date.getDaysInMonth=function(A,B){return[31,(Fe.Date.isLeapYear(A)?29:28),31,30,31,30,31,31,30,31,30,31][B]};Fe.Date.addMonths=function(A,B){var C=A.getDate();A.setDate(1);A.setMonth(A.getMonth()+B);A.setDate(Math.min(C,Fe.Date.getDaysInMonth(A.getFullYear(),A.getMonth())));return A};Fe.Date.addYears=function(A,B){Fe.Date.addMonths(A,B*12);return A};Fe.Date.lang={};Fe.Date.lang.dayNames=["星期日","星期一","星期二","星期三","星期四","星期五","星期六"];Fe.Date.lang.abbreviatedDayNames=["日","一","二","三","四","五","六"];Fe.Date.lang.shortestDayNames=["日","一","二","三","四","五","六"];Fe.Date.lang.firstLetterDayNames=["日","一","二","三","四","五","六"];Fe.Date.format=function(B,D){var A=B;var C=function(E){return E<10?"0"+E:E};return D.replace(/dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?/g,function(E){switch(E){case"hh":return C(A.getHours()<13?(A.getHours()===0?12:A.getHours()):(A.getHours()-12));case"h":return A.getHours()<13?(A.getHours()===0?12:A.getHours()):(A.getHours()-12);case"HH":return C(A.getHours());case"H":return A.getHours();case"mm":return C(A.getMinutes());case"m":return A.getMinutes();case"ss":return C(A.getSeconds());case"s":return A.getSeconds();case"yyyy":var F="000"+A.getFullYear();return F.substring(F.length-4);case"yy":return A.toString("yyyy").substring(2);case"dddd":return Fe.Date.lang.dayNames[A.getDay()];case"ddd":return Fe.Date.lang.abbreviatedDayNames[A.getDay()];case"dd":return C(A.getDate());case"d":return A.getDate().toString();case"MM":return C((A.getMonth()+1));case"M":return A.getMonth()+1}})};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={};for(var i=0;i<names.length;++i){window.console[names[i]]=function(){}}}Function.prototype.Extends=function(A,D){var E=this.prototype,C=this.prototype=new A();if(D){C._className=D}for(var B in E){C[B]=E[B]}this.prototype.constructor=E.constructor;E=null;if(C.hashCode){delete Sys._instances[C.hashCode]}return C};if(typeof (Sys)!="function"){var counter=0;window.Sys=function(){Sys._instances[(this.hashCode=UID())]=this};function UID(){return"mz_"+(counter++).toString(36)}Sys._instances={};Sys.getUniqueId=UID;Sys.extend=function(C,B){for(var A in B){C[A]=B[A]}return C};Sys.ie=navigator.userAgent.indexOf("MSIE")>0&&!window.opera}Sys.ie=!!window.ActiveXObject;Sys.create=function(A){var B=new Sys();if(A&&typeof (A)=="object"){Sys.extend(B,A)}return B};Sys.toHashCode=function(A){if(!A){return A}if(typeof (A.hashCode)!="undefined"){return A.hashCode}Sys._instances[A.hashCode=Sys.getUniqueId()]=A;return A.hashCode};Sys.prototype.addEventListener=function(B,C){if(typeof (C)!="function"){throw new Error(this+" addEventListener: "+C+" is not a function")}if(!this._listeners){this._listeners={}}var D=Sys.toHashCode(C),A=this._listeners;if(typeof (A[B])!="object"){A[B]={};A[B].hcsize=0}A[B].hcsize++;A[B][D]=C};Sys.prototype.removeEventListener=function(B,C){if(!this._listeners){this._listeners={}}var A=this._listeners;if(!A[B]){return }var D=Sys.toHashCode(C);if(A[B][D]){delete A[B][D];A[B][D]=null;A[B].hcsize--}if(A[B].hcsize<=0){delete A[B];A[B]=null}};Sys.prototype.dispatchEvent=function(D){if(!this._listeners){this._listeners={}}var B,A=this._listeners,C=D.type;D.target=D.srcElement=D.target||D.srcElement||this;D.currentTarget=this;if(this[C]){this[C](D)}if(typeof (A[C])=="object"){for(B in A[C]){if(B=="hcsize"){continue}A[C][B].call(null,D)}}return D.returnValue};Sys.prototype.dispose=function(){if(this.hashCode){delete Sys._instances[this.hashCode]}for(var A in this){if(typeof (this[A])!="function"){delete this[A]}}};Sys.prototype.getHashCode=function(){if(!this.hashCode){Sys._instances[(this.hashCode=Sys.getUniqueId())]=this}return this.hashCode};Sys.prototype.decontrol=function(){delete Sys._instances[this.hashCode]};Sys.prototype.toString=function(){return"[object "+(this._className||"Object")+"]"};Sys.Event=function(A,B){this.type=A;this.target=B||null};Sys.Event.Extends(Sys,"Sys.Event");Sys.extend(Sys.Event.prototype,{target:null,currentTarget:null,srcElement:null,returnValue:true,cancelBubble:false});Sys.I=function(A){return Sys._instances[A]};Sys.instance=Sys.I;Sys.loadCssFile=function(B,D){if(/\w+\.\w+(\?|$)/.test(B)){if(!(typeof (D)=="string"&&D!="")){D="MzCss_"+B.replace(/\W/g,"")}var C=document.createElement("LINK");C.href=B;C.id=D;C.type="text/css";C.rel="Stylesheet";var A=document.getElementsByTagName("HEAD")[0];A.insertBefore(C,A.firstChild)}};(function(){var A=document.getElementsByTagName("SCRIPT");if(A.length){if(!Sys.scriptElement){Sys.scriptElement=A[A.length-1]}if(Sys.scriptElement.id.toLowerCase().indexOf("_firebug")==0){Sys.scriptElement=A[A.length-2]}A=Sys.scriptElement.src.replace(/\\/g,"/");A=(A.lastIndexOf("/")<0?".":A.substring(0,A.lastIndexOf("/")))}Sys.path=A})();Sys.resourcePath=Sys.path+"/Fe/_resource";Sys.blankImage=Sys.path+"/Fe/_resource/blank.gif";Fe.Ajax=function(B){this.url="";this.data="";this.async=true;this.duration=-1;this.overtime=false;this.username="";this.password="";this.method="GET";if(typeof B=="object"&&B){for(var A in B){this[A]=B[A]}}};Fe.Ajax.global={};(function(){Fe.Ajax.prototype.request=function(D,J){var H=this,F=B(),K=F.xhr;F.active=true;H.url=D;if(typeof J=="string"&&J){H.data=J}if(typeof H.onexecute=="function"){H.onexecute(K)}try{if(!H.username){K.open(H.method,H.url,H.async)}else{K.open(H.method,H.url,H.async,H.username,H.password)}if(H.async){K.onreadystatechange=G}if(H.method.toUpperCase()=="POST"){K.setRequestHeader("Content-Type","application/x-www-form-urlencoded")}H.beginTime=new Date().getTime();if(H.duration>0){I()}K.send(H.data)}catch(E){if(typeof H.onerror=="function"){H.onerror(E)}}if(!H.async){G()}function G(){if(K.readyState==4){try{K.status}catch(L){if(typeof H.ondisconnect=="function"){H.ondisconnect(K)}F.active=false;return }H.duration=-1;if(!H.overtime){if(typeof H["on"+K.status]=="function"){H["on"+K.status](K)}if(typeof Fe.Ajax.global["on"+K.status]=="function"){Fe.Ajax.global["on"+K.status](K)}if(K.status==200&&K.statusText.toLowerCase()=="ok"){if(typeof H.onsuccess=="function"){H.onsuccess(K)}}else{if(typeof H.onfailure=="function"){H.onfailure(K)}}}F.active=false;K.onreadystatechange=function(){}}}function I(){if(H.duration==-1){return }if(new Date().getTime()-H.beginTime>H.duration){H.duration=-1;try{K.abort()}catch(L){}H.overtime=true;F.active=false;if(typeof H.ontimeout=="function"){H.ontimeout(K)}}setTimeout(function(){I()},10)}};var C=[];function B(){var F=C;for(var E=null,D=0;D<F.length;D++){E=F[D];if(!E.active){break}}if(D>=F.length){E={active:false,xhr:A()};F[F.length]=E}return E}function A(){if(window.XMLHttpRequest){return new XMLHttpRequest()}else{if(window.ActiveXObject){var F=["MSXML2.XMLHttp.6.0","MSXML2.XMLHttp.3.0","MSXML2.XMLHttp.5.0","MSXML2.XMLHttp.4.0","Msxml2.XMLHTTP","MSXML.XMLHttp","Microsoft.XMLHTTP"];for(var E=0;F[E];E++){try{return new ActiveXObject(F[E])}catch(D){}}throw new Error("Your browser do not support XMLHttp")}}}})();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 Fe.Ajax(A);D.request(B,C);return D};Fe.Ajax.get=function(A,B){return this.request(A,B)};Fe.Ajax.post=function(A,B,C){return this.request(A,B,{method:"POST",onsuccess:C})};Fe.Ajax.sio=function(D,H){if(!D||typeof D!="string"){throw new Error("invalid url parameter!")}var G=document.createElement("SCRIPT");var F=Fe.String.parseQuery(D,"callback");if(F===null){var C=false;G.onreadystatechange=G.onload=function(){if(C){return false}if(G.readyState=="loaded"||G.readyState=="complete"){C=true;try{H()}finally{if(G.parentNode){G.parentNode.removeChild(G)}G.onreadystatechange=null;G.onload=null;G=null}}}}else{var B="CB"+Math.floor(Math.random()*2147483648).toString(36);D=D.replace(/(&|\?)callback=([^&]*)(&|$)/,"$1callback="+B);window[B]=function(){try{var I=(H||window[F]);I.apply(null,arguments)}finally{if(G.parentNode){G.parentNode.removeChild(G)}G=null;window[B]=null}}}G.src=D;G.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(G,E.firstChild)};Fe.getRadioValue=function(B){var D=document.getElementsByName(B);for(var C=0,A=D.length;C<A;C++){if(D[C].checked){return D[C].value}}};Fe.Dom={};Fe.css=function(C,G){if(!C||!G){return null}C=typeof C=="string"?document.getElementById(C):C;var B=!window.opera&&navigator.userAgent.indexOf("MSIE")!=-1;if(G=="float"){G=B?"styleFloat":"cssFloat"}G=G.replace(/(-[a-z])/gi,function(H,I){return I.charAt(1).toUpperCase()});if("opacity"==G&&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[G]){return F}if(C.currentStyle){return C.currentStyle[G]}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[G]}}}return null};Fe.Dom.getStyle=function(B,A){return Fe.css(B,A)};Fe.Dom.getOwnerDocument=function(A){return A.nodeType==9?A:A.ownerDocument||A.document};Fe.Dom.getOffset=function(D){var G=Fe.Dom.getOwnerDocument(D);var F=Fe.isGecko>0&&G.getBoxObjectFor&&Fe.Dom.getStyle(D,"position")=="absolute"&&(D.style.top===""||D.style.left==="");var H={left:0,top:0};var B=(Fe.isIE&&!Fe.isStrict)?G.body:G.documentElement;if(D==B){return H}var C=null;var E;if(D.getBoundingClientRect){E=D.getBoundingClientRect();H.left=E.left+Math.max(G.documentElement.scrollLeft,G.body.scrollLeft);H.top=E.top+Math.max(G.documentElement.scrollTop,G.body.scrollTop);H.left-=G.documentElement.clientLeft;H.top-=G.documentElement.clientTop;if(Fe.isIE&&!Fe.isStrict){H.left-=2;H.top-=2}}else{if(G.getBoxObjectFor&&!F){E=G.getBoxObjectFor(D);var A=G.getBoxObjectFor(B);H.left=E.screenX-A.screenX;H.top=E.screenY-A.screenY}else{C=D;do{H.left+=C.offsetLeft;H.top+=C.offsetTop;if(Fe.isWebkit>0&&Fe.Dom.getStyle(C,"position")=="fixed"){H.left+=G.body.scrollLeft;H.top+=G.body.scrollTop;break}C=C.offsetParent}while(C&&C!=D);if(Fe.isOpera>0||(Fe.isWebkit>0&&Fe.Dom.getStyle(D,"position")=="absolute")){H.top-=G.body.offsetTop}C=D.offsetParent;while(C&&C!=G.body){H.left-=C.scrollLeft;if(!Fe.isOpera||C.tagName!="TR"){H.top-=C.scrollTop}C=C.offsetParent}}}return H};Fe.Dom.ready=function(){var C=false,E=false,D=[];function A(){if(!C){C=true;for(var G=0,F=D.length;G<F;G++){try{D[G]()}catch(H){}}}}function B(){if(E){return }E=true;if(document.addEventListener&&!Fe.isOpera){document.addEventListener("DOMContentLoaded",A,false)}if(Fe.isIE&&window==top){(function(){if(C){return }try{document.documentElement.doScroll("left")}catch(G){setTimeout(arguments.callee,0);return }A()})()}if(Fe.isOpera){document.addEventListener("DOMContentLoaded",function(){if(C){return }for(var G=0;G<document.styleSheets.length;G++){if(document.styleSheets[G].disabled){setTimeout(arguments.callee,0);return }}A()},false)}if(Fe.isSafari){var F;(function(){if(C){return }if(document.readyState!="loaded"&&document.readyState!="complete"){setTimeout(arguments.callee,0);return }if(F===undefined){F=0;var J=document.getElementsByTagName("style");var H=document.getElementsByTagName("link");if(J){F+=J.length}if(H){for(var I=0,G=H.length;I<G;I++){if(H[I].getAttribute("rel")=="stylesheet"){F++}}}}if(document.styleSheets.length!=F){setTimeout(arguments.callee,0);return }A()})()}if(window.attachEvent){window.attachEvent("onload",A)}else{window.addEventListener("load",A,false)}}return function(F){if(typeof F!="function"){return false}B();if(C){D[D.length]=F}}}();Fe.ready=Fe.Dom.ready;Fe.body=function(){var A=0,I=0,E=0,C=0,B=0,J=0;var F=window,D=document,G=D.documentElement;A=G.clientWidth||D.body.clientWidth;I=F.innerHeight||G.clientHeight||D.body.clientHeight;C=D.body.scrollTop||G.scrollTop;E=D.body.scrollLeft||G.scrollLeft;B=Math.max(D.body.scrollWidth,G.scrollWidth||0);J=Math.max(D.body.scrollHeight,G.scrollHeight||0,I);return{scrollTop:C,scrollLeft:E,documentWidth:B,documentHeight:J,viewWidth:A,viewHeight:I}};Fe.Dom.getRealOffset=function(E){var B=0,H=0,C=0,D=0,G=Fe.body();function F(L){var J=L.currentStyle;if(typeof (HTMLElement)!="undefined"&&!window.opera){J=L.ownerDocument.defaultView.getComputedStyle(L,null)}var K=parseInt(J.borderTopWidth);var I=parseInt(J.borderLeftWidth);return{left:isNaN(I)?0:I,top:isNaN(K)?0:K}}do{C+=E.offsetLeft||0;D+=E.offsetTop||0;if(Fe.isIE&&"tdthdiv".indexOf(E.nodeName.toLowerCase())>-1){var A=F(E);C+=A.left;D+=A.top}if(Fe.isSafari&&"tabletdth".indexOf(E.nodeName.toLowerCase())>-1){var A=F(E);C+=A.left;D+=A.top}E=E.offsetParent}while(E);E=null;return{x:C-B+G.scrollLeft,y:D-H+G.scrollTop}};Fe.loadjs=function(A){try{var B=document.getElementsByTagName("head").item(0);var C=document.createElement("script");C.setAttribute("src",A);C.setAttribute("type","text/javascript");C.setAttribute("language","javascript");B.appendChild(C);return C}catch(D){}};function club_global_info_alert(xhr,title){var club_global_info='<P class="single_alert">#{_info}</p>';Fe.Dialog.alert(Fe.format(club_global_info,eval("("+xhr.responseText+")")),{title:title,width:300,height:50})}Fe.Ajax.global={on202:function(A){alert(A.status+" respons: "+A.responseText)},on201:function(xhr){var return_value=eval("("+xhr.responseText+")");if("_location" in return_value){document.location.href=return_value._location}},on403:function(A){club_global_info_alert(A,"退出或失去权限")},on400:function(A){club_global_info_alert(A,"客户端错误")},on500:function(A){club_global_info_alert(A,"内部错误")}};Fe.getFlash=function(A){if(navigator.appName.indexOf("Microsoft")!=-1){return window[A]}else{return document[A]}};Fe.checkFlash=function(){var A;if(Fe.isIE){try{A=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");return true}catch(B){return false}}else{try{A=navigator.plugins["Shockwave Flash"];if(!A){return false}else{return true}}catch(B){return false}}};Fe.resizePic=function(C,A,H){var F=A||120;var D=H||120;var E=new Image();E.src=C.src;if(E.width==0){var G=this;var J=arguments;setTimeout(function(){J.callee.apply(G,J)},10)}function I(K,N,L,P){var M=0,O=K,Q=N;if(K>L){M+=1}if(N>P){M+=2}switch(M){case 1:O=L;O=N*L/K;case 2:Q=P;O=K*P/N;case 3:Q=(N/P>K/L)?P:N*L/K;O=(N/P>K/L)?K*P/N:L}return[O,Q]}var B=I(E.width,E.height,F,D);C.style.width=B[0]+"px";C.style.height=B[1]+"px";C.style.visibility="visible"};Fe.escapeUTF8=function(A){return escape(String(A)).replace(/%u(\w{4})/g,function(B,C){return encodeURIComponent(String.fromCharCode("0x"+C)).replace(/%/g,"%25")})};var Club=Club||{};var regexs={normal_name:/[^0-9a-zA-Z_\u4E00-\u9FA5]/g};Club.alert_msg=function(B){var A=Fe.Dialog.alert('<p style="padding-top:15px; text-align:center">'+B+"</p>",{title:"俱乐部通知",width:300,height:60,controlbar:false,buttonbar:false});setTimeout(function(){document.location.href="/club/"+Club.club_id},500)};Club.check_xhr_return=function(xhr,sucess,fail,run_fail){var return_value=eval("("+xhr.responseText+")");var run_fail_func=false;if(return_value=="done"){if(sucess){sucess(xhr)}}else{if(fail){fail(return_value);if(run_fail){run_fail_func=true}else{run_fail_func=false}}else{run_fail_func=true}if(run_fail_func){Fe.each(return_value,function(value,key){var err="form_"+key+"_error";if(Fe.G(err)){Fe.G(err).innerHTML='<span class="error">'+value+"</span>"}else{console.log("error elm on exists:"+err)}})}}};Club.post=function(A,C,B){var C=Fe.Object.extend(C,{dtype:"json",ie:"utf-8"});if(A.match(/cmclub/)){if(!("club_id" in C)){C.club_id=Club.club_id}}Fe.Ajax.post(A,Fe.Object.toQueryString(C),B)};Club.get=function(A,C,B){var C=Fe.Object.extend(C,{dtype:"json",ie:"utf-8",t:new Date().getTime().toString(32)});if(A.indexOf("?")!=-1){A=A+"&"+Fe.Object.toQueryString(C)}else{A=A+"?"+Fe.Object.toQueryString(C)}Fe.Ajax.get(A,B)};Club.syncPost=function(A,C,B){var C=Fe.Object.extend(C,{dtype:"json",ie:"utf-8"});if(A.match(/cmclub/)){if(!("club_id" in C)){C.club_id=Club.club_id}}Fe.Ajax.request(A,Fe.Object.toQueryString(C),{method:"POST",onsuccess:B,async:false})};Club.syncGet=function(A,C,B){var C=Fe.Object.extend(C,{dtype:"json",ie:"utf-8",t:new Date().getTime().toString(32)});Fe.Ajax.request(A+"?"+Fe.Object.toQueryString(C),B,{async:false})};Club.reload=function(A,D){var B=A||"";var C=D||500;if(""==B){setTimeout(function(){window.location.reload(true)},C)}else{setTimeout(function(){window.location.href=B},C)}};Club.userLink=function(B,A){if(A){return'<a href="https://passport.baidu.com/?detail&aid=6&default_tab=1&un='+Fe.String.escapeAttribute(B)+'" target="_blank">'+Fe.String.escapeHTML(A)+"</a> "}else{return'<a href="https://passport.baidu.com/?detail&aid=6&default_tab=1&un='+Fe.String.escapeAttribute(B)+'" target="_blank">'+Fe.String.escapeHTML(B)+"</a> "}};Club.teamsList=function(){Club.get("/club/"+Club.club_id+"/manage/get_all_teams",{},function(xhr){var teams_data=eval("("+xhr.responseText+")");var output=['<table cellspacing="0" id="teams_list">'];Fe.each(teams_data,function(team){output.push('<tr valign="top">');output.push('<th align="right" width="90">'+team.name+" ：</th>");output.push("<td>");Fe.each(team.users,function(user,index){if(team.users_realname&&team.users_realname[index]){output.push(Club.userLink(user,team.users_realname[index])+"&nbsp;")}else{output.push(Club.userLink(user)+"&nbsp;")}});output.push("</td>");output.push("</tr>")});Fe.Dialog.open(output.join(""),{title:"吧务团队",width:550,height:200,overflow:"scroll"})})};Club.createPager=function(F,D,G,I){var F=parseInt(F);var D=parseInt(D);var I=parseInt(I)||11;var A=[];var C,B;var H=(I-1)/2;var E=H;if(D>1){if(F>D){F=D}if(F==1){C=1;if(D>I){B=I}else{B=D}}else{if(F<=H){if(D>4){A.push(' <a href="#" onclick="'+G+'(1); return false;"> 首页</a>  <a href="#" onclick="'+G+"("+(F-1)+'); return false;">上一页</a> ')}else{A.push('<a href="#" onclick="'+G+"("+(F-1)+'); return false;">上一页</a> ')}C=1;if(D>I){B=I}else{B=D}}else{A.push(' <a href="#" onclick="'+G+'(1); return false;"> 首页</a>  <a href="#" onclick="'+G+"("+(F-1)+'); return false;">上一页</a> ');C=F-E;if((D-F)<=H){B=D;if(D>=I){if((D-(I-1))>0){C=D-(I-1)}}}else{B=F+H}}}for(;C<=B;C++){if(C==F){A.push(' <span class="current">'+C+"</span> ")}else{A.push(' <a href="#" onclick="'+G+"("+C+'); return false;">'+C+"</a> ")}}if(F!=D){if(D<=4){A.push(' <a href="#" onclick="'+G+"("+(F+1)+'); return false;">下一页</a>')}else{A.push(' <a href="#" onclick="'+G+"("+(F+1)+'); return false;">下一页</a> <a href="#" onclick="'+G+"("+D+'); return false;">尾页</a>')}}}return A.join("")};Club.showLoginLayer=function(){var B="https://passport.baidu.com/?login&psp_tt=2&tpl=tb&fu="+encodeURIComponent("http://static.tieba.baidu.com/tb/club/pass_jump.html?type=1")+"&u="+encodeURIComponent(window.location.href);var A=Fe.Dialog.open(B,{title:"您尚未登录",contentType:"iframe",width:375,height:330})};Club.logo_resize=function(A){Fe.resizePic(A,70,70)};Club.showMsg=function(D,A){if(Club.property=="class"){var C="加入班级"}else{var C="俱乐部通知"}if(A){C=A}var B='<div style="font-size:13px;padding:20px 0 10px 20px;line-height:18px;">'+D+"</div>";Fe.Dialog.alert(B,{title:C,width:380})};Club.checkCreate=function(club_property){if(club_property=="class"){var club_property_name="班级"}else{var club_property_name="俱乐部"}var checked=true;Club.syncGet("/club/common/getuserinfo",{},function(xhr){var result=eval("("+xhr.responseText+")");if(typeof result=="undefined"){checked=false;return }if(club_property=="class"){if(result.create_num==0){Club.showMsg('抱歉，您目前没有创建贴吧俱乐部的权限，暂无法创建班级。<br/><a href="http://static.tieba.baidu.com/tb/help/club/#n2" target="_blank">俱乐部权限说明</a>',"创建班级");checked=false;return }}if(!result.is_login){Club.showLoginLayer();checked=false;return }if(result.id_prison){Club.showMsg("抱歉，您的帐号由于违规操作被封，暂无法创建"+club_property_name+"。","创建班级");checked=false;return }if(result.ip_prison){Club.showMsg("抱歉，您的网络地址由于违规操作被封，暂无法创建"+club_property_name+"。","创建班级");checked=false;return }});return checked};Club.classMemberApply={};Club.classMemberApply.init=function(club_id,club_name,need_reload){var checked=true;if(need_reload){Club.classMemberApply.need_reload=true}else{Club.classMemberApply.need_reload=false}Club.syncGet("/club/"+club_id+"/common/getuserinfo",{},function(xhr){var result=eval("("+xhr.responseText+")");if(typeof result=="undefined"){checked=false}if(!result.is_login){Club.showLoginLayer();checked=false;return }if(result.applying){Club.showMsg("您已经提交过加入本班的申请，请耐心等待本班成员的审核。","加入班级");checked=false;return }if(result.is_member){var dialog=Fe.Dialog.alert('<p style="padding-top:15px; text-align:center">您已经是本班成员，无需再次加入。</p>',{title:"加入班级",width:300,height:60,controlbar:false,buttonbar:false});setTimeout(function(){document.location.href="/club/"+club_id},500);checked=false;return }if(result.id_prison){Club.showMsg("抱歉，您的帐号由于违规操作被封，暂无法加入班级。","加入班级");checked=false;return }if(result.ip_prison){Club.showMsg("抱歉，您的网络地址由于违规操作被封，暂无法加入班级。","加入班级");checked=false;return }if(result.is_black){Club.showMsg("抱歉 ，本班管理员认为您不符合本班会员条件，您暂时无法加入。如果您对此有疑问，请直接与本班创建者联系。","加入班级");checked=false;return }});if(!checked){return }var tip="“"+club_name+"”是班级型俱乐部，需要进行实名认证才能加入。";var p_style=' style="line-height:25px"';var applyHtml=['<div style="padding:10px 15px;">',"<p"+p_style+">"+tip+"</p>","<p"+p_style+'><nobr>您的真实姓名：<input type="text" id="realname"/>&nbsp;&nbsp;</nobr><nobr><span id="form_realname_error" class="warning"></span></nobr></p>',"<p"+p_style+">申请附言：</p>",'<textarea cols="51" style="height:60px;" id="apply_msg" name="apply_msg" value="" ></textarea>','<p id="form_msg_error" class="gray">不超过100个汉字</p>','<div style="margin-top:5px;"><input type="button" value="申请加入" onclick="Club.classMemberApply.submit();">&nbsp;&nbsp;&nbsp;<input type="button" onclick="Club.classMemberApply.dialog.close();" value=" 取消 ">&nbsp;&nbsp;<span id="form__info_error"></span></div>',"</div>"].join("");Club.classMemberApply.club_id=club_id;Club.classMemberApply.dialog=Fe.Dialog.open(applyHtml,{title:"会员申请",width:480,height:220})};Club.classMemberApply.submit=function(){var realname=Fe.trim(Fe.G("realname").value);var message=Fe.trim(Fe.G("apply_msg").value);if(realname==""){Fe.G("form_realname_error").innerHTML="请填写真实姓名";return false}else{Fe.G("form_realname_error").innerHTML=""}Fe.G("form__info_error").innerHTML="";Fe.G("form_msg_error").innerHTML="不超过100个汉字";Club.post("/club/cmclub/member_apply",{msg:message,realname:realname,club_id:Club.classMemberApply.club_id},function(xhr){var result=eval("("+xhr.responseText+")");if(typeof result=="undefined"){return }if(result=="done"){Fe.G("form__info_error").innerHTML="申请已提交，待本班成员批准后即可加入～";setTimeout(function(){Club.classMemberApply.dialog.close();if(Club.classMemberApply.need_reload){location.reload()}},500)}else{for(var key in result){if(Fe.G("form_"+key+"_error")){Fe.G("form_"+key+"_error").innerHTML='<span class="warning">'+result[key]+"</span>"}}}})};var TryGoOther={_keyValues:[["贴吧投诉","http://tieba.baidu.com/tousu/new"],["帖吧投诉","http://tieba.baidu.com/tousu/new"],["tiebatousu","http://tieba.baidu.com/tousu/new"],["知道投诉","http://tousu.baidu.com/zhidao"],["空间投诉","http://tousu.baidu.com/hi"],["百科投诉","http://tousu.baidu.com/baike"],["zhidaotousu","http://tousu.baidu.com/zhidao"],["kongjiantousu","http://tousu.baidu.com/hi"],["baiketousu","http://tousu.baidu.com/baike"]],go:function(E){var A=this._keyValues;var B=E.toLowerCase();for(var C=0;C<A.length;C++){if(B==A[C][0]){window.location.href=A[C][1];return true}}var D=Fe.String.DBC2SBC(E);if(/^\d{7,10}$/.test(D)){window.location.href="/club/"+D;return true}}};function gowhere(G){var A="/f",H=G.myselectvalue;var K=G.word,F=G.tn,B=G.ct;var D=G.kw,C=G.rn,E=G.lm,J=G.pn;if(H.value=="1"){var I=Fe.trim(K.value);if(TryGoOther.go(I)){return false}}switch(H.value){case"1":if(K.value==""||K.value==null){F.value="baiduKeywordSearch";B.value="318767104";D.value="";C.value="50";E.value=J.value="0"}else{F.value=B.value=C.value=E.value=J.value="";D.value=K.value}break;case"0":F.value="baiduPostSearch";B.value="352321536";E.value="65536";C.value="10";D.value="";break;case"2":F.value="baiduPostSearch";B.value="352321536";E.value="65541";C.value="10";D.value="";break}return true}Club.topBar=(function(){var G_HIBAR={is_show:{forum:false,club:false,space:false},type:"",toggle:function(el,l,t,type){for(i in G_HIBAR.is_show){if(i!=type){var tip_elm=Fe.G("my_"+i+"_tip");if(tip_elm){tip_elm.style.display="none"}G_HIBAR.is_show[i]=false}}el.style.display=G_HIBAR.is_show[type]?"block":"none";el.style.left=l+"px";el.style.top=t+"px"},hide_or_show:function(e){G_HIBAR.is_show[G_HIBAR.type]&&Club.topBar.click(e,G_HIBAR.type,false)},click:function(e,type,show){MyData.init();var usrbar,my_tip,top_offset=9;if(Fe.isIE){top_offset=13}G_HIBAR.type=type;_type=type;var e=window.event||e;var target=e.target||e.srcElement;if(e.stopPropagation){e.stopPropagation()}else{e.cancelBubble=false}usrbar=Fe.G("usrbar");my_tip=Fe.G("my_"+type+"_tip");if(!Fe.G("my_"+type)){return }var type_offset=Fe.Dom.getRealOffset(Fe.G("my_"+type));G_HIBAR.is_show[type]=show;if(Fe.isIE){if(Fe.isIE==6){G_HIBAR.toggle(my_tip,type_offset.x-6,type_offset.y-5,type)}else{G_HIBAR.toggle(my_tip,type_offset.x-6,type_offset.y-4,type)}}else{G_HIBAR.toggle(my_tip,type_offset.x-6,type_offset.y-4,type)}},hideAll:function(){Fe.each(G_HIBAR.is_show,function(show,name){var tip_elm=Fe.G("my_"+name+"_tip");if(tip_elm){tip_elm.style.display="none"}})}};var myForum={build:function(data){var html=[];if(data.showForum.length>0){html.push("<ul>");Fe.each(data.showForum,function(forum){html.push('<li><a href="/'+forum[0]+'/?from=loginbar" target="_blank"><nobr>'+forum[1]+"</nobr></a></li>")});html.push("</ul>");if(data.allMyForumNum>6){html.push('<div style="text-align:right"><a href="/f?ct=486539264&cm=58580&tn=bdUserCenter&rs1=1#4" target="_blank" style="text-align:right;">查看全部&gt;&gt;</a></div>')}}else{html.push("<div>加入您喜欢的贴吧，吧名会在此显示。</div>")}html.push('<div style="padding:0 5px"><p style="height:1px;overflow:hidden;border:none;border-bottom:1px solid #ccc;">&nbsp;</p></div>');html.push('<div><a href="/f?ct=486539264&cm=58580&tn=bdUserCenter#0" target="_blank">我的发言</a><br/><a href="/f?ct=486539264&cm=58580&tn=bdUserCenter#1" target="_blank">贴吧收藏</a></div>');Fe.G("myForumList").innerHTML=html.join("")}};var myClub={build:function(data){var html=[];if(data.clubs.length>0){html.push("<ul>");Fe.each(data.clubs,function(club){html.push('<li><a href="/club/'+club.id+'/t?from=loginbar" target="_blank"><nobr>'+Fe.String.escapeHTML(club.name)+"</nobr></a></li>")});html.push("</ul>");if(data.join_num>6){html.push('<div style="text-align:right"><a href="/f?ct=486539264&cm=58580&tn=bdUserCenter&rs1=2#5" target="_blank" style="text-align:right;">查看全部&gt;&gt;</a></div>')}}else{html.push('<div>您还没加入任何俱乐部，快去<a href="/club/dir" class="inline" target="_blank">俱乐部目录</a>逛逛！</div>')}if(data.create_num>0){html.push('<div style="margin-top:5px;padding:2px 0 2px 0; border-top:1px solid #999">爱谈论什么，您可以<a href="/club/common/newclub?from=ucenter" target="_blank">创建一个俱乐部&gt;&gt;</a></div>')}Fe.G("myClubList").innerHTML=html.join("")}};var MyData={postProcess:function(xmlHttp,type){var rst=eval("("+xmlHttp.responseText+")");if(type=="forum"){myForum.build(rst)}else{if(type=="club"){myClub.build(rst)}}},requestData:function(type){var url=(type=="forum"?"/f?ct=486539264&cm=80001&tn=jsonMyForum&t="+Math.random():"/club/common/getuserclub?t="+Math.random());Fe.Ajax.get(url,function(xhr){MyData.postProcess(xhr,type)})},inited:false,init:function(){if(!this.inited){if(Fe.G("my_forum")){MyData.requestData("forum")}MyData.requestData("club");this.inited=true}}};return{click:function(e,type){G_HIBAR.click(e,type,true)},hideAll:function(){G_HIBAR.hideAll()}}})();var FeDialogInited=false;Fe.Dialog=function(A){Sys.call(this);this.help=false;this.font="normal 12px sans-serif";this.title="Fe.Dialog";this.width="";this.height="";this.autofit=false;this.content="&nbsp;";this.overflow="visible";this.position="center";this.titlebar=true;this.scrolling="auto";this.buttonbar=false;this.statusbar=false;this.resizable=false;this.controlbar=true;this.buttonClose=true;this.contentType="HTMLString";this.buttonAccept=false;this.buttonCancel=false;this.buttonbarAlign="center";this.buttonAcceptValue="\u786e \u5b9a";this.buttonCancelValue="\u53d6 \u6d88";this.locked=true};Fe.Dialog.Extends(Sys,"Fe.Dialog");Fe.Dialog.cssFilePath=Sys.resourcePath+"/FeDialog.css";Fe.Dialog.prototype.render=function(B,D){if("undefined"!=typeof (B)){this.content=B}if("object"==typeof (D)){Fe.extend(this,D)}if("number"==typeof (this.width)){this.width+="px"}if("number"==typeof (this.height)){this.height+="px"}var A=this,C=this.dialog=Fe.DialogFactory.produce();C.onaccept=function(){A.accept()};C.oncancel=function(){A.cancel()};C.onclose=function(){A.close()};C.onhelp=function(){A.help()};C.changeSize=function(F,E){A.changeSize(F,E)};C.show(this);C.setActive();if(this.buttonbar&&this.buttonAccept){Fe.G("FeDialogButtonAccept_"+C.hashCode).focus()}if(this.locked){BdLockWindow.lock({opacity:0.4,backgroundColor:"#FFFFFF",zIndex:(52000-10)});this.addEventListener("onclose",function(){BdLockWindow.unlock()})}setTimeout(function(){A.dispatchEvent(new Sys.Event("onopen"))},10)};Fe.Dialog.prototype.setContent=function(A){this.dialog.setContent(A)};Fe.Dialog.prototype.setCaption=function(A){this.dialog.setCaption(A)};Fe.Dialog.prototype.setWidth=function(A){this.dialog.setWidth(A)};Fe.Dialog.prototype.setHeight=function(A){this.dialog.setHeight(A)};Fe.Dialog.prototype.getIframe=function(){return Fe.G("FeDialogIframe_"+this.dialog.hashCode)};Fe.Dialog.prototype.close=function(){var A=this,B=new Sys.Event("onclose");A.dispatchEvent(B);if(!B.returnValue){return }this.dialog.hide(function(){A.dispose()})};Fe.Dialog.prototype.accept=function(){var A=new Sys.Event("onaccept");this.dispatchEvent(A);if(!A.returnValue){return }this.close()};Fe.Dialog.prototype.cancel=function(){var A=new Sys.Event("oncancel");this.dispatchEvent(A);if(!A.returnValue){return }this.close()};Fe.Dialog.prototype.help=function(){this.dispatchEvent(new Sys.Event("onhelp"))};Fe.DialogFactory=function(){Sys.call(this);this.active=false;this.resizable=false;Fe.DialogFactory.dialogs.push(this)};Fe.DialogFactory.Extends(Sys,"Fe.DialogFactory");Fe.DialogFactory.prototype.setActive=function(){return false;var A=Fe.DialogFactory.currentDialog;if(A==this){return }if(A){var B=Fe.G("FeDialog_"+A.hashCode).style;B.zIndex=parseInt(B.zIndex)-4000;Fe.rc("FeDialog_"+A.hashCode,"focused_")}Fe.ac("FeDialog_"+this.hashCode,"focused_");Fe.DialogFactory.currentDialog=this;var B=Fe.G("FeDialog_"+this.hashCode).style;B.zIndex=parseInt(B.zIndex)+4000};Fe.DialogFactory.dialogs=[];Fe.DialogFactory.currentDialog=null;Fe.DialogFactory.png=function(){return(Fe.isIE>=7||Fe.isIE<=0)};Fe.DialogFactory.prototype.create=function(){var B="";if(Fe.isIE==6){B='<iframe id="FeDialog_iframe_#{0}" src="javascript:false;" style="position:absolute; z-index:'+(52000+Fe.DialogFactory.dialogs.length*3-2)+'; display:none;"></iframe>'}var A=["<div ",'id="FeDialog_#{0}" ','class="FeDialog" ','style="position:absolute;z-index:',(52000+Fe.DialogFactory.dialogs.length*3),';display:none" ',"onclick=\"Sys.I('#{0}').click(event)\">",'<div class="FeDialog_inner',(Fe.DialogFactory.png()?" png_":""),'">','<table class="FeDialog_wrapper" border="0" cellpadding="0" cellspacing="0">','<tr class="middle_">','<td class="left_ horizontal_"></td>','<td class="center_ midland_">','<div class="FeDialog_container">','<div id="FeDialogCaption_#{0}" class="FeDialogCaption" onselectstart="return false">','<div id="FeDialogControlBar_#{0}" class="FeDialogControlBar">','<a id="FeDialogButtonClose_#{0}" href="#" onfocus="this.blur();" onclick="Sys.I(\'#{0}\').onclose(); return false;">','<img alt="close" src="http://img.baidu.com/hi/img/dialogclose.gif" />',"</a>","</div>",'<div id="FeDialogCaptionText_#{0}" onmousedown="Sys.I(\'#{0}\').setActive()" class="FeDialogCaptionText">FeDialog</div>',"</div>",'<div id="FeDialogContent_#{0}" class="FeDialogContent">&nbsp;</div>','<div id="FeDialogButtonBar_#{0}" class="FeDialogButtonBar">','<input id="FeDialogButtonAccept_#{0}" type="button" value="\u786e \u5b9a" onclick="Sys.I(\'#{0}\').onaccept()" class="accept_" />','<input id="FeDialogButtonCancel_#{0}" type="button" value="\u53d6 \u6d88" onclick="Sys.I(\'#{0}\').oncancel()" class="cancel_" />',"</div>",'<div id="FeDialogStatusBar_#{0}" class="FeDialogStatusBar" style="display:none">&nbsp;</div>',"</div>","</td>",'<td class="right_ horizontal_"></td>',"</tr>","</table>","</div>","</div>",'<div id="FeDialog_shadow_#{0}" class="FeDialog_shadow" ','style="position:absolute;z-index:',(52000+Fe.DialogFactory.dialogs.length*3-1),';display:none"></div>',B];A=Fe.format(A.join(""),this.hashCode);if(document.body){document.body.insertAdjacentHTML("afterBegin",A)}else{document.write(A)}};Fe.DialogFactory.prototype.show=function(op){var me=this;function _(id){return Fe.G(id+"_"+me.hashCode)}if(op.icon){_("FeDialogCaption").style.background="url("+op.icon+") no-repeat left 3px";_("FeDialogCaptionText").style.paddingLeft="18px"}_("FeDialog").style.fontSize="12px";_("FeDialogCaptionText").innerHTML=op.title;_("FeDialogCaption").style.display=op.titlebar?"":"none";_("FeDialogStatusBar").style.display=op.statusbar?"":"none";_("FeDialogControlBar").style.display=op.controlbar?"":"none";_("FeDialogButtonBar").style.display=op.buttonbar?"":"none";_("FeDialogButtonClose").style.display=op.buttonClose?"":"none";_("FeDialogButtonAccept").style.display=op.buttonAccept?"":"none";_("FeDialogButtonCancel").style.display=op.buttonCancel?"":"none";_("FeDialogButtonBar").style.textAlign=op.buttonbarAlign;_("FeDialogButtonAccept").value=op.buttonAcceptValue;_("FeDialogButtonCancel").value=op.buttonCancelValue;with(_("FeDialogContent").style){width=op.width;height=op.height;overflow=op.overflow}if(op.contentType.toLowerCase()=="htmlelement"&&!Fe.G(op.content)){op.contentType="HTMLString"}switch(op.contentType.toLowerCase()){case"htmlstring":_("FeDialogContent").innerHTML=op.content;break;case"htmlelement":var e=Fe.G(op.content);this.opContentDisplay=e.style.display;e.insertAdjacentHTML("beforeBegin","<input type='button' id='FeDialogFactoryInset_"+this.hashCode+"' style='width:"+e.offsetWidth+"px; height:"+e.offsetHeight+"px; padding:0; margin:0; border:none; visibility:hidden' />");_("FeDialogContent").innerHTML="";e.style.display="";_("FeDialogContent").appendChild(e);break;default:_("FeDialogContent").innerHTML="<iframe frameborder='0' scrolling='"+op.scrolling+"' id='FeDialogIframe_"+this.hashCode+"' name='FeDialog_"+this.hashCode+"' style='width:"+(op.width||"100%")+"; height:"+(op.height||"100%")+"' src='"+op.content+"'></iframe>";break}var a=Fe.trim(op.position).toLowerCase().split(/\s/);var body=Fe.body();Fe.show("FeDialog_"+this.hashCode);Fe.show("FeDialog_shadow_"+this.hashCode);if(Fe.isIE==6){Fe.show("FeDialog_iframe_"+this.hashCode)}if(Sys.ie&&_("FeDialogContent").offsetWidth<136){_("FeDialogContent").style.width="130px"}if(Sys.ie&&_("FeDialogContent").offsetHeight<50){_("FeDialogContent").style.height="50px"}var top=(Math.max(parseInt((body.viewHeight-_("FeDialog").offsetHeight)/2),0)+body.scrollTop)+"px";var left=(Math.max(parseInt((body.viewWidth-_("FeDialog").offsetWidth)/2),0)+body.scrollLeft)+"px";if(a.length==1){if(a[0]==""||a[0]=="center"){}else{if(a[0]=="top"){top=body.scrollTop+"px"}else{if(a[0]=="bottom"){top=(body.scrollTop+body.viewHeight-_("FeDialog").offsetHeight)+"px"}else{if(a[0]=="left"){left=body.scrollLeft+"px"}else{if(a[0]=="right"){left=(body.scrollLeft+body.viewWidth-_("FeDialog").offsetWidth)+"px"}else{if(/\d+%/.test(a[0])){top=a[0]}else{if(/(\d+)(cm|mm|in|pt|pc|px|em|ex)?/.test(a[0])){top=parseInt(RegExp.$1)+RegExp.$2||"px"}}}}}}}}else{if(a.length>1){if(/\d+%/.test(a[0])){top=a[0]}else{if(/(\d+)(cm|mm|in|pt|pc|px|em|ex)?/.test(a[0])){top=parseInt(RegExp.$1)+RegExp.$2||"px"}}if(/\d+%/.test(a[1])){left=a[1]}else{if(/(\d+)(cm|mm|in|pt|pc|px|em|ex)?/.test(a[1])){left=parseInt(RegExp.$1)+RegExp.$2||"px"}}if(a[0]=="top"||a[1]=="top"){top=body.scrollTop+"px"}if(a[0]=="bottom"||a[1]=="bottom"){top=(body.scrollTop+body.viewHeight-_("FeDialog").offsetHeight)+"px"}if(a[0]=="left"||a[1]=="left"){left=body.scrollLeft+"px"}if(a[0]=="right"||a[1]=="right"){left=(body.scrollLeft+body.viewWidth-_("FeDialog").offsetWidth)+"px"}}}_("FeDialog").style.top=top;_("FeDialog").style.left=left;_("FeDialog_shadow").style.top=parseInt(top)+3+"px";_("FeDialog_shadow").style.left=parseInt(left)+3+"px";_("FeDialog_shadow").style.width=_("FeDialog").offsetWidth+"px";_("FeDialog_shadow").style.height=_("FeDialog").offsetHeight+"px";if(Fe.isIE==6){_("FeDialog_iframe").style.top=parseInt(top)+3+"px";_("FeDialog_iframe").style.left=parseInt(left)+3+"px";_("FeDialog_iframe").style.width=_("FeDialog").offsetWidth+"px";_("FeDialog_iframe").style.height=_("FeDialog").offsetHeight+"px"}Fe.Dialog.dragDrop.initElement(_("FeDialogCaptionText"),_("FeDialog"),_("FeDialog_shadow"),_("FeDialog_iframe"));this.active=true};Fe.Dialog.prototype.changeSize=function(C,A){var D=this;function B(E){return Fe.G(E+"_"+D.dialog.hashCode)}B("FeDialogContent").style.width=C+"px";B("FeDialogContent").style.height=A+"px";B("FeDialog_shadow").style.width=B("FeDialog").offsetWidth+"px";B("FeDialog_shadow").style.height=B("FeDialog").offsetHeight+"px";if(Fe.isIE==6){B("FeDialog_iframe").style.width=B("FeDialog").offsetWidth+"px";B("FeDialog_iframe").style.height=B("FeDialog").offsetHeight+"px"}};Fe.DialogFactory.prototype.hide=function(D){Fe.hide("FeDialog_"+this.hashCode);Fe.hide("FeDialog_shadow_"+this.hashCode);Fe.hide("FeDialog_iframe_"+this.hashCode);var B=this;if(Fe.G("FeDialogFactoryInset_"+B.hashCode)){var C=Fe.G("FeDialogFactoryInset_"+B.hashCode);var A=Fe.G("FeDialogContent_"+B.hashCode).childNodes[0];C.parentNode.insertBefore(A,C);C.parentNode.removeChild(C);A.style.display=B.opContentDisplay}if("function"==typeof (D)){D(B)}setTimeout(function(){B.active=false;B.setContent("&nbsp;");var E=Fe.G("FeDialogContent_"+B.hashCode);if(E){E.style.width=E.style.height=E.style.overflow=""}},50);clearTimeout(this.timer)};Fe.DialogFactory.prototype.dispose=function(){Fe.DialogFactory.dialogs=Fe.DialogFactory.dialogs.remove(this);Sys.prototype.dispose.call(this)};Fe.DialogFactory.prototype.setWidth=function(A){var B;if(B=Fe.G("FeDialogContent_"+this.hashCode)){B.style.width=A}};Fe.DialogFactory.prototype.setHeight=function(A){var B;if(B=Fe.G("FeDialogContent_"+this.hashCode)){B.style.height=A}};Fe.DialogFactory.prototype.setCaption=function(A){Fe.G("FeDialogCaptionText_"+this.hashCode).value=A};Fe.DialogFactory.prototype.setContent=function(A){Fe.G("FeDialogContent_"+this.hashCode).innerHTML=A};Fe.DialogFactory.prototype.setStatus=function(A){Fe.G("FeDialogStatusText_"+this.hashCode).innerHTML=A};Fe.DialogFactory.prototype.click=function(A){(window.event||A).cancelBubble=true;this.setActive()};Fe.DialogFactory.prototype.resizeBy=function(){var E=this,C="FeDialogLayer_"+this.hashCode;Fe.G("FeDialogBgLayer_"+this.hashCode).style.width=Fe.G(C).offsetWidth+"px";Fe.G("FeDialogBgLayer_"+this.hashCode).style.height=Fe.G(C).offsetHeight+"px";if(Sys.ie&&Fe.G("FeDialogBgLayer_"+this.hashCode)){if(Fe.isIE<5.5){Fe.G("FeDialogLayer_"+this.hashCode).style.width="130px";Fe.G("FeDialog_"+this.hashCode).style.width=Fe.G("FeDialogLayer_"+this.hashCode).offsetWidth+"px"}var D=Fe.G("FeDialogBgLayer_"+this.hashCode);if(D.rows[0].cells[0].currentStyle){var B=parseInt(D.rows[0].cells[0].currentStyle.height);var A=parseInt(D.rows[2].cells[0].currentStyle.height);if(!isNaN(B)&&!isNaN(A)){D.rows[1].cells[1].style.height=(Math.max(Fe.G(C).offsetHeight-B-A,12))+"px"}}}if(window.opera&&Fe.G("FeDialogLayerTable_"+this.hashCode).offsetWidth<130){Fe.G("FeDialogLayerTable_"+this.hashCode).style.width="130px"}this.timer=setTimeout(function(){E.resizeBy()},50)};Fe.DialogFactory.produce=function(){for(var A=0,B=Fe.DialogFactory.dialogs.length;A<B;A++){if(!Fe.DialogFactory.dialogs[A].active){if(A==(B-1)){setTimeout(function(){new Fe.DialogFactory().create()},20)}return Fe.DialogFactory.dialogs[A]}}return null};Fe.on(document.body,"onkeydown",function(C){var B=C.target||C.srcElement;if(!B){return false}if(B.tagName.toLowerCase()=="textarea"){return false}var A=C.which||C.keyCode;if(Fe.DialogFactory.currentDialog&&Fe.DialogFactory.currentDialog.active){if(A==27){Fe.DialogFactory.currentDialog.oncancel()}else{if(A==13){Fe.DialogFactory.currentDialog.onaccept();try{C.keyCode=0}catch(D){}C.returnValue=false}}}});function BdLockWindow(){Sys.call(this);this.initialize()}BdLockWindow.Extends(Sys,"BdLockWindow");BdLockWindow.prototype.initialize=function(){var div=this.element=BdLockWindow.element=document.createElement("DIV");div.id=BdLockWindow.id;this.decontrol();with(div.style){zIndex=1;top=left="0px";width=height="100%";border=display="none";margin=padding=0;position="absolute";backgroundColor="#666699";backgroundImage="url("+Sys.resourcePath+"/blank.gif)"}if((Fe.isIE&&Fe.isIE<5.5)||(Fe.isOpera&&Fe.isOpera<8.5)){div.style.backgroundColor="";div.style.backgroundImage="url("+Sys.resourcePath+"/dotted.gif)"}BdLockWindow.onResize();document.body.insertBefore(div,document.body.firstChild)};Fe.extend(BdLockWindow,{onResize:function(){BdLockWindow.element.style.width="100%";BdLockWindow.element.style.height="100%";setTimeout(function(){var B=Fe.body();var A=B.documentWidth-4;var C=B.documentHeight-4;if(Fe.isIE){A-=5;C-=5}BdLockWindow.element.style.width=A+"px";BdLockWindow.element.style.height=C+"px"},100)},_restore:function(A){var C=document.getElementsByTagName(A);for(var B=C.length-1;B>-1;B--){C[B].style.visibility=C[B].getAttribute("att_BdLockWindow_v")||"";C[B].removeAttribute("att_BdLockWindow_v")}},_safeguard:function(A){var C=document.getElementsByTagName(A);for(var B=C.length-1;B>-1;B--){if(C[B].className=="safe"){continue}C[B].setAttribute("att_BdLockWindow_v",C[B].style.visibility,0);C[B].style.visibility="hidden"}},id:"BdLockWindow_"+Sys.getUniqueId()+"_"+new Date().getTime().toString(36),lock:function(D){var F=this;if(!F.instance){F.instance=new BdLockWindow()}Fe.show(F.id);Fe.on(window,"onresize",F.onResize);var C=F.element.style;F.onResize();var G=Fe.extend({zIndex:1,opacity:0.5},D||{});C.zIndex=G.zIndex;C.backgroundColor=G.backgroundColor||"#666699";if(Fe.isIE){C.filter="alpha(opacity:"+Math.round(G.opacity*100)+")"}else{C.opacity=G.opacity;C.MozOpacity=G.opacity;C.KHTMLOpacity=G.opacity}if(Fe.isIE==6){for(var B=["SELECT","OBJECT","EMBED"],E=0,A=B.length;E<A;E++){this._safeguard(B[E])}}},unlock:function(){if(!this.instance){this.instance=new BdLockWindow();return }Fe.hide(this.id);Fe.un(window,"onresize",this.onResize);for(var B=["SELECT","OBJECT","EMBED"],C=0,A=B.length;C<A;C++){this._restore(B[C])}}});if(Fe.isIE&&Fe.isIE<7){try{document.execCommand("BackgroundImageCache",false,true)}catch(e){}}Fe.Dialog.open=function(B,C){if(!FeDialogInited){new Fe.DialogFactory().create();FeDialogInited=true}var A=new Fe.Dialog();A.render(B,C);return A},Fe.Dialog.alert=function(A,B){return this.open(A,Fe.extend({buttonbar:true,buttonAccept:true},B||{}))},Fe.Dialog.confirm=function(A,B){return this.open(A,Fe.extend({locked:true,buttonbar:true,buttonAccept:true,buttonCancel:true},B||{}))},Fe.Dialog.showModalDialog=function(A,B){return this.open(A,Fe.extend({locked:true,position:"center"},B||{}))},Fe.Dialog.submit=function(B,D){var A=this.open("about:blank",Fe.extend({contentType:"page"},D||{}));var C=B.target;B.target=A.getIframe().name;B.submit();B.target=C;return A},Fe.Dialog.close=function(){for(var B=0,C=Fe.DialogFactory.dialogs.length;B<C;B++){var A=Fe.DialogFactory.dialogs[B];if(A.active&&typeof (A.onclose=="function")){A.onclose()}}};Fe.Dialog.dragDrop={initialMouseX:undefined,initialMouseY:undefined,startX:undefined,startY:undefined,draggedObject:undefined,draggedElement:undefined,initElement:function(C,A,D,B){Fe.on(C,"mousedown",Fe.Dialog.dragDrop.startDragMouse);Fe.Dialog.dragDrop.element=A;Fe.Dialog.dragDrop.shadow=D;Fe.Dialog.dragDrop.iframe=B},startDragMouse:function(B){Fe.Dialog.dragDrop.startDrag();var A=B||window.event;A.cancelBubble=true;if(A.stopPropagation){A.stopPropagation()}Fe.Dialog.dragDrop.initialMouseX=A.clientX;Fe.Dialog.dragDrop.initialMouseY=A.clientY;Fe.on(document,"mousemove",Fe.Dialog.dragDrop.dragMouse);Fe.on(document,"mouseup",Fe.Dialog.dragDrop.releaseElement);return false},startDrag:function(){if(Fe.Dialog.dragDrop.draggedObject){Fe.Dialog.dragDrop.releaseElement()}Fe.Dialog.dragDrop.startX=Fe.Dialog.dragDrop.element.offsetLeft;Fe.Dialog.dragDrop.startY=Fe.Dialog.dragDrop.element.offsetTop;Fe.Dialog.dragDrop.draggedObject=Fe.Dialog.dragDrop.element},dragMouse:function(D){var C=D||window.event;var B=C.clientX-Fe.Dialog.dragDrop.initialMouseX;var A=C.clientY-Fe.Dialog.dragDrop.initialMouseY;Fe.Dialog.dragDrop.setPosition(B,A);return false},setPosition:function(B,A){var C=Fe.Dialog.dragDrop;C.element.style.left=C.startX+B+"px";C.element.style.top=C.startY+A+"px";if(Fe.isIE==6){C.iframe.style.left=C.startX+B+"px";C.iframe.style.top=C.startY+A+"px"}C.shadow.style.left=C.startX+B+3+"px";C.shadow.style.top=C.startY+A+3+"px"},releaseElement:function(){Fe.un(document,"mousemove",Fe.Dialog.dragDrop.dragMouse);Fe.un(document,"mouseup",Fe.Dialog.dragDrop.releaseElement);Fe.Dialog.dragDrop.draggedObject=null}};function setOpacity(A,B){A.style.filter="alpha(opacity="+B+")";A.style.opacity=B/100}var webHi={posStartX:0,posEndX:0,posStartY:0,posEndY:0,posAlpha:0,posState:0,tempNum:0,xStep:3,eventHandler:null,closeEventHandler:null,textBlock:null,textTip:null};function openTip(A){Fe.G("hiIcon").title=Fe.G("hiMsg").title="您的百度Hi有新消息，点击读取";Fe.G("msgRight").innerHTML=A;var B=String(A).length;webHi.posEndX=6*B+6;webHi.posStartX=0;webHi.posStartY=0;webHi.posEndY=-4;webHi.textTip.style.marginTop=webHi.posStartY+"px";if(webHi.posState>=3){webHi.posState=1;webHi.posAlpha=0}if(webHi.tempNum!=B){webHi.tempNum=B;webHi.posState=0;webHi.textBlock.style.marginRight=0;webHi.textTip.style.display="none"}clearInterval(webHi.closeEventHandler);webHi.closeEventHandler=null;clearInterval(webHi.eventHandler);webHi.eventHandler=setInterval(openMoveEvent,2)}function closeTip(){webHi.posStartY=0;webHi.posAlpha=0;webHi.textTip.style.display="none";webHi.posStartX=webHi.posEndX;webHi.posEndX=0;clearInterval(webHi.eventHandler);webHi.eventHandler=null;clearInterval(webHi.closeEventHandler);webHi.closeEventHandler=setInterval(closeMoveEvent,1);Fe.G("hiIcon").title=Fe.G("hiMsg").title="发起即时会话";Fe.G("msgRight").innerHTML="0"}function closeMoveEvent(){if(webHi.posStartX<=webHi.posEndX){clearInterval(webHi.closeEventHandler);webHi.closeEventHandler=null;webHi.posStartX=webHi.posEndX;webHi.textBlock.style.marginRight=webHi.posStartX+"px";return }webHi.posState=0;webHi.textBlock.style.marginRight=webHi.posStartX+"px";webHi.posStartX-=webHi.xStep}function openMoveEvent(){switch(webHi.posState){case 0:webHi.textBlock.style.marginRight=webHi.posStartX+"px";webHi.posStartX+=webHi.xStep;if(webHi.posStartX>=webHi.posEndX){webHi.posState=1;webHi.textBlock.style.marginRight=webHi.posEndX+"px";webHi.textTip.style.marginLeft=(0-webHi.posEndX)+"px"}break;case 1:setOpacity(webHi.textTip,webHi.posAlpha);webHi.textTip.style.display="block";webHi.posState=2;break;case 2:if(webHi.posStartY>=webHi.posEndY){webHi.textTip.style.marginTop=webHi.posStartY--+"px"}var A=Math.abs(Math.sin(3.1415*webHi.posAlpha/180)*100);setOpacity(webHi.textTip,A);webHi.posAlpha+=10;if(webHi.posAlpha>=640){setOpacity(webHi.textTip,100);webHi.posState=3}break;case 3:clearInterval(webHi.eventHandler);webHi.eventHandler=null;return }}window.IMOld=(function(){var E=null,D=0,F=null,B=null;G.interval=30*1000;G.url="http://fetch.im.baidu.com/ihaloader?op=msgcount&charset=gbk&callback=IMOld&refer=tieba.baidu.com";G.reset=function(){G.onchange(0);H(0);if(G.timer){clearInterval(G.timer)}C()};G.fetch=function(){E=A();B=new Date().getTime();if(E){E=E.split("|");B=parseInt(E[1],36);D=E[0];E=null}setTimeout(function(){I();C();if(D>0&&typeof (G.onchange)=="function"){G.onchange(D)}},1000)};function I(){H(D);F=document.createElement("SCRIPT");F.type="text/javascript";F.src=G.url+(G.url.indexOf("?")>0?"&":"?")+".stamp="+new Date().getTime().toString(36);document.getElementsByTagName("HEAD")[0].appendChild(F)}function H(L){var J=new Date(),K=J.getTime();J.setTime(K+3*G.interval);document.cookie="IM_old="+L+"|"+K.toString(36)+";domain=baidu.com;path=/;expires="+J.toGMTString();if(F){F.parentNode.removeChild(F);F=null}}function A(){var J=document.cookie.match(/(^| )IM_old=([^;]*)(;|$)/);if(J!=null){return unescape(J[2])}return null}function C(){G.timer=setInterval(function(){var J=A(),L=0,K=0;if(J){J=J.split("|");K=parseInt(J[1],36);L=J[0];J=null}if(Math.abs(new Date().getTime()-K)>G.interval){I()}if(D!=L){D=L;if(typeof (G.onchange)=="function"){G.onchange(L)}}},500)}function G(J){H(J)}return G})();window.startBaiduHi=(function(){var D=navigator.userAgent.indexOf("MSIE")>-1&&!window.opera,F=navigator.userAgent.indexOf("Firefox")!=-1;function C(){var B="";try{B=new ActiveXObject("WebDetect.Detect").GetVersion()}catch(H){}try{if(typeof (navigator.mimeTypes["application/x-baiduhi"])=="object"){B=".*"}}catch(H){}return B}function G(H){var B=new Date(),I=B.getTime();B.setTime(I+30*1000);document.cookie="IM_add="+escape(H+"|hi.baidu.com|"+(new Date().getTime()).toString(36))+";domain=baidu.com;path=/;expires="+B.toGMTString();if(!/(^| )IM_=/.test(document.cookie)){if(G.f&&G.f.tagName=="FORM"){G.f.submit();return }var I=document.createElement("DIV");I.style.display="none";document.body.insertBefore(I,document.body.firstChild);I.innerHTML="<form name='__IM_REDIRECT_FORM' method='get' target='baidu_webim' action='http://web.im.baidu.com'></form>";G.f=document.forms.__IM_REDIRECT_FORM;G.f.submit();I=null}}function E(H){var B=[];for(prop in H){if(prop!="onim"&&prop!="onwebim"){B.push(prop+"="+H[prop])}}return(B.length>0?"&"+B.join("&"):"")}function A(B,K,H,J){var L=document.createElement("script");document.body.appendChild(L);L.src="http://im.baidu.com/nop?type="+B+"&sid="+K+"&id="+H+E(J)+"&t="+new Date().getTime()}return function(J,N,L,M){A(J,N,L,M);var H=C(),K;if(H==""){if(/active|c2cmsg|message|addcontact|addgroup|creategroup/i.test(J)){G(L);if(M&&M.onwebim){M.onwebim()}}return false}if(!(new RegExp(H.replace(/(\.)/g,"\\."),"i").test(J))){return false}var B="baidu://"+J+"/?sid="+N+"&id="+L+E(M);if(D){B=B+"&browser=IE"}else{if(F){B=B+"&browser=FF&promo=c2cmsg|message|addgroup|creategroup|addcontact"}}if(M&&M.onim){M.onim()}if(document.getElementById("__IM_REDIRECT_IFRAME")){K=document.getElementById("__IM_REDIRECT_IFRAME")}else{K=document.createElement("iframe");K.style.display="none";K.id="__IM_REDIRECT_IFRAME";document.body.appendChild(K)}K.src=B}})();window.IMOld.onchange=function(A){if(A>0){openTip(A)}else{closeTip()}};function onimFunc(){IMOld.reset()}var jsonFunction={onim:onimFunc};function openIM(C,B,A,D){clearInterval(webHi.eventHandler);webHi.eventHandler=null;window.startBaiduHi(C,B,A,jsonFunction)}function startShowHiMsg(A){window.IMOld.url+="&un="+A;IMOld.fetch()};