var cr=cr||{};cr.imgBase=cr.imgBase||"http://images.sohu.com/cs/sohuim/libs";cr.version=cr.version||"0.2.11";cr.Require=cr.Require||function(_1,_2,_3){var _4=cr.Require;if(typeof _4.Impl=="undefined"){cr.rs.push([_1,_2,_3]);if(!cr.rt){var _5=document.createElement("script");var _6=cr.imgBase+"/cr.core."+cr.version+".js";var ua=navigator.userAgent.toLowerCase();if(ua.indexOf("msie 6.0")>=0&&ua.indexOf("msie 7.0")<0){_6=_6.replace(/\.js$/g,".bin");}_5.setAttribute("type","text/javascript");_5.setAttribute("language","javascript");_5.setAttribute("charset","gbk");_5.setAttribute("src",_6);var _8=document.getElementsByTagName("head")[0];_8.appendChild(_5);cr.rt=window.setTimeout(function(){_8.removeChild(_5);_3("timeout");},5*60*1000);}}else{new _4.Impl(_1,_2,_3);}};cr.rs=cr.rs||[];cr.rt=cr.rt||0;cr.Require.Uid=cr.Require.Uid||function(_9,_a){cr.Require([["cr.uid","http://me.sohu.com/spp?"+(new Date()).getTime()]],_9,_a);};cr.Provide=cr.Provide||function(_1){cr.ps[_1]=true;cr.Require("cr.core",function(){cr.evt.Send(_1,"ready");});};cr.Delete=function(_2){delete cr.ps[_2];};cr.ps=cr.ps||{};cr.Array=cr.Array||function(_1,n,s){var _4=[];if(!_1){}else{if(_1.toArray){_4=_1.toArray();}else{if("length" in _1){var j=_1.length;for(var i=0;i<j;i++){_4.push(_1[i]);}}else{_4.push(_1);}}}return _4;};Object.crExtend=cr.Extend=cr.Extend||function(_1,_2){for(var _3 in _2){_1[_3]=_2[_3];}return _1;};cr.Class=function(){var _1=function(){this.InitBase=function(){var _2=new cr.Array(arguments);var _3=_2.shift();_3.prototype.initialize.apply(this,_2);};this.initialize.apply(this,arguments);};var _4;var _5=new cr.Array(arguments);while((_4=_5.shift())){cr.Extend(_1.prototype,_4.prototype||_4);}return _1;};cr.core={};cr.Array.ApplyEachFunc=function(_1){var _2=cr.Array(arguments);_2.shift();var j=_1.length;for(var i=0;i<j;i++){if(typeof _1[i]=="function"){_1[i].apply(_1,_2);}}};cr.Array.ForEach=function(_5,_6){var _7=cr.Array(arguments)||[];_7.splice(0,2);var j=_5.length;for(var i=0;i<j;i++){if(_6.apply(_5[i],[_5[i]].concat(_7))=="break"){return;}}};cr.Array.Erase=function(_a){var _b=cr.Array(arguments);_b.shift();while(_b.length){var _c=_b.shift();for(var i=0;i<_a.length;){if(_a[i]==_c){_a.splice(i,1);}else{++i;}}}};cr.Array.EraseIf=function(_e,_f){var _10=cr.Array(arguments);_10.splice(0,2);if(_10.length==0){for(var i=_e.length-1;i>=0;--i){if(_f(_e[i])){_e.splice(i,1);}}return;}while(_10.length){var _12=_10.shift();for(var i=_e.length-1;i>=0;--i){if(_f(_e[i],_12)){_e.splice(i,1);}}}};cr.func=cr.func||{Bind:function(){var _1=cr.Array(arguments);var _2=_1.shift(),object=_1.shift();return function(){return _2.apply(object,_1.concat(cr.Array(arguments)));};},BindAsEventListener:function(){var _3=cr.Array(arguments);var _4=_3.shift(),object=_3.shift();return function(_5){return _4.apply(object,[_5||window.event].concat(_3));};},CallWith:function(){var _6=cr.Array(arguments);var _7=_6.shift();return function(){return _7.apply(this,_6.concat(cr.Array(arguments)));};},Defer:function(_8){window.setTimeout(_8,0);}};cr.str={Format$:function(){var _1=new cr.Array(arguments);var _2=_1.shift();_2=_2.replace("$$","$DLR");for(var i=_1.length;i>0;--i){_2=_2.replace("$"+i,_1[i-1]);}_2=_2.replace("$DLR","$");return _2;}};cr.logLevel=typeof cr.logLevel=="number"?cr.logLevel:3;cr._Dump=function(_1){var _2=[];var _3=cr.Array(arguments);_3.shift();var _4=function(_5){return String(_5);};if(typeof cr.Json==="function"){_4=cr.Json;}while(typeof _1!="undefined"){try{if(_1 instanceof Error){if(typeof _1.name!="undefined"){_2.push(_1.name);}if(typeof _1.message!="undefined"){_2.push(":"+_1.message);}if(typeof _1.fileName!="undefined"){_2.push(" From "+_1.fileName);}if(typeof _1.lineNumber!="undefined"){_2.push(":"+_1.lineNumber);}if(typeof _1.stack=="string"){_2.push(" Stack:");_2.push("  "+_1.stack.replace(/\n/g,"\n  "));}}else{_2.push(_4(_1));}}catch(e){_2.push("[unknown]");}_1=_3.shift();}return _2.join(" ");};cr.Error=function(){try{cr.evt.Send("cr.log","error",cr.Array(arguments));}catch(e){}cr._Log("error",arguments);};if(typeof console=="undefined"){cr._Log=cr.Warn=cr.Info=cr.Log=cr.Debug=function(){};}else{cr._Log=function(_6,_7){try{_6=_6.toLowerCase();if(typeof console[_6]=="function"){if(cr.browser.isWebKit){console[_6](cr.Array(_7));}else{console[_6].apply(console,cr.Array(_7));}}else{if(typeof opera!="undefined"){opera.postError(cr._Dump(cr.Array(_7)));}else{console[_6](cr._Dump(cr.Array(_7)));}}}catch(e){}};cr.Warn=function(){if(cr.logLevel<=2){cr._Log("warn",arguments);}};cr.Info=function(){if(cr.logLevel<=1){cr._Log("info",arguments);}};cr.Log=cr.Debug=function(){if(cr.logLevel<=0){cr._Log("log",arguments);}};}cr.evt=cr.evt||{_C:function(_1,_2,_3,_4){var _5=_1.length;var _6=cr.evt;for(var i=0;i<_5;++i){var _8=_6._GC(_1[i]);if(_6._co[_1[i]]){_6.Unregister(_2,_3,_1[i]);}if(typeof _8=="function"){var _9=_8(_2,_3,_4);if(_9&&_9=="break"){return true;}}}return false;},Send:function(_a,_b,_c){if(typeof _a=="string"){_a=_a.toLowerCase();}if(typeof _b=="string"){_b=_b.toLowerCase();}cr.Info("EVT:",_a,_b,_c);var _d=cr.evt;var _e=_d._e[_a];if(!_e){return;}if(_d._C(_e._c,_a,_b,_c)){return;}if(typeof _b!="string"||!_b.length){return;}var _f=_e._e[_b];if(_f){_d._C(_f._c,_a,_b,_c);}},Register:function(cmd,_11,_12){if(typeof cmd=="string"){cmd=cmd.toLowerCase();}if(typeof _11=="string"){_11=_11.toLowerCase();}var _13=cr.evt;var _14=_13._AC(_12);if(!_13._e[cmd]){_13._e[cmd]={_e:{},_c:[]};}var _15=_13._e[cmd];if(typeof _11=="string"&&_11.length){if(!_15._e[_11]){_15._e[_11]={_c:[]};}_15._e[_11]._c.push(_14);}else{_15._c.push(_14);}return _14;},RegisterOnce:function(cmd,_17,_18){var nId=cr.evt.Register(cmd,_17,_18);cr.evt._co[nId]=true;},Unregister:function(cmd,_1b,_1c){if(typeof cmd=="string"){cmd=cmd.toLowerCase();}if(typeof _1b=="string"){_1b=_1b.toLowerCase();}var _1d=cr.evt;if(!_1d._e[cmd]){cr.Warn("EVT Unreg:",cmd,"not found");return;}var evt=_1d._e[cmd];if(typeof _1b=="string"&&_1b.length&&evt[_1b]){cr.Array.Erase(evt[_1b]._c,_1c);}else{cr.Array.Erase(evt._c,_1c);}this._DC(_1c);},_DC:function(_1f){delete cr.evt._c[_1f];delete cr.evt._co[_1f];},_AC:function(_20){var _21=cr.evt;var _22=_21._cn++;_21._c[_22]=_20;_21._co[_22]=false;return _22;},_GC:function(_23){return cr.evt._c[_23];},_c:{},_co:{},_cn:0,_e:{}};cr.Require.Impl=cr.Require.Impl||cr.Class({initialize:function(_1,_2,_3){var _4=this;_4.d=[];_4.cl=_2;_4.ce=_3;if(typeof _1=="string"){_1=[_1];}cr.Array.ForEach(_1,function(_5){var _6=[];if(typeof _5=="string"){_5=[_5];}var _6=_5[0];var _7=_5.length>1?_5[1]:(_4.u+"/"+_5[0]+"."+cr.version+".js");var _8=_5.length>2?_5[2]:"gbk";if(!_4.i(_6)){_4.d.push(_6);cr.evt.RegisterOnce(_6,"ready",cr.func.Bind(_4.r,_4));if(!cr.Require.dh(_6)){cr.Require.d.push(_6);_4.l(_7,_8);}}});if(_4.d.length>0){_4.ht=window.setTimeout(cr.func.Bind(_4.t,_4),(_4.d.length+4)*_4.nt);}else{_4.cr();}},i:function(_9){try{return !!cr.ps[_9];}catch(e){}return false;},l:function(_a,_b){if(cr.browser.isIE6){_a=_a.replace(/\.js$/g,".bin");}var _c=document.createElement("script");_c.setAttribute("type","text/javascript");_c.setAttribute("language","javascript");_c.setAttribute("charset",_b);_c.setAttribute("src",_a);document.getElementsByTagName("head")[0].appendChild(_c);},r:function(_d,_e){if(_e!="ready"){return;}cr.Array.Erase(this.d,_d);cr.Array.Erase(cr.Require.d,_d);if(this.d.length==0){this.cr();}},cr:function(){if(this.ht){window.clearTimeout(this.ht);}if(this.cl){this.cl();delete this.cl;}},t:function(){if(typeof this.ce=="function"){this.ce("timeout");}},d:null,nt:60*1000,ht:null,cl:null,ce:null,u:cr.imgBase});cr.Require.Init=function(){if(cr.rt){window.clearTimeout(cr.rt);}cr.rt=0;if(cr.rs){cr.Array.ForEach(cr.rs,function(_f){cr.Require(_f[0],_f[1],_f[2]);});delete cr.rs;}};cr.Require.dh=function(_10){var has=false;cr.Array.ForEach(cr.Require.d,function(_12){if(_12==_10){has=true;}});return has;};cr.Require.d=cr.Require.d||[];cr.Wait=cr.Wait||function(ns,_2){try{if(!!cr.ps[ns]){try{_2();}catch(e){}return;}}catch(e){}cr.evt.RegisterOnce(ns,"ready",_2);};cr.NsLoader=cr.Class({initialize:function(_1,_2,_3){this._ns=_1;this._js=_2;if(typeof _3=="string"){this._cs=_3;}this._evtId=cr.evt.Register(_1,false,cr.func.Bind(this._onEvt,this));},_isReady:function(){try{var ns=eval(this._ns);return typeof ns!="undefined";}catch(e){}return false;},_onReady:function(){if(this._evtId>=0){cr.evt.Unregister(this._ns,false,this._evtId);cr.Array.ForEach(this._pe,function(_5){cr.evt.Send(_5.cmd,_5.mcmd,_5.args);});this._pe=[];}this._evtId=-1;},_onEvt:function(_6,_7,_8){if(this._isReady()||_7=="ready"){this._onReady();}else{this.Load();this._pe.push({cmd:_6,mcmd:_7,args:_8});return "break";}},Load:function(){var _9=document.createElement("script");_9.setAttribute("src",this._js);_9.setAttribute("charset",this._cs);document.getElementsByTagName("head")[0].appendChild(_9);},_ns:null,_js:null,_cs:"gbk",_evtId:-1,_pe:[]});cr.Position=cr.Class({initialize:function(x,y){this.x=x;this.y=y;}});cr.cookie={Set:function(_1,_2,_3,_4,_5){document.cookie=_1+"="+escape(_2)+((_3)?"; expires="+_3.toGMTString():"")+((_4)?"; path="+_4:"")+((_5)?"; domain="+_5:"");},Get:function(_6){var _7=document.cookie.split("; ");for(var i=0;i<_7.length;i++){var _9=_7[i].split("=");if(_6==_9[0]){return unescape(_9[1]);}}return "";},Delete:function(_a,_b,_c){if(cr.Cookie.Get(_a).length>0){document.cookie=_a+"="+((_b)?"; path="+_b:"")+((_c)?"; domain="+_c:"")+"; expires=Thu, 01-Jan-70 00:00:01 GMT";}}};if(!cr.browser){cr.browser=new (function(){var _1=this;var ua=navigator.userAgent.toLowerCase();_1.isIE=window.ActiveXObject?true:false;_1.isNstdIE=_1.isIE?(typeof document.compatMode!="undefined"&&document.compatMode=="BackCompat"):false;_1.isStdIE=_1.isIE&&(!_1.isNstdIE);_1.isIE7=_1.isIE&&(ua.indexOf("msie 7.0")>0);_1.isIE6=!_1.isIE7&&_1.isIE&&(ua.indexOf("msie 6.0")>0);try{_1.isMaxthon=!!external.max_version;}catch(e){_1.isMaxthon=false;}_1.isOpera=!!window.opera;_1.isWebKit=ua.indexOf("applewebkit/")>-1;_1.isGecko=ua.indexOf("gecko")>-1&&ua.indexOf("khtml")==-1;_1.version=(ua.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1];if(ua.indexOf("windows nt")>-1){_1.system="win-"+(ua.match(/.+windows nt( ?[.\d]+)/)||[0,"nt"])[1];}else{if(ua.indexOf("ubuntu")>-1){_1.system=ua.match(/.+(ubuntu(-.*)?)/)[1];}else{_1.system="unknown";}}_1.isLoadingDone=function(_3){if(!_3){_3=window;}if(_3==window&&cr.browser._r){return true;}if(!_3.document){return false;}if(cr.browser.isGecko){return !!_3.document.body;}else{return _3.document.readyState=="complete";}};_1._o=function(){if(cr.browser._t){window.clearInterval(cr.browser._t);cr.browser._t=null;}cr.browser._r=true;cr.browser._o=function(){};};_1._r=false;_1._t=0;})();(function(){var _4=0;if(cr.browser.isLoadingDone()){cr.browser._o();}else{if(cr.browser.isWebKit){_4=function(){if(/loaded|complete/.test(document.readyState)){cr.browser._o();}};}else{if(cr.browser.isGecko){_4=function(){if(!!document.body){cr.browser._o();}};}else{if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(e){document.removeEventListener("DOMContentLoaded",arguments.callee,false);cr.browser._o();},false);}else{if(cr.browser.isIE){document.attachEvent("onreadystatechange",function(e){if(document.readyState=="complete"){document.detachEvent("onreadystatechange",arguments.callee);cr.browser._o();}});if(window==top){_4=function(){try{document.documentElement.doScroll("left");cr.browser._o();}catch(e){}};}}}}}}if(_4){cr.browser._t=window.setInterval(_4,20);}})();}if(!cr.event){cr.event={KEY_BACKSPACE:8,KEY_TAB:9,KEY_RETURN:13,KEY_ESC:27,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_DELETE:46,KEY_HOME:36,KEY_END:35,KEY_PAGEUP:33,KEY_PAGEDOWN:34,element:function(_1){return _1.target||_1.srcElement;},doc:function(_2){var _3=this.element(_2);return _3.ownerDocument||_3.document;},isLeftClick:function(_4){return (((_4.which)&&(_4.which==1))||((_4.button)&&(_4.button==1)));},pointerX:function(_5){var _6=this.doc(_5);return _5.pageX||(_5.clientX+(_6.documentElement.scrollLeft||_6.body.scrollLeft));},pointerY:function(_7){var _8=this.doc(_7);return _7.pageY||(_7.clientY+(_8.documentElement.scrollTop||_8.body.scrollTop));},stop:function(_9){if(_9.preventDefault){_9.preventDefault();_9.stopPropagation();}else{_9.returnValue=false;_9.cancelBubble=true;}},observers:false,_observeAndCache:function(_a,_b,_c,_d){if(!this.observers){this.observers=[];}if(_a.addEventListener){this.observers.push([_a,_b,_c,_d]);_a.addEventListener(_b,_c,_d);}else{if(_a.attachEvent){this.observers.push([_a,_b,_c,_d]);_a.attachEvent("on"+_b,_c);}}},unloadCache:function(){if(!cr.event.observers){return;}for(var i=0,length=cr.event.observers.length;i<length;i++){cr.event.stopObserving.apply(this,cr.event.observers[i]);cr.event.observers[i][0]=null;}cr.event.observers=false;},observe:function(_f,_10,_11,_12){_12=_12||false;if(_10=="keypress"&&(cr.browser.isWebKit||_f.attachEvent)){_10="keydown";}cr.event._observeAndCache(_f,_10,_11,_12);},stopObserving:function(_13,_14,_15,_16){_16=_16||false;if(_14=="keypress"&&(cr.browser.isWebKit||_13.attachEvent)){_14="keydown";}if(_13.removeEventListener){_13.removeEventListener(_14,_15,_16);}else{if(_13.detachEvent){try{_13.detachEvent("on"+_14,_15);}catch(e){}}}}};if(cr.browser.isIE){cr.event.observe(window,"unload",cr.event.unloadCache,false);}if(cr.browser.onload){cr.event.observe(window,"load",cr.browser.onload);}}cr.utils={GetRootDomain:function(_1){var _2=_1.match(/^(.*\.)?([^\.]+\.[^\.]+)$/i);if(_2&&_2.length==3){return _2[2];}return _1;},SubElem:function(_3,_4,_5){if(!_5){_5="span";}var _6=_3.getElementsByTagName(_5);for(var i=0;i<_6.length;i++){if(_6[i].getAttribute("name")==_4){return _6[i];}}return null;},SubElems:function(_8,_9,_a){if(!_a){_a="span";}var _b=_8.getElementsByTagName(_a);var _c=[];for(var i=0;i<_b.length;i++){if(_b[i].getAttribute("name")==_9){_c.push(_b[i]);}}return _c;},GetPagePosition:function(_e){var _f={};var _10=_e.document;_f.scrollLeft=_e.pageXOffset||_10.documentElement.scrollLeft||_10.body.scrollLeft||0;_f.scrollTop=_e.pageYOffset||_10.documentElement.scrollTop||_10.body.scrollTop||0;if(cr.browser.isGecko||cr.browser.isWebKit){var _11=_10.documentElement;if(_10.compatMode=="BackCompat"){_11=_10.body;}_f.clientWidth=_11.clientWidth;_f.clientHeight=_11.clientHeight;}else{if(cr.browser.isOpera){var _11=_10.documentElement;_f.clientWidth=_11.clientWidth;_f.clientHeight=_11.clientHeight;}else{_f.clientWidth=_e.innerWidth||_10.documentElement.clientWidth||_10.body.clientWidth||0;_f.clientHeight=_e.innerHeight||_10.documentElement.clientHeight||_10.body.clientHeight||0;}}return _f;},GetOffset:function(_12){var _13=0,valueL=0;do{_13+=_12.offsetTop||0;valueL+=_12.offsetLeft||0;_12=_12.offsetParent;}while(_12);return [valueL,_13];},IsNumber:function(obj){return (obj instanceof Number||typeof obj=="number");}};cr.Flash=cr.Flash||cr.Class({initialize:function(_1,id,w,h,_5,c,_7,_8,_9,_a,_b){this.DETECT_KEY=_b?_b:"detectflash";this.skipDetect=this.getRequestParameter(this.DETECT_KEY);this.params={};this.variables={};this.attributes=[];this.useExpressInstall=_7;if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new cr.Flash.PlayerVersion(_5.toString().split(".")));}this.installedVer=this.getPlayerVersion(this.getAttribute("version"),_7);if(c){this.addParam("bgcolor",c);}var q=_8?_8:"high";this.addParam("quality",q);var _d=(_9)?_9:window.location;this.setAttribute("xiRedirectUrl",_d);this.setAttribute("redirectUrl","");if(_a){this.setAttribute("redirectUrl",_a);}},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},createParamTag:function(n,v){var p=document.createElement("param");p.setAttribute("name",n);p.setAttribute("value",v);return p;},getVariablePairs:function(){var _19=new Array();var key;var _1b=this.getVariables();for(key in _1b){_19.push(key+"="+_1b[key]);}return _19;},getPlayerVersion:function(_1c,_1d){var _1e=new cr.Flash.PlayerVersion(0,0,0);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_1e=new cr.Flash.PlayerVersion(x.description.replace(/([a-z]|[A-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");for(var i=3;axo!=null;i++){axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+i);_1e=new cr.Flash.PlayerVersion([i,0,0]);}}catch(e){}if(_1c&&_1e.major>_1c.major){return _1e;}if(!_1c||((_1c.minor!=0||_1c.rev!=0)&&_1e.major==_1c.major)||_1e.major!=6||_1d){try{_1e=new cr.Flash.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}catch(e){}}}return _1e;},getRequestParameter:function(_22){var q=document.location.search||document.location.href.hash;if(q){var _24=q.indexOf(_22+"=");var _25=(q.indexOf("&",_24)>-1)?q.indexOf("&",_24):q.length;if(q.length>1&&_24>-1){return q.substring(q.indexOf("=",_24)+1,_25);}}return "";},getFlashHTML:function(){var _26="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");}_26="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\"";_26+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _27=this.getParams();for(var key in _27){_26+=[key]+"=\""+_27[key]+"\" ";}var _29=this.getVariablePairs().join("&");if(_29.length>0){_26+="flashvars=\""+_29+"\"";}_26+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");}_26="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\">";_26+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var _27=this.getParams();for(var key in _27){_26+="<param name=\""+key+"\" value=\""+_27[key]+"\" />";}var _29=this.getVariablePairs().join("&");if(_29.length>0){_26+="<param name=\"flashvars\" value=\""+_29+"\" />";}_26+="</object>";}return _26;},write:function(_2a){if(this.useExpressInstall){var _2b=new cr.Flash.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_2b)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}else{this.setAttribute("doExpressInstall",false);}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _2a=="string")?document.getElementById(_2a):_2a;n.innerHTML=this.getFlashHTML();}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}}});cr.Flash.PlayerVersion=cr.Flash.PlayVersion||cr.Class({initialize:function(_2d){this.major=parseInt(_2d[0])||0;this.minor=parseInt(_2d[1])||0;this.rev=parseInt(_2d[2])||0;},versionIsValid:function(fv){if(this.major<fv.major){return false;}if(this.major>fv.major){return true;}if(this.minor<fv.minor){return false;}if(this.minor>fv.minor){return true;}if(this.rev<fv.rev){return false;}return true;}});cr.Init=function(){cr.Provide("cr.core");cr.Require.Init();};cr.Init();if(!cr.net){cr.net={};}cr.net.Loader=cr.Class({initialize:function(_1,_2){this._dstDom=_1?_1:(document.getElementsByTagName("head")[0]);if(typeof _2=="function"){this._OnState=_2;}},Init:function(){},Get:function(_3){},Close:function(){},_OnState:function(){},_dstDom:null});if(!cr.net.swfLoader){cr.net.swfLoader={OnEvt:function(id,_2,_3,_4){var _5=cr.net.swfLoader._ldrs[id];if(!_5){return;}switch(_2){case "connected":_5._GetUrl();break;case "recieving":window.clearTimeout(_5._timeout);break;case "closed":break;case "error":_5._OnState("error");break;default:break;}cr.Info("cr.net.swfLoader.OnEvt",id,_2,_3,_4);},LoadSwf:function(_6){var _7=cr.net.swfLoader;try{_7._timeout=window.setTimeout(cr.func.CallWith(_7.OnSwfEvt,"","","error"),5000);}catch(e){}if(_7.st=="uninit"){cr.Info("cr.net.swfLoader.LoadSwf");_7.st="loading";var _8=document.createElement("div");_6.appendChild(_8);var _9=cr.imgBase+"/etc/http."+cr.version+".swf";if(cr.browser.isMaxthon){_9+="?tm="+new Date().getTime();}var _a=new cr.Flash(_9,"cr_swf_net",1,1,"9","#ffffff");_a.addParam("swLiveConnect","true");_a.addParam("allowScriptAccess","always");_a.write(_8);}},OnSwfEvt:function(_b,_c,_d){var _e=cr.net.swfLoader;switch(_d){case "ready":cr.Info("cr.net.swfLoader","loaded");_e.st="ready";_e._swf=document.getElementById("cr_swf_net");if(_e._timeout){window.clearTimeout(_e._timeout);_e._timeout=0;}if(_e._swf){cr.Array.ForEach(_e._wts,_e._SetState,"ready");_e._wts=[];}break;case "error":cr.Array.ForEach(_e._wts,_e._SetState,"error");_e._wts=[];break;}},_SetState:function(_f,_10){_f._OnState(_10);},Init:function(_11){var _12=cr.net.swfLoader;if(_12.st=="ready"){_12._SetState(_11,"ready");}else{if(_12.st=="loading"){_12._wts.push(_11);}else{_12._wts.push(_11);_12.LoadSwf(_11._dstDom);}}},_wts:[],_ldrs:{},_timeout:0,_swf:null,st:"uninit"};cr.evt.RegisterOnce("cr.net.swfloader","flash",cr.net.swfLoader.OnSwfEvt);}if(!cr.net.SwfLoader){cr.net.SwfLoader=cr.Class(cr.net.Loader,{initialize:function(_13,_14){this.InitBase(cr.net.Loader,_13,_14);},Init:function(){cr.net.swfLoader.Init(this);},_Connect:function(){var _15=cr.net.swfLoader;if(!this._fd){this._fd=_15._swf.create("cr.net.swfLoader.OnEvt");}_15._ldrs[this._fd]=this;this._cnted=false;_15._swf.connect(this._fd,this._srv,this._port);this._timeout=window.setTimeout(cr.func.Bind(this._SendTimeout,this),8000);},_SendTimeout:function(){this._OnState("error");},_GetUrl:function(){this._cnted=true;cr.net.swfLoader._swf.write(this._fd,"GET "+this._url+" HTTP/1.1\r\n"+"Host: "+this._srv+"\r\n"+"User-Agent: CHATSWF\r\n"+"Referer: "+window.location.href+"\r\n"+"Cookie: "+document.cookie+"\r\n\r\n");},Get:function(url){cr.Log("cr.net.swfLoader",this._fd,"GET",url);var _17=url.match(/^([^:\/]+:\/\/)?([^:\/]*)(:([^\/]*))?(.*)$/);this._srv=_17[2];if(typeof _17[4]=="string"&&_17[4]!=""){this._port=parseInt(_17[4]);}this._url=_17[5];this._Connect();},Close:function(){try{this.m_response=[];this._srv=null;cr.net.swfLoader._swf.close(this._fd);}catch(e){cr.Warn(e);}},_fd:0,_srv:null,_port:80,_url:"",_cnted:false,_timeout:-1});}if(!cr.net.IframeLoader){cr.net.IframeLoader=cr.Class(cr.net.Loader,{initialize:function(_1,_2){this.InitBase(cr.net.Loader,_1,_2);},Init:function(){this._OnState("ready");},Get:function(_3){var _4=document.createElement("iframe");_4.style.display="none";_4.setAttribute("src",_3);this._dstDom.appendChild(_4);this._iframe=_4;},Close:function(){try{this._dstDom.removeChild(this._iframe);}catch(e){}},_iframe:null});}cr.net.JsLoader=cr.net.JsLoader||cr.Class(cr.net.Loader,{initialize:function(_1,_2){this.InitBase(cr.net.Loader,_1,_2);this.attrs={};},Init:function(){this._OnState("ready");},SetAttr:function(_3,_4){this.attrs[_3]=_4;},Get:function(_5){var _6=document.createElement("script");_6.setAttribute("language","javascript");_6.setAttribute("src",_5);for(var _7 in this.attrs){_6.setAttribute(_7,this.attrs[_7]);}this._dstDom.appendChild(_6);this._script=_6;},Close:function(){try{if(this._script){this._dstDom.removeChild(this._script);}this._script=null;}catch(e){}},_script:null});cr.net.Init=function(){cr.Provide("cr.net");};cr.Require(["cr.core"],cr.net.Init);cr.ext=cr.ext||{_init:[],Init:function(){cr.Array.ApplyEachFunc(cr.ext._init);cr.Provide("cr.ext");}};cr.Css=cr.Class({initialize:function(_1){this.m_o=_1;this.m_ca=[];this.m_cn="";},hasClassName:function(_2){this._UCA();return this._HCN(_2);},_HCN:function(_3){var _4=false;cr.Array.ForEach(this.m_ca,function(_5){if(_5==_3){_4=true;}});return _4;},setClassName:function(_6){this.m_o.className=_6;},addClassName:function(){this._UCA();cr.Array.ForEach(cr.Array(arguments),cr.func.Bind(function(_7){if(this._HCN(_7)){return;}this.m_ca.push(_7);},this));this.setClassName(this.GetClassName());},removeClassName:function(){this._UCA();cr.Array.Erase.apply(this,[this.m_ca].concat(cr.Array(arguments)));this.setClassName(this.GetClassName());},removeClassNamePtn:function(_8){this._UCA();cr.Array.EraseIf(this.m_ca,function(_9){return _8.test(_9);});this.setClassName(this.GetClassName());},getOpacity:function(){return this.getStyle("opacity");},setOpacity:function(_a){this.m_o.style.opacity=(_a==1||_a==="")?"":(_a<0.00001)?0:_a;return this.m_o;},getStyle:function(_b){(_b=="float")?(_b="cssFloat"):_b;var _c=this.m_o.style[_b];if(!_c){var _d=this.m_o.ownerDocument.defaultView.getComputedStyle(this.m_o,null);_c=_d?_d[_b]:null;}if(_b=="opacity"){return _c?parseFloat(_c):1;}return _c=="auto"?null:_c;},setStyle:function(_e){var _f=this.m_o.style;for(var _10 in _e){if(_10=="opacity"){this.setOpacity(_e[_10]);}else{_f[(_10=="float"||_10=="cssFloat")?(_f.styleFloat===undefined?"cssFloat":"styleFloat"):(_10)]=_e[_10];}}return this.m_o;},_UCA:function(){if(this.m_o.className==this.m_cn){return this.m_ca;}this.m_cn=this.m_o.className;var _11=this.m_cn.split(/\s+/);var _12=[];cr.Array.ForEach(_11,function(_13){if(_13.length>0){_12.push(_13);}});this.m_ca=_12;return this.m_ca;},GetClassNames:function(){return this._UCA();},GetClassName:function(){return this.m_ca.join(" ");}});cr.ext._init.push(function(){if(cr.browser.isOpera){cr.Css.prototype._getStyle=cr.Css.prototype.getStyle;cr.Extend(cr.Css.prototype,{getStyle:function(_14){switch(_14){case "left":case "top":case "right":case "bottom":if(this._getStyle(element,"position")=="static"){return null;}default:return this._getStyle(_14);}}});}else{if(cr.browser.isIE){cr.Extend(cr.Css.prototype,{getStyle:function(_15){(_15=="float")?(_15="styleFloat"):_15;var _16=this.m_o.style[_15];if(!_16&&this.m_o.currentStyle){_16=this.m_o.currentStyle[_15];}if(_15=="opacity"){if(_16=(this.getStyle("filter")||"").match(/alpha\(opacity=(.*)\)/)){if(_16[1]){return parseFloat(_16[1])/100;}}return 1;}var _17=function(str){return str.charAt(0).toUpperCase()+str.substring(1).toLowerCase();};if(_16=="auto"){if((_15=="width"||_15=="height")&&(this.getStyle("display")!="none")){return this.m_o["offset"+_17(_15)]+"px";}return null;}return _16;},setOpacity:function(_19){var _1a=this.getStyle("filter"),style=this.m_o.style;if(_19==1||_19===""){style.filter=_1a.replace(/alpha\([^\)]*\)/gi,"");return this.m_o;}else{if(_19<0.00001){_19=0;}}style.filter=_1a.replace(/alpha\([^\)]*\)/gi,"")+"alpha(opacity="+(_19*100)+")";return this.m_o;}});}else{if(cr.browser.isGecko){cr.Css.prototype.setOpacity=function(_1b){this.m_o.style.opacity=(_1b==1)?0.999999:(_1b==="")?"":(_1b<0.00001)?0:_1b;return this.m_o;};}}}});cr.hash=cr.hash||{Times33:function(_1){var _2=0;var l=_1.length;for(var i=0;i<l;++i){_2=(_2*33+_1.charCodeAt(i))&2147483647;}return _2;}};cr.base64=cr.base64||{_p:"=",_t:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Encode:function(_1){var p=cr.base64._p;var _3=cr.base64._t;var s=[],l=_1.length;var rm=l%3;var x=l-rm;for(var i=0;i<x;){var t=_1.charCodeAt(i++)<<16|_1.charCodeAt(i++)<<8|_1.charCodeAt(i++);s.push(_3.charAt((t>>>18)&63));s.push(_3.charAt((t>>>12)&63));s.push(_3.charAt((t>>>6)&63));s.push(_3.charAt(t&63));}switch(rm){case 2:var t=_1.charCodeAt(i++)<<16|_1.charCodeAt(i++)<<8;s.push(_3.charAt((t>>>18)&63));s.push(_3.charAt((t>>>12)&63));s.push(_3.charAt((t>>>6)&63));s.push(p);break;case 1:var t=_1.charCodeAt(i++)<<16;s.push(_3.charAt((t>>>18)&63));s.push(_3.charAt((t>>>12)&63));s.push(p);s.push(p);break;}return s.join("");},Decode:function(_9){var p=cr.base64._p;var s=_9.split("");var _c=[];var l=s.length;var _e=cr.base64._t;while(s[--l]==p){}for(var i=0;i<l;){var t=_e.indexOf(s[i++])<<18;if(i<=l){t|=_e.indexOf(s[i++])<<12;}if(i<=l){t|=_e.indexOf(s[i++])<<6;}if(i<=l){t|=_e.indexOf(s[i++]);}_c.push((t>>>16)&255);_c.push((t>>>8)&255);_c.push(t&255);}while(_c[_c.length-1]==0){_c.pop();}var _11="";cr.Array.ForEach(_c,function(_12){_11+=String.fromCharCode(_12);});return _11;},EncodeX:function(_13){return cr.base64.Encode(_13).replace("+","-").replace("/","_");},DecodeX:function(_14){return cr.base64.Decode(_14.replace("-","+").replace("_","/"));}};cr.passport=cr.passport||{chinaren:["","@sohu","@vip","@17173","@focus","@sol","@game","@sms","@sogou","@inc"],passport:["@chinaren.com","@sohu.com","@vip.sohu.com","@17173.com","@focus.cn","@sol.sohu.com","@game.sohu.com","@sms.sohu.com","@sogou.com","@sohu-inc.com"],blog:["!c","","!vs","!17173","!f","!sol","!gs","!sms","!sg","!sohu-inc"],symbol:{chinaren:"@",passport:"@",blog:"!"},Convert:function(_1,_2,_3){for(var i=cr.passport[_1].length-1;i>=0;i--){if(cr.passport[_1][i]==""){if(_3.indexOf(cr.passport.symbol[_1])<0){return _3+cr.passport[_2][i];}}else{var _5=cr.passport[_1][i];var _6=_3.indexOf(_5);if(_6>=0&&(_6+_5.length)==_3.length){return _3.replace(cr.passport[_1][i],cr.passport[_2][i]);}}}return _3;},GetCurrentuser:function(_7){if(!_7){_7=window;}var _8=_7.PassportSC.cookieHandle();return _8;},GetLastuser:function(){var _9=cr.cookie.Get("lastdomain").split("|");if(_9.length<2){_9=[0,""];}return cr.base64.DecodeX(_9[1]).split("|");},IsAvaliable:function(_a){if(!_a){_a=window;}return !!_a.PassportSC;}};cr.Json=cr.Json||function(_1){if(_1 instanceof Array){return cr.Json.Array(_1);}switch(typeof _1){case "string":return cr.Json.Str(_1);case "boolean":return String(_1);case "number":return isFinite(_1)?String(_1):"null";default:break;}var a=["{"],b,key,v;function p(s){if(b){a.push(",");}a.push(cr.Json(key),":",s);b=true;}for(key in _1){if(_1.hasOwnProperty(key)){v=_1[key];switch(typeof v){case "undefined":case "function":case "unknown":break;case "object":if(v){p(cr.Json(v));}else{p("null");}break;default:p(cr.Json(v));}}}a.push("}");return a.join("");};cr.Json.Array=cr.Json.Array||function(_4){var a=["["],b,i,l=_4.length,v;function p(s){if(b){a.push(",");}a.push(s);b=true;}for(i=0;i<l;i+=1){v=_4[i];switch(typeof v){case "undefined":case "function":case "unknown":break;case "object":if(v){p(cr.Json(v));}else{p("null");}break;default:p(cr.Json(v));}}a.push("]");return a.join("");};cr.Json.Str=cr.Json.Str||function(_7){if(/["\\\x00-\x1f]/.test(_7)){return "\""+_7.replace(/([\x00-\x1f\\"])/g,function(a,b){var c=b.charCodeAt();return "\\u00"+Math.floor(c/16).toString(16)+(c%16).toString(16);})+"\"";}return "\""+_7+"\"";};cr.json={};cr.json.Object=cr.Json;cr.ext._init.push(function(){cr.Timer=cr.Timer||cr.Class({initialize:function(){this._jobs=[];this.i=1;this.ts=20;this._timer=0;this._DoFunc=cr.func.Bind(this._Do,this);},Add:function(_1,_2){if(!this._timer){this._timer=window.setInterval(this._DoFunc,250);}var _3={i:this.i++,t:(new Date()).getTime()+_1,f:_2};for(var i=0;i<this._jobs.length;i++){if(this._jobs[i].t>_3.t){this._jobs.splice(i-1,0,_3);return _3.i;}}this._jobs.push(_3);return _3.i;},Remove:function(id){for(var i=this._jobs.length-1;i>=0;--i){if(this._jobs[i].i==id){this._jobs.splice(i,1);return;}}},_Do:function(){if(this._jobs.length){this.ts=20;}while(this._jobs.length){var _7=this._jobs[0];if(_7.t<(new Date).getTime()){this._jobs.shift();try{window.setTimeout(_7.f,0);}catch(e){cr.Warn("cr.Timer.Do",e);}}else{return;}}this.ts--;if(this.ts<0&&this._timer){window.clearInterval(this._timer);this._timer=0;}}});cr.timer=cr.timer||new cr.Timer();});cr.Require(["cr.core"],cr.ext.Init);cr.ctrl=cr.ctrl||{version:"0.1",m_id:0,GetUniqId:function(){return cr.ctrl.m_id++;},Defines:[]};cr.ctrl.Action=cr.Class({initialize:function(_1,_2){this.m_dstWin=window;this.m_icon=null;this.m_text=null;this.m_tip=null;this.m_menu=null;this.m_checkable=false;this.m_checked=false;this.m_focused=false;this.m_visible=true;this.m_signals={changed:false,hovered:false,checked:false};if(_1){cr.Extend(this,_1);}if(_2){cr.Extend(this.m_signals,_2);}},trigger:function(_3,_4){if(!_4){_4=this.m_dstWin.event;}if(this.m_checkable){if(typeof _3=="undefined"){this.m_checked=!this.m_checked;}else{this.m_checked=_3;}this.m_signals.changed(this);}if(typeof this.m_signals.checked=="function"){this.m_signals.checked(this.m_checked,_4);}},set_focus:function(_5){if(typeof _5=="undefined"){this.m_focused=!this.m_focused;}else{this.m_focused=_5;}if(typeof this.m_signals.changed=="function"){this.m_signals.changed(this);}},hover:function(_6,_7){if(!_7){_7=this.m_dstWin.event;}if(typeof _6=="undefined"){_6=true;}if(typeof this.m_signals.hovered=="function"){this.m_signals.hovered(_6,_7);}},display:function(_8){if(typeof _8=="undefined"){this.m_visible=!this.m_visible;}else{this.m_visible=_8;}if(typeof this.m_signals.changed=="function"){this.m_signals.changed(this);}}});cr.ctrl.Defines.push(function(){cr.ctrl.Container=cr.ctrl.Container||cr.Class(cr.Css,{initialize:function(_1,id,_3){this.option={hoverable:false};this.state={display:false,disable:false,focus:false};this.m_dstWin=_1?_1:window;this.m_doc=this.m_dstWin.document;this.m_id=id?id:cr.ctrl.GetUniqId();if(_3){if(typeof _3!="string"){this.m_containerBox=_3;}else{this.m_containerBox=this.m_doc.createElement(_3);}}else{this.m_containerBox=this.m_doc.createElement("div");}this.InitBase(cr.Css,this.m_containerBox);this.m_css=this;cr.event.observe(this.getDom(),"mouseover",cr.func.BindAsEventListener(this.OnOver,this));cr.event.observe(this.getDom(),"mouseout",cr.func.BindAsEventListener(this.OnOut,this));cr.event.observe(this.getDom(),"click",cr.func.BindAsEventListener(this.OnClick,this));},SetState:function(_4,_5){this.state[_4]=_5;},GetState:function(_6){return this.state[_6];},SetOption:function(_7,_8){this.option[_7]=_8;},GetOption:function(_9){return this.option[_9];},_AddCssPf:function(_a){var _b=[];cr.Array.ForEach(this.GetClassNames(),function(_c){if(!/.*_.*/.test(_c)){_b.push(_c+"_"+_a);}});this.addClassName.apply(this,_b);this.addClassName(_a);},_DelCssPf:function(_d){this.removeClassNamePtn(new RegExp("_"+_d+"$"));this.removeClassName(_d);},removeClassName:function(){var _e=cr.Array(arguments);var _f=this;cr.Css.prototype.removeClassName.apply(_f,_e);cr.Array.ForEach(_e,function(_10){_f.removeClassNamePtn(new RegExp("^"+_10+"_(hover|focused|disable)$"));});},Focus:function(_11){if(typeof _11=="undefined"){_11=!this.GetState("focus");}if(_11){this._DelCssPf("hover");this._AddCssPf("focused");}else{this._DelCssPf("focused");}this.SetState("focus",_11);},Disable:function(){this.SetState("disable",true);this._AddCssPf("disable");},Enable:function(){this._DelCssPf("disable");this.SetState("disable",false);},OnOver:function(_12){if(this.GetOption("hoverable")){this._AddCssPf("hover");}},OnOut:function(_13){this._DelCssPf("hover");},OnClick:function(_14){},pushFront:function(_15){var _16=_15.firstChild;if(_16){_15.insertBefore(this.getDom(),_16);}else{_15.appendChild(this.getDom());}},appendTo:function(_17){_17.appendChild(this.getDom());},getWin:function(){return this.m_dstWin;},getDoc:function(){return this.m_doc;},getId:function(){return this.m_id;},getDom:function(){return this.m_containerBox;},getCss:function(){return this.m_css;},setInnerHTML:function(_18){this.m_containerBox.innerHTML=_18;},addSize:function(_19,_1a){var _1b="";var _1c="";if(cr.utils.IsNumber(_19)){var _1d=parseInt(this.getStyle("width"));_1b=_19+_1d;}if(cr.utils.IsNumber(_1a)){var _1e=parseInt(this.getStyle("height"));_1c=_1a+_1e;}this.setSize(this.getDom(),_1b,_1c);},resize:function(_1f,_20){this.setSize(this.getDom(),_1f,_20);},setSize:function(_21,_22,_23){if(!_21){return;}if(cr.utils.IsNumber(_22)){_21.style.width=_22+"px";}if(cr.utils.IsNumber(_23)){_21.style.height=_23+"px";}},setPosition:function(x,y){if(cr.utils.IsNumber(y)){this.getCss().setStyle({top:y+"px"});}if(cr.utils.IsNumber(x)){this.getCss().setStyle({left:x+"px"});}},clear:function(){for(var i=this.m_containerBox.childNodes.length-1;i>=0;i--){this.m_containerBox.removeChild(this.m_containerBox.childNodes[i]);}},show:function(){this.SetState("display",true);this.m_containerBox.style.display="";},hide:function(){this.SetState("display",false);this.m_containerBox.style.display="none";},redraw:function(){},destroy:function(){try{var dom=this.getDom();dom.parentNode.removeChild(dom);}catch(e){}}});});cr.ctrl.Init=function(){try{cr.Array.ApplyEachFunc(cr.ctrl.Defines);}catch(e){cr.Error("cr.ctrl.Init",e);}cr.Provide("cr.ctrl");};cr.Require(["cr.core","cr.ext"],cr.ctrl.Init);cr.InitMenu=function(){cr.ctrl.MenuItem=cr.Class(cr.ctrl.Action,{initialize:function(_1,_2,_3,_4){_2.m_dstWin=_1;this.InitBase(cr.ctrl.Action,_2,_3);this.m_link=false;this.m_menu=false;this.m_subMenuList=false;this.set_subMenuList(_4);},set_ownerMenu:function(_5){this.m_menu=_5;},has_submenu:function(){return (typeof this.m_subMenuList!="undefined"&&this.m_subMenuList.length>0);},set_focus:function(_6){if(this.m_link){var _7=new cr.Css(this.m_link);var _8="menuItem";if(this.has_submenu()){_8="menuItemSubMenu";}if(_6){_7.removeClassName(_8);_7.addClassName(_8+"Hover");}else{_7.removeClassName(_8+"Hover");_7.addClassName(_8);}}cr.ctrl.Action.prototype.set_focus.apply(this,[_6]);},set_subMenuList:function(_9){this.m_subMenuList=_9;this._init_submenu();},insert_subMenuItem:function(_a,_b){if(!_a){return;}if(!this.m_subMenuList){this.m_subMenuList=[];}if(typeof _a.has_submenu!="function"){cr.Extend(_a,cr.ctrl.MenuItem.prototype);}_a.set_ownerMenu(this.m_menu);if(typeof _b=="undefined"||_b<0){this.m_subMenuList.push(_a);}else{this.m_subMenuList.splice(_b,0,_a);}this._init_submenu();},_init_submenu:function(){if(this.has_submenu()){this.m_signals.hovered=cr.func.Bind(this._submenu_hovered,this);}else{this.m_signals.hovered=false;}},_submenu_hovered:function(_c,_d){if(!this.m_menu){return;}if(_c==true){var _e=this.m_menu.create_submenu(this,this.m_subMenuList);var _f=function(_10,_11){var _12=0;var el=_10;while(el!=null){_12+=el["offset"+_11];el=el.offsetParent;}return _12;};var _14={x:-2000,y:-2000};_e.popup(_14);_e.getCss().setStyle({zIndex:1});_14.x=_f(this.m_link,"Left")+this.m_link.offsetWidth;_14.y=_f(this.m_link,"Top");var _15=cr.utils.GetPagePosition(this.m_dstWin);var _16=_15.scrollTop+_15.clientHeight;var _17=_15.scrollLeft+_15.clientWidth;var _18=parseInt(_e.getDom().offsetHeight);var _19=parseInt(_e.getDom().getStyle("width"));if(_14.x+_19>_17){_14.x=parseInt(this.m_menu.getDom().getStyle("left"))-_19;if(_14.x<_15.scrollLeft){_14.x=_15.scrollLeft;}}if(_14.y+_18>_16){_14.y=_f(this.m_link,"Top")+this.m_link.offsetHeight-_18;if(_14.y<_15.scrollTop){_14.y=_15.scrollTop;}}_e.setPosition(_14.x,_14.y);}}});cr.ctrl.Menu=cr.Class(cr.ctrl.Container,{initialize:function(_1a,_1b){this.InitBase(cr.ctrl.Container,_1a);this._hide_timer=null;if(!_1b){this._menuList=[];}else{this._menuList=this.set_items(_1b);}this.m_parentMenu=false;this.m_subMenu=false;this.m_ownerAction=false;this.setInnerHTML("<ul class=\"menuList\" name=\"menuList\"></ul>");this._menuDom=cr.utils.SubElem(this.getDom(),"menuList","ul");this.getCss().setStyle({zIndex:9999});cr.event.observe(this.getDom(),"mouseout",cr.func.BindAsEventListener(this._menu_on_out,this));},items:function(){return this._menuList;},set_items:function(_1c){for(var i=0;i<_1c.length;i++){this.insert(_1c[i]);}},clear:function(){this._menuList=[];},insert:function(_1e,_1f){if(!_1e){return;}if(typeof _1e.has_submenu!="function"){cr.Extend(_1e,cr.ctrl.MenuItem.prototype);}_1e.set_ownerMenu(this);if(typeof _1f=="undefined"||_1f<0){this._menuList.push(_1e);}else{this._menuList.splice(_1f,0,_1e);}},_createDom:function(){var _20="empty";for(var i=0;i<this.items().length;i++){var _22=this.items()[i];if(!_22.m_visible){continue;}var _23=this.m_doc.createElement("li");if(_22.has_submenu()){_23.className="menuItemSubMenu";_23.innerHTML="<div name='icon' class='menuIcon'>&nbsp;</div>";}else{_23.className="menuItem";}_23.title=_22.m_tip;this._menuDom.appendChild(_23);var _24=this.m_doc.createElement("div");_24.setAttribute("name","text");_24.className="menuText";_24.innerHTML=_22.m_text;_23.appendChild(_24);_22.m_link=_23;cr.event.observe(_23,"mouseover",cr.func.BindAsEventListener(this._item_on_over,this,_22));cr.event.observe(_23,"mouseout",cr.func.BindAsEventListener(this._item_on_out,this,_22));cr.event.observe(_23,"click",cr.func.BindAsEventListener(this._item_on_click,this,_22));_20="noEmpty";}return _20;},_item_on_over:function(_25,_26){this.hide_submenu();_26.set_focus(true);this.showMenu();_26.hover(true,_25);},_menu_on_out:function(_27){this.hideMenu();if(this.m_parentMenu){this.m_parentMenu._menu_on_out(_27);}},_item_on_out:function(_28,_29){_29.set_focus(false);_29.hover(false,_28);},_item_on_click:function(_2a,_2b){try{this.hideMenu(0);if(this.m_parentMenu){this.m_parentMenu.hideMenu(0);}}catch(e){}_2b.trigger(false,_2a);},set_width:function(_2c){if(!_2c){return;}if(cr.browser.isGecko||cr.browser.isStdIE||cr.browser.isIE7){_2c=parseInt(_2c)-2;}else{if(cr.browser.isIE){_2c=parseInt(_2c)-6;}}var _2d=this._menuDom.childNodes;for(var i=_2d.length-1;i>=0;i--){if(_2d[i].style){if(cr.browser.isGecko||cr.browser.isIE7){_2d[i].style.width=(_2c-12)+"px";}else{_2d[i].style.width=_2c+"px";}}var _2f=cr.utils.SubElem(_2d[i],"icon","div");var _30=cr.utils.SubElem(_2d[i],"text","div");if(_2f){if(cr.browser.isGecko||cr.browser.isIE7){_30.style.width=(_2c-19)+"px";}else{_30.style.width=(_2c-7)+"px";}}else{if(cr.browser.isGecko||cr.browser.isIE7){_30.style.width=(_2c-12)+"px";}else{_30.style.width=_2c+"px";}}}this.getCss().setStyle({width:_2c+"px"});},_adjust_width:function(){var _31=0;var _32=this._menuDom.childNodes;for(var i=_32.length-1;i>=0;i--){var _34=cr.utils.SubElem(_32[i],"icon","div");var _35=cr.utils.SubElem(_32[i],"text","div");var _36=parseInt(_35.scrollWidth);if(_34){_36+=7;}if(_36>_31){_31=_36;}}this.set_width(_31+14);},_clearDom:function(){for(var i=this._menuDom.childNodes.length-1;i>=0;i--){this._menuDom.removeChild(this._menuDom.childNodes[i]);}},redraw:function(){this._clearDom();return this._createDom();},popup:function(_38,_39){this.setPosition(-2000,-2000);this.hideMenu(0);if(this.redraw()=="empty"){return;}this.getCss().setStyle({width:"1px"});this.showMenu();if(typeof _39!="undefined"&&_39>0){this.set_width(_39);}else{this._adjust_width();}var _3a=cr.utils.GetPagePosition(this.m_dstWin);var _3b=_3a.scrollTop+_3a.clientHeight;var _3c=_3a.scrollLeft+_3a.clientWidth;var _3d=this.getDom().offsetHeight;var _3e=this.getDom().offsetWidth;if(_38.x+_3e>_3c){_38.x=_38.x-_3e;if(_38.x<_3a.scrollLeft){_38.x=_3a.scrollLeft;}}if(_38.y+_3d>_3b){_38.y=_38.y-_3d;if(_38.y<_3a.scrollTop){_38.y=_3a.scrollTop;}}this.setPosition(_38.x,_38.y);},popupNear:function(_3f,_40,_41,_42){_40=_40?_40:"down";var _43=cr.utils.GetOffset(_3f);var css=new cr.Css(_3f);if(_40==="down"){var _45=_3f.clientHeight;var _46=parseInt(css.getStyle("borderTopWidth"));if(isNaN(_46)){_46=0;}this.popup(new cr.Position(_43[0]+_41,_43[1]+_45+_46+_42));}else{if(_40==="right"){var _47=_3f.clientWidth;var _48=parseInt(css.getStyle("borderLeftWidth"));if(isNaN(_48)){_48=0;}this.popup(new cr.Position(_43[0]+_47+_48+_41,_43[1]+_42));}}},showMenu:function(){if(this._hide_timer){window.clearTimeout(this._hide_timer);}this._hide_timer=0;this.show();if(this.m_parentMenu){this.m_parentMenu.showMenu();}if(this.m_ownerAction){this.m_ownerAction.set_focus(true);}},_do_hide:function(){this.hide();this.hide_submenu();if(this.m_ownerAction){this.m_ownerAction.set_focus(false);}},hideMenu:function(_49){if(typeof _49!="number"){_49=800;}else{if(_49==0){return this._do_hide();}}if(!this._hide_timer){this._hide_timer=window.setTimeout(cr.func.Bind(this._do_hide,this),_49);}},hide_submenu:function(){if(this.m_subMenu){this.m_subMenu.hideMenu(0);}},create_submenu:function(_4a,_4b){if(this.m_subMenu){this.m_subMenu.clear();}else{this.m_subMenu=new cr.ctrl.Menu(this.m_dstWin,this._windowId+"_submenu");}this.m_subMenu.set_items(_4b);this.m_subMenu.m_parentMenu=this;this.m_subMenu.m_ownerAction=_4a;this.m_subMenu.redraw();return this.m_subMenu;}});cr.Provide("cr.ctrl.menu");};cr.Require(["cr.ctrl"],cr.InitMenu);cr.effect={effects:["fade"]};cr.effect.Fade=cr.Class({initialize:function(_1,_2,_3,_4,_5,_6){try{this._dom=_1;this.m_css=new cr.Css(this._dom);this._fadeTimer=null;if(typeof _5=="number"){this._fade_from=_5;}else{this._fade_from=1;}if(typeof _6=="number"){this._fade_to=_6;}else{this._fade_to=0;}this._speed=1/(_2);if(this._fade_to<this._fade_from){this._speed=0-this._speed;}this._preFade=_3;this._postFade=_4;if(typeof _3=="function"){_3();}this._fadeTimer=setInterval(cr.func.Bind(this._do_fade,this),1);}catch(e){}},_do_fade:function(){try{this._fade_from+=this._speed;if((this._speed>0&&this._fade_from>=this._fade_to)||(this._speed<0&&this._fade_from<=this._fade_to)){clearInterval(this._fadeTimer);if(this._fade_to==0){this.m_css.setStyle({display:"none"});this.m_css.setStyle({opacity:1});}else{if(this._fade_to==1){this.m_css.setStyle({opacity:1});}}if(typeof this._postFade=="function"){this._postFade();}}else{this.m_css.setStyle({opacity:this._fade_from});}}catch(e){}}});cr.effect.Float=cr.Class({initialize:function(_1,_2,_3,_4){this._dstWin=_1;this._obj=_2;this._css=new cr.Css(_2);this._fun=false;this._align=_3?"r":"l";this._valign=_4?"b":"t";},start:function(x,y){var _7=cr.utils.GetPagePosition(this._dstWin);var _8="auto";var _9="auto";var _a="auto";var _b="auto";var _c=cr.utils.GetOffset(this._obj);if(this._align=="l"){_9=(typeof x=="number"?x:_c[0])+"px";}else{_a=(typeof x=="number"?x:(_7.clientWidht-_c[0]-this._obj.clientWidth))+"px";}if(this._valign=="t"){_8=(typeof y=="number"?y:_c[1])+"px";}else{_b=(typeof y=="number"?y:(_7.clientHeight-_c[1]-this._obj.clientHeight))+"px";}this._css.setStyle({position:"fixed",top:_8,left:_9,right:_a,bottom:_b});},stop:function(){var _d=cr.utils.GetPagePosition(this._dstWin);var _e=cr.utils.GetOffset(this._obj);if(this._css.getStyle("position")=="fixed"){_e[0]+=_d.scrollLeft;_e[1]+=_d.scrollTop;}this._css.setStyle({position:"absolute",top:_e[1]+"px",left:_e[0]+"px",right:"auto",bottom:"auto"});}});if(cr.browser.isNstdIE||cr.browser.isIE6){cr.Extend(cr.effect.Float.prototype,{start:function(x,y){this._objPos={x:x,y:y};if(this._onScroll){return;}this._onScroll=window.setInterval(cr.func.Bind(this.onScroll,this),100);},stop:function(){if(!this._onScroll){return;}window.clearInterval(this._onScroll);this._onScroll=0;},onScroll:function(){var _11=cr.utils.GetPagePosition(this._dstWin);var _12=_11.scrollLeft+(this._align=="r"?(_11.clientWidth-this._objPos.x-this._obj.clientWidth):this._objPos.x);var _13=_11.scrollTop+(this._valign=="b"?(_11.clientHeight-this._objPos.y-this._obj.clientHeight):this._objPos.y);try{var _14=this._obj.offsetParent;while(_14){try{if(_14.style.position=="absolute"){break;}}catch(e){}_14=_14.offsetParent;}if(_14){var _15=cr.utils.GetOffset(_14);_12-=_15[0];_13-=_15[1];}}catch(e){}this._css.setStyle({position:"absolute",left:_12+"px",top:_13+"px"});}});}cr.effect.FlashTitle=cr.Class({initialize:function(_1,_2,_3){this._dstWin=_1;this._arrayText=_2?_2:[];this._time=_3?_3:1000;this._origWinTitle="";this._index=0;this._flashFlag=false;this._interval=this._dstWin.setInterval(cr.func.Bind(this.setTitle,this),this._time);},setFlashText:function(_4){try{this._arrayText=_4;this._arrayText.push(this._origWinTitle);}catch(e){}},setTitle:function(){try{if(this._flashFlag){var i=this._index%this._arrayText.length;top.window.document.title=this._arrayText[i];this._index++;}}catch(e){}},start:function(){try{if(!this._flashFlag){this._origWinTitle=top.window.document.title;this._arrayText.push(this._origWinTitle);this._flashFlag=true;}}catch(e){}},stop:function(){try{if(this._flashFlag){this._flashFlag=false;top.window.document.title=this._origWinTitle;}}catch(e){}}});cr.effect.Init=function(){cr.Provide("cr.effect");};cr.Require(["cr.core","cr.ctrl"],cr.effect.Init);var webim=webim||{imageBase:"http://images.sohu.com/cs/sohuim/xiaozt/version/2.0",majorVersion:"1.8.14"};webim.libs={};if(!webim.libs.crToJson){webim.libs.ArrayToJson=function(_1){var a=["["],b,i,l=_1.length,v;function p(s){if(b){a.push(",");}a.push(s);b=true;}for(i=0;i<l;i+=1){v=_1[i];switch(typeof v){case "undefined":case "function":case "unknown":break;case "object":if(v){p(webim.libs.crToJson(v));}else{p("null");}break;default:p(webim.libs.crToJson(v));}}a.push("]");return a.join("");};webim.libs.crToJson=function(_4){if(_4 instanceof Array){return webim.libs.ArrayToJson(_4);}switch(typeof _4){case "string":return webim.libs.StrToJson(_4);case "boolean":return String(_4);case "number":return isFinite(_4)?String(_4):"null";default:break;}var a=["{"],b,key,v;function p(s){if(b){a.push(",");}a.push(webim.libs.crToJson(key),":",s);b=true;}for(key in _4){if(_4.hasOwnProperty(key)){v=_4[key];switch(typeof v){case "undefined":case "function":case "unknown":break;case "object":if(v){p(webim.libs.crToJson(v));}else{p("null");}break;default:p(webim.libs.crToJson(v));}}}a.push("}");return a.join("");};webim.libs.StrToJson=function(_7){if(/["\\\x00-\x1f]/.test(_7)){return "\""+_7.replace(/([\x00-\x1f\\"])/g,function(a,b){var c=b.charCodeAt();return "\\u00"+Math.floor(c/16).toString(16)+(c%16).toString(16);})+"\"";}return "\""+_7+"\"";};}webim.libs.dom={create:function(){try{return webim.libs.dom.init({});}catch(e){cr.Error("webim.libs.dom.create",e);}return false;},init:function(_1){try{if(!_1){return false;}if(typeof _1._set_attr!="function"){Object.crExtend(_1,webim.libs.dom._extend);}for(var _2 in _1._childs()){var _3=_1._find_child(_2);for(var i=_3.length-1;i>=0;--i){if(typeof _3[i]!="function"){webim.libs.dom.init(_3[i]);}}}return _1;}catch(e){cr.Error("webim.libs.dom.init",e);}return _1;},toJSON:function(_5){try{return webim.libs.crToJson(_5);}catch(e){}return false;},_extend:{"_set_attr":function(_6,_7){try{if(!this._attr){this._attr={};}return this._attr[_6]=_7;}catch(e){}return false;},"_set_value":function(_8){try{return this._value=_8;}catch(e){}return false;},"_set_child":function(_9,_a){if(!this._child){this._child={};}if(this._find_child(_9).length==0){this._child[_9]=[];}return this._child[_9].push(webim.libs.dom.init(_a));return false;},"_del_attr":function(_b){try{return delete this._attr[_b];}catch(e){}return false;},"_del_child":function(_c,_n){try{if(_n){return this._child[_c].splice(_n,1);}else{return delete this._child[_c];}}catch(e){}return false;},"_del_value":function(){try{return delete this._value;}catch(e){}return false;},"_find_child":function(_e){if(this._child&&this._child[_e]){return this._child[_e];}return [];},"_find_attr":function(_f){if(this._attr&&this._attr[_f]){return this._attr[_f];}return false;},"_childs":function(){try{return this._child;}catch(e){}return {};},"_attrs":function(){try{return this._attr;}catch(e){}return {};},"_get_value":function(){try{return this._value;}catch(e){}return false;}}};webim.libs.loader={_timer:{},_content:{},load:function(_1,_2,_3,_4,_5){try{if(!_4){_4=window;_5=null;}else{_4=eval(_4);}if(!cr.browser.isLoadingDone()){webim.libs.loader._timer[_1]=window.setTimeout(function(){return webim.libs.loader.load(_1,_2,_3,_4,_5);},5);return 1;}if(webim.libs.loader._timer[_1]){window.clearTimeout(webim.libs.loader._timer[_1]);delete webim.libs.loader._timer[_1];}var _6=_4.document;var _7=_6.getElementById(_1);if(_7){}else{_7=_6.createElement("iframe");_7.setAttribute("id",_1);_7.setAttribute("name",_1);_7.style.display="none";if(_5&&_5.appendChild){_5.appendChild(_7);}else{_6.body.insertBefore(_7,_6.body.firstChild);}if(!_7){return -2;}}var _8="<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=gbk\"/></head><body>";if(_2 instanceof Array){for(var i=0;i<_2.length;i++){_8+="<script src=\""+_2[i]+"\" language=\"javascript\" charset=\"gbk\"></script>";}}else{if(typeof _2=="string"){_8+="<script language=\"javascript\" charset=\"gbk\" src=\""+_2+"\"></script>";}}_8+="</body></html>";var _a;try{_a=_7.contentWindow;if(!_a||!_a.document){return -3;}}catch(e){var _b="";webim.libs.loader._content[_1]=_8;_b="javascript:(function(){document.open();document.domain=\""+document.domain+"\";document.write(window.parent.webim.libs.loader._content[\""+_1+"\"]);document.close();})()";_7.setAttribute("src",_b);return 0;}try{var _c=_a.document;_c.open();_c.write(_8);if(typeof _3=="function"){if(cr.browser.isGecko){_a.onload=_3;}else{if(cr.browser.isOpera){_a.onload=function(){_3();return false;};}else{_c.body.onload=_3;}}}_c.close();}catch(e){return -5;}return 0;}catch(e){return -6;}},unload:function(_d,_e){try{if(!_e){_e=window;}else{_e=eval(_e);}if(webim.libs.loader._timer[_d]){window.clearTimeout(webim.libs.loader._timer[_d]);delete webim.libs.loader._timer[_d];}var _f=_e.document.getElementById(_d);if(!_f){return -1;}_e.document.body.removeChild(_f);eval("try{ delete "+_d+"; }catch(e){}");return 0;}catch(e){}return -2;}};webim.libs.passport={chinaren:["","@sohu","@vip","@17173","@focus","@sol","@game","@sms","@sogou","@inc"],passport:["@chinaren.com","@sohu.com","@vip.sohu.com","@17173.com","@focus.cn","@sol.sohu.com","@game.sohu.com","@sms.sohu.com","@sogou.com","@sohu-inc.com"],blog:["!c","","!vs","!17173","!f","!sol","!gs","!sms","!sg","!sohu-inc"],symbol:{chinaren:"@",passport:"@",blog:"!"},convert_userid:function(_1,_2,_3){for(var i=webim.libs.passport[_1].length-1;i>=0;i--){if(webim.libs.passport[_1][i]==""){if(_3.indexOf(webim.libs.passport.symbol[_1])<0){return _3+webim.libs.passport[_2][i];}}else{var _5=webim.libs.passport[_1][i];var _6=_3.indexOf(_5);if(_6>=0&&(_6+_5.length)==_3.length){return _3.replace(webim.libs.passport[_1][i],webim.libs.passport[_2][i]);}}}return _3;},getcurrentuser:function(_7){if(!_7){_7=webim.sys.gGlobal.get("system","dst_window");}var _8=_7.PassportSC.cookieHandle();return _8;},is_avaliable:function(_9){if(!_9){_9=webim.sys.gGlobal.get("system","dst_window");}return !!_9.PassportSC;}};webim.inc={};webim.inc.Msg=cr.Class({initialize:function(_1){this.type="chat";this.id=null;this.from=null;this.to=null;this.nick=null;this.category="sohu/im";this.timestamp=0;this.unread=false;this.body=null;this.key=null;},from_XML:function(_2){try{if(_2._find_attr("type")){this.type=_2._find_attr("type");}this.from=_2._find_attr("from");this.to=_2._find_attr("to");if(_2._find_attr("category")){this.category=_2._find_attr("category");}this.id=_2._find_attr("id");var _3=_2._find_child("timestamp");if(_3.length>0){this.timestamp=_3[0]._get_value();}if(_2._find_child("unread").length>0){this.unread=true;}_3=_2._find_child("nick");if(_3.length>0){this.nick=_3[0]._get_value();}else{this.nick=this.from;}_3=_2._find_child("body");if(_3.length>0){this.body=_3[0]._get_value();}_3=_2._find_child("key");if(_3.length>0){this.key=_3[0]._get_value();}}catch(e){cr.Warn(e);}}});webim.inc.Friend=cr.Class({initialize:function(){this.from=null;this.id=null;this.nick=null;this.gender=null;this.type=null;this.icon=null;this.gid=0;this.category="sohu/im";this.subscription="both";},from_Item:function(_1){try{this.from=_1._find_attr("jid");this.id=this.from;var _2=_1._find_child("nick");if(_2.length>0){this.nick=_2[0]._get_value();}if(!this.nick||this.nick==""){this.nick=this.from;}if(_1._find_attr("gender")){this.gender=_1._find_attr("gender");}if(_1._find_attr("type")){this.type=_1._find_attr("type");}if(_1._find_attr("icon")){this.icon=_1._find_attr("icon");}if(_1._find_attr("category")){this.category=_1._find_attr("category");}if(_1._find_attr("subscription")){this.subscription=_1._find_attr("subscription");}_2=_1._find_child("group");if(_2.length>0){this.gid=parseInt(_2[0]._get_value());}}catch(e){}},from_XML:function(_3){try{this.from=_3._find_attr("from");this.id=this.from;var _4=_3._find_child("nick");if(_4.length>0){this.nick=_4[0]._get_value();}if(!this.nick||this.nick==""){this.nick=this.from;}if(_3._find_attr("gender")){this.gender=_3._find_attr("gender");}if(_3._find_attr("type")){this.type=_3._find_attr("type");}if(_3._find_attr("icon")){this.icon=_3._find_attr("icon");}if(_3._find_attr("category")){this.category=_3._find_attr("category");}_4=_3._find_child("group");if(_4.length>0){this.gid=parseInt(_4[0]._get_value());}}catch(e){}}});webim.inc.UserInfo=cr.Class({initialize:function(){this._cache={id:null,crid:null,nick:null,icon:null,gender:null,name:null,verifyMethod:null,msgPrivacy:null,setting:{online_no_sound:false,newmsg_no_sound:false,online_no_risen:false,newmsg_no_risen:false},nick_ex:{}};},GetID:function(){return this._cache.id;},GetCRID:function(){return this._cache.crid;},SetID:function(_1){if(_1){this._cache.id=_1;this._cache.crid=webim.libs.passport.convert_userid("passport","chinaren",_1);}},GetName:function(){return this._cache.name;},SetName:function(_2){this._cache.name=_2;},GetGender:function(){return this._cache.gender;},SetGender:function(_3){this._cache.gender=_3;},GetIcon:function(){return this._cache.icon;},SetIcon:function(_4){if(typeof _4=="string"&&_4.length==4){this._cache.icon=_4;}},GetNick:function(_5){var _6=this._cache.nick;if(typeof _5=="string"&&_5!=""){switch(_5){case "chinaren/alumni":_6=this._cache.name;break;default:_6=this._cache.nick_ex[_5];break;}}if(typeof _6!="string"||_6==""){_6=this.GetID();}return _6;},SetNick:function(_7,_8){if(_7){if(typeof _8=="string"&&_8!=""){switch(_8){case "chinaren/alumni":this._cache.name=_7;break;default:this._cache.nick_ex[_8]=_7;}}else{this._cache.nick_ex["sohu/im"]=this._cache.nick=_7;}}},SetVerifyMethod:function(_9){this._cache.verifyMethod=_9;},GetVerifyMethod:function(){return this._cache.verifyMethod;},SetMsgPrivacy:function(_a){this._cache.msgPrivacy=_a;},GetMsgPrivacy:function(){return this._cache.msgPrivacy;},SetSetting:function(_b,_c){this._cache.setting[_b]=_c;},GetSetting:function(){return this._cache.setting;},from_XML:function(_d){var _e=_d._find_child("iq");for(var i=_e.length-1;i>=0;--i){var _iq=_e[i];if(_iq._find_attr("type")!="result"){continue;}var _11=_iq._find_child("profile");if(_11.length>=1){var _12=_11[0]._find_child("nick");for(var _13=_12.length-1;_13>=0;_13--){var _14=_12[_13]._get_value();var _15=_12[_13]._find_attr("category");this.SetNick(_14,_15);}var _16=_11[0]._find_child("name");if(_16.length>=1){this.SetName(_16[0]._get_value());}var _17=_11[0]._find_child("gender");if(_17.length>=1){this.SetGender(_17[0]._get_value());}var _18=_11[0]._find_child("icon");if(_18.length>=1){this.SetIcon(_18[0]._get_value());}var _19=_11[0]._find_child("verifymethod");if(_19.length>=1){this.SetVerifyMethod(_19[0]._get_value());}var _1a=_11[0]._find_child("setting");if(_1a.length>=1){if(_1a[0]._find_child("online_no_sound").length){this.SetSetting("online_no_sound",true);}if(_1a[0]._find_child("newmsg_no_sound").length){this.SetSetting("newmsg_no_sound",true);}if(_1a[0]._find_child("online_no_risen").length){this.SetSetting("online_no_risen",true);}if(_1a[0]._find_child("newmsg_no_risen").length){this.SetSetting("newmsg_no_risen",true);}}}var _1b=_iq._find_child("privacy");if(_1b.length>=1){var _1c=_1b[0]._find_child("active");if(_1c.length>=1){this.SetMsgPrivacy(_1c[0]._find_attr("name"));}}}},from_JSON:function(_1d){if(_1d){this._deepExtend(this._cache,_1d);}},clone:function(){var ui=new webim.inc.UserInfo();this._deepExtend(ui._cache,this._cache);return ui;},_deepExtend:function(_1f,_20){if(_1f===undefined||_1f===null){_1f=_20;return _1f;}for(var p in _20){if(_20.hasOwnProperty(p)){if(typeof _20[p]=="object"){arguments.callee(_1f[p],_20[p]);}_1f[p]=_20[p];}}return _1f;}});webim.inc.Group=cr.Class({initialize:function(_1){this.gid=null;this.name=null;},from_XML:function(_2){try{this.gid=_2._find_attr("gid");this.name=_2._find_attr("name");if(typeof this.name!="string"){this.name="";}}catch(e){}}});webim.sys={};webim.sys.Config=cr.Class();webim.sys.Config.prototype={initialize:function(_1){this._cache={};Object.crExtend(this._cache,_1);},get:function(_2,_3){try{return this._cache[_2][_3];}catch(e){}return false;},set:function(_4,_5,_6){try{if(!this._cache[_4]){this._cache[_4]={};}return this._cache[_4][_5]=_6;}catch(e){}return false;}};webim.sys.gConfig=new webim.sys.Config({system:{version:"V1.0",icon_url_on:"http://images.sohu.com/cs/sohuim/em/user_on_$1_$2.gif",icon_url_off:"http://images.sohu.com/cs/sohuim/em/user_off_$1.gif"},server:{baseurl:"http://me.sohu.com/",url:"http://messenger.sohu.com/imj?",url2:"http://messenger.sohu.com/imj2?",id:"messenger.sohu.com"},indicator:{delay:4*1000,stimer:18*1000,utimer_min:1*1000,utimer_max:8*1000,utime_rate:1.5,pause_time:10*60*1000},windows:{dblClickTime:500}});webim.sys.Global=cr.Class(webim.sys.Config);webim.sys.gGlobal=new webim.sys.Global();webim.sys.stat=function(_1,_2,_3,_4){_2=_2||"http://messenger.sohu.com/c/im/c/";_3=_3||".gif";_4=_4||(+new Date);var _5=_2+_1+_3+"?"+_4;var _6=webim.sys.stat.i;if(_6){_6.setAttribute("src",_5);}else{_6=webim.sys.stat.i=new Image();_6.setAttribute("src",_5);}};webim.sys.stat.i=null;webim.sys.gConfig._cache.candleman={refresh_time:5*60*1000,tipHideTime:24*60*60*1000,img_urls:["http://online.sohu.com/online?$CRUSER","http://online1.sohu.com/online?$CRUSER"],imgid_pre:"s_cm_img",classname:"",menuid:"s_cm_menu",menu:[{id:"CHAT",n:"发消息",t:"给此人发消息",c:function(){webim.gCandleArmy.chat.apply(this,arguments);},w:false,a:[]},{id:"SUBSCRIBE",n:"加为好友",t:"加此人为好友",c:function(){webim.gCandleArmy.subscribe.apply(this,arguments);},w:false,a:[]}],chat_menu:[{id:"SUBSCRIBE",n:"加为好友",t:"加此人为小纸条好友",c:function(){webim.gCandleArmy.subscribe.apply(this,arguments);},w:false,a:[]},{id:"BLOCK",n:"阻止此人",t:"阻止此人",c:function(){webim.gCandleArmy.block.apply(this,arguments);},w:false,a:[]}],gen_menu:false};webim.sys.gGlobal._cache.candleman={imgid:0,menu:null};webim.config=webim.config||{product:"sohu/im",categoryGroups:[],run_mode:"normal",debug:false,sync:false,preInit:function(){},loading_tip:"default",esc_key:true,css_enable:true,ex_css:null,main_css:null,auto_focus:true,cache_expires:30*60*1000,dst_window:window,dst_container:"_webim_elems_container_20070814",_dst_container:null,namespace:"_webim_ns",on_load:function(){},events:{on_load:null,on_loader_init:null,on_msg:null,on_deluser:null,on_login:null,on_init:null},position:10000,init_immed:true,cm_draw:true,load_panel:"auto",panel:{},cm_showtip:false,cm_container:"onlineIcon",cm_mood_flash:"crmood",cm_menu:[],cm_GenMenu:function(_1,_2){},_ns:false,_on_load:false,_on_init:false,_on_login:false,_isLoading:false,_padding_bot:0,_cm_draw:function(_3){webim.api.cm_draw(_3);try{cr.Info("webim.config._cm_draw已停用，请使用 webim.api.cm_draw");}catch(e){}},_init:function(){webim.api.init();try{cr.Info("webim.config._init已停用，请使用 webim.api.init");}catch(e){}},sound:{sounds:{newmsg:"DoActionLabel_tishi",buddy_online:"DoActionLabel_shangxian"},swfFile:webim.imageBase+"/images/sound.swf"},title:["【新纸条】","【　　　】"],_tip:{title:"移到蜡烛人上",content:"给此人发消息"},_loadingtip:{content:"正在打开小纸条，请稍候..."},_bugreport:{init:{title:"小纸条异常",content:"您的小纸条出现了异常请将问题提交技术人员",btn1:"发送错误报告",btn2:"忽略"},send:{title:"发送错误报告",content1:"补充说明(可不填):",content2:"您的系统信息:",btn1:"确认发送",btn2:"取消",contact:"请留下您的联系方式(小纸条ID,mail,QQ等)<br/>便于技术人员及时与您沟通反馈(可不填):"}}};webim.loader=webim.loader||function(){webim.config._on_load=function(){try{webim.config._ns=eval(webim.config.namespace);webim.config._ns.webim.sys.gGlobal.set("system","dst_window",webim.config.dst_window);webim.config._ns.webim.sys.gConfig.set("mood_flash","name",webim.config.cm_mood_flash);if(webim.config.init_immed){webim.api.init();}try{webim.config.on_load();}catch(e){}try{webim.config.events.on_load();}catch(e){}webim.config._dst_container.style.display="none";webim.config._dst_container.style.display="";}catch(e){}};webim.config._on_login=cr.func.Bind(function(){webim.LoadCurrentUser();},window);webim.config._on_init=cr.func.Bind(function(){webim.loadOnDemand.sendpending();webim.LoadingTip.hide();},window);webim._loadMainApp=function(){webim.config._isLoading=true;cr.Log("try  load main app");if(!cr.browser.isLoadingDone()){window.setTimeout(webim._loadMainApp,5);return;}cr.Log("do load main app");if(webim.config.main_css){setTimeout(function(){var _1=document.createElement("link");_1.setAttribute("name","webimMainCss");_1.setAttribute("type","text/css");_1.setAttribute("rel","stylesheet");_1.setAttribute("href",webim.config.main_css);document.getElementsByTagName("head").item(0).appendChild(_1);},0);}webim.libs.loader.load(webim.config.namespace,[webim.imageBase+"/js/webim."+webim.majorVersion+".js"],null,webim.config.dst_window,webim.config._dst_container);};};var webim_config=webim_config||{};webim.loader.Config=webim.loader.Config||function(){cr.Extend(webim.config,webim_config);webim_config=webim.config;if(webim.config.debug==true){cr.logLevel=0;}};webim.api={cm_draw:function(_1){if(!cr.browser||!cr.browser.isLoadingDone()||!webim.gCandleArmy){window.setTimeout(function(){webim.api.cm_draw(_1);},5);return;}try{var _2=webim.cm_drawer;_2.init();_2.draw();if(!_1){cr.evt.Send("WEBIM","CANDLEMAN",{action:"RENDER_ALL",container:webim.config.cm_container,product:webim.config.product});}}catch(e){cr.Warn(e);}},init:function(){try{webim.config.init_immed=true;cr.Require.Uid(function(){var _e=new webim.config._ns.webim.inc.Evt("CMD_INIT","MCMD_START",webim.config);webim.config._ns.webim.mgr.gEvtCenter.send_event(_e);});}catch(e){try{cr.Warn(e);}catch(e){}}},show_login:function(_4){try{cr.evt.Send("WEBIM","CMD_LOGIN",{mcmd:"MCMD_SHOW",msg:_4});}catch(e){cr.Warn(e);}},close_login:function(){try{cr.evt.Send("WEBIM","CMD_LOGIN",{mcmd:"MCMD_CLOSE"});}catch(e){cr.Warn(e);}},show_buddyWin:function(_x,_y){try{cr.evt.Send("WEBIM","CMD_USER",{mcmd:"MCMD_SHOW_BUDDYWIN",position:{x:_x,y:_y}});}catch(e){cr.Warn(e);}},close_buddyWin:function(){try{cr.evt.Send("WEBIM","CMD_USER",{mcmd:"MCMD_CLOSE_BUDDYWIN"});}catch(e){cr.Warn(e);}},get_roster:function(_7){try{var _8=function(_9,_a,_b){_7(_b);};if(cr.uid){webim.cache.gCache.getBuddyList(true,_8);}else{cr.evt.RegisterOnce("webim.profile","ready",function(){webim.cache.gCache.getBuddyList(true,_8);});}}catch(e){cr.Warn(e);}},show_setWin:function(_c,_d){try{cr.evt.Send("WEBIM","CMD_USER",{mcmd:"MCMD_SHOW_SETPROFILE_WIN",position:{left:_c,top:_d}});}catch(e){cr.Warn(e);}},get_profile:function(_e){try{var _f=function(cmd,_11,_12){_e(_12._cache);};cr.Require.Uid(function(){if(cr.uid){webim.cache.gCache.getProfile(true,_f);}});}catch(e){cr.Warn(e);}},set_profile:function(_13,_14){try{var fun=function(cmd,_17,_18){var _19=true;if("true"!=_18.result){_19=false;}_14(_19);};webim.cache.gCache.setProfile(_13,fun);}catch(e){cr.Warn(e);}},get_presence:function(_1a,_1b){try{var fun=function(cmd,_1e,_1f){var _20=_1f.friends;var _21=[];for(var i=_1a.length-1;i>=0;i--){var _23={};var _id=_1a[i];_23.uid=_id;_23.presence="offline";_23.icon="0000";for(var j=_20.length-1;j>=0;j--){if(_id==_20[j].id){var _26="offline";if("available"==_20[j].type){switch(_20[j].icon){case "0998":_26="busy";break;case "0997":_26="away";break;default:_26="online";}}_23.uid=_id;_23.presence=_26;_23.icon=_20[j].icon;break;}}_21.push(_23);}_1b(_21);};if(cr.uid){webim.cache.gCache.getBuddyList(true,fun);}else{cr.evt.RegisterOnce("webim.profile","ready",function(){webim.cache.gCache.getBuddyList(true,fun);});}}catch(e){cr.Warn(e);}},get_my_presence:function(_27){try{var fun=function(cmd,_2a,_2b){var _2c="";switch(_2b._cache.icon){case "0998":_2c="busy";break;case "0997":_2c="away";break;case "0999":_2c="invisible";break;default:_2c="online";break;}var _2d={presence:_2c,icon:_2b._cache.icon};_27(_2d);};if(cr.uid){webim.cache.gCache.getProfile(true,fun);}else{cr.evt.RegisterOnce("webim.profile","ready",function(){webim.cache.gCache.getProfile(true,fun);});}}catch(e){cr.Warn(e);}},set_my_presence:function(_2e,_2f,_30){try{switch(_2e){case "busy":_2f="0998";break;case "away":_2f="0997";break;case "invisible":_2f="0999";break;case "online":default:if(!_2f){_2f="0000";}}webim.api.set_profile({icon:_2f},_30);}catch(e){cr.Warn(e);}},chat:function(_id,_32,_33,_34,_35,_36,_37){try{_id=webim.libs.passport.convert_userid("chinaren","passport",_id);var _38={mcmd:"MCMD_CHAT_REQUEST",data:{userid:_id,nick:_32,category:_33,historytimestamp:_34,winposition:{left:_35,top:_36},profileUrl:_37}};cr.evt.Send("WEBIM","CMD_USER",_38);}catch(e){cr.Warn(e);}},chat_msg:function(_39){try{for(var i=_39.length-1,j=0;i>=0;i--,j++){cr.evt.Send("WEBIM","CMD_USER",{mcmd:"MCMD_CHAT",data:_39[j]});}}catch(e){cr.Warn(e);}},close_imWin:function(_3b){try{var _3c={mcmd:"MCMD_CLOSE_IMWIN",data:_3b};cr.evt.Send("WEBIM","CMD_USER",_3c);}catch(e){cr.Warn(e);}},mini_imWin:function(_3d){try{var _3e={mcmd:"MCMD_MINIMIZE_IMWIN",data:_3d};cr.evt.Send("WEBIM","CMD_USER",_3e);}catch(e){cr.Warn(e);}},sendmsg:function(_id,_40,_41,_42,_43,_44){_id=webim.libs.passport.convert_userid("chinaren","passport",_id);var _45={mcmd:"MCMD_SEND_MSG",userid:_id,nick:_40,category:_41,message:_42,left:_43,top:_44};cr.evt.Send("WEBIM","CMD_USER",_45);},adduser:function(_id,_47,_48){_id=webim.libs.passport.convert_userid("chinaren","passport",_id);var _49={mcmd:"MCMD_ADD_BUDDY",userid:_id,nick:_47,category:_48};cr.evt.Send("WEBIM","CMD_USER",_49);},blockuser:function(_id,_4b){try{_id=webim.libs.passport.convert_userid("chinaren","passport",_id);var _4c={mcmd:"MCMD_ADD_BLOCK",userid:_id,nick:_4b};cr.evt.Send("WEBIM","CMD_USER",_4c);}catch(e){cr.Warn(e);}},deluser:function(_id,_4e){try{var _4f=new webim.inc.Friend();_4f.from=_4f.id=_id;_4f.nick=_4e;_4f.mcmd="MCMD_DEL_USER";cr.evt.Send("WEBIM","CMD_USER",_4f);}catch(e){cr.Warn(e);}}};sohuim={webmsg:{SendMsg:function(_50,_51,_52,_53,_54,_55){cr.Info("sohuim.webmsg.SendMsg已停用，请使用 webim.api.sendmsg");webim.api.sendmsg(_50,_51,_52,_53);},AddUser:function(_56,_57,_58,_59,_5a){cr.Info("sohuim.webmsg.AddUser已停用，请使用 webim.api.adduser");webim.api.adduser(_56,_57,_58);},BlockUser:function(_5b,_5c,_5d){cr.Info("sohuim.webmsg.BlockUser已停用，请使用 webim.api.blockuser");webim.api.blockuser(_5b,_5b);}},candleArmy:{RenderAll:function(){cr.Info("candleArmy.RenderAll已停用，请使用 webim.api.cm_draw");webim.api.cm_draw();}}};webim.sound=webim.sound||new (cr.Class({onMsg:-1,onOnline:-1,timeStamp:0,initialize:function(){},Init:function(){if(this.onMsg>=0){cr.evt.Unregister("webim.response","message",this.onMsg);this.onMsg=-1;}if(this.onOnline>=0){cr.evt.Unregister("webim.response","presence",this.onOnline);this.onOnline=-1;}if(!webim.profile.GetSetting().newmsg_no_sound){this.onMsg=cr.evt.Register("webim.response","message",cr.func.Bind(this.OnMsg,this));this.onOnline=cr.evt.Register("webim.response","presence",cr.func.Bind(this.OnOnline,this));}},OnMsg:function(_1,_2,_3){var _4=false;var _5=this;cr.Array.ForEach(_3,function(_6){var _7=_6.type;if(!_7||_7=="chat"){var _8=_6.timestamp;if(_8>_5.timeStamp){_5.timeStamp=_8;_4=true;}}});if(_4){cr.evt.Send("webim.sound","play","newmsg");}},OnOnline:function(_9,_a,_b){var _c=false;cr.Array.ForEach(_b,function(_d){var _e=new webim.inc.Friend();_e.from_XML(_d);if(_e.from&&_e.type=="available"){_c=true;}});if(_c){cr.evt.Send("webim.sound","play","buddy_online");}}}));webim.SoundManager=cr.Class({initialize:function(_1){this._isDisable=false;this._swfID="";this._swfPath="";this._sounds={};this._win=_1?_1:window;this._doc=this._win.document;this._swfElm={};this._init();},_init:function(){this._swfID="soundSWF";this._swfFile=webim.config.sound.swfFile;this._sounds=webim.config.sound.sounds;this._installSWF();cr.evt.Register("WEBIM.SOUND","PLAY",cr.func.Bind(this.onplay,this));},_installSWF:function(){var _2=this._doc.createElement("div");var _3=webim.config._dst_container;if(!_3){_3=this._doc.body;}_3.appendChild(_2);var _4="<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" id=\""+this._swfID+"\" width=\"1\" height=\"1\" align=\"middle\">\t\t\t<param name=\"allowScriptAccess\" value=\"sameDomain\" />\t\t\t<param name=\"movie\" value=\""+this._swfFile+"\" />\t\t\t<param name=\"quality\" value=\"high\" />\t\t\t<param name=\"wmode\" value=\"transparent\" />\t\t\t<param name=\"bgcolor\" value=\"#A4B6C8\" />\t\t\t<embed src=\""+this._swfFile+"\" quality=\"high\" bgcolor=\"#A4B6C8\" width=\"1\" height=\"1\" swLiveConnect=true id=\""+this._swfID+"\" name=\""+this._swfID+"\" align=\"middle\" allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" />\t\t\t</object>";_2.innerHTML=_4;if(cr.browser.isIE){this._swfElm=this._win[this._swfID];}else{this._swfElm=this._doc[this._swfID];}},isDisabled:function(){return this._isDisable;},setDisabled:function(_5){this._isDisable=_5;},onplay:function(_6,_7,_8){if(this._isDisable){return;}var _9=this._sounds[_8];if(_9&&_9!="undefined"){if(!this._swfElm||this._swfElm=="undefined"){this._init();}if(this._swfElm){try{this._swfElm.TCallLabel("_root.DoActionClip",_9);}catch(e){this.setDisabled(true);}}}}});webim.localstorage=webim.localstorage||{SetSwfReady:function(){try{webim.localstorage.SwfReady=true;}catch(e){}},isJsReady:function(){return true;},SwfReady:false};webim.localstorage.StorageManager=cr.Class({initialize:function(){this._swfID="";this._swfPath="";this._win={};this._doc={};this._swfElm={};this._init();},_getSwfReady:function(){return webim.localstorage.SwfReady;},_init:function(){this._win=webim.config.dst_window||window;this._doc=this._win.document;this._swfID="LocalStorageSWF";this._swfFile="http://messenger.sohu.com/swf/s.swf";this._installSWF();},_installSWF:function(){var _1=this._doc.createElement("div");var _2=webim.config._dst_container;if(!_2){_2=this._doc.body;}_2.appendChild(_1);var _3=new cr.Flash(this._swfFile,this._swfID,1,1,"9");_3.addParam("allowScriptAccess","always");_3.addParam("FlashVars","callBack=webim.localstorage.SetSwfReady()&jsReady=webim.localstorage.isJsReady()");_3.write(_1);if(cr.browser.isIE){this._swfElm=this._win[this._swfID];}else{this._swfElm=this._doc[this._swfID];}},setLocalStorage:function(_4,_5){if(!this._swfElm||this._swfElm=="undefined"){this._init();}if(this._swfElm&&this._getSwfReady()){try{var _6=encodeURIComponent(_5);return this._swfElm.setLocalStorage(_4,_6);}catch(e){}}return false;},getLocalStorage:function(_7){if(!this._swfElm||this._swfElm=="undefined"){this._init();}if(this._swfElm&&this._getSwfReady()){try{return decodeURIComponent(this._swfElm.getLocalStorage(_7));}catch(e){}}return false;},clearCache:function(_8){if(!this._swfElm||this._swfElm=="undefined"){this._init();}if(this._swfElm&&this._getSwfReady()){try{return this._swfElm.clearCache(_8);}catch(e){}}},initUser:function(_9){if(!this._swfElm||this._swfElm=="undefined"){this._init();}if(this._swfElm&&this._getSwfReady()){try{return this._swfElm.initUser(_9);}catch(e){}}},GetTimestamp:function(_a){if(!this._swfElm||this._swfElm=="undefined"){this._init();}if(this._swfElm&&this._getSwfReady()){try{return parseInt(this._swfElm.getTimeStamp(_a));}catch(e){return 0;}}},SetTimestamp:function(_b,_c){if(!this._swfElm||this._swfElm=="undefined"){this._init();}if(this._swfElm&&this._getSwfReady()){try{_c+="";return this._swfElm.setTimeStamp(_b,_c);}catch(e){return false;}}}});webim.FlashTitle=webim.FlashTitle||cr.Class({initialize:function(_1,_2){this._arrayText=_1?_1:[];this._time=_2?_2:1000;this._origWinTitle="";this._index=0;this._flashFlag=false;this._interval=setInterval(cr.func.Bind(this._setTitle,this),this._time);cr.evt.Register("webim.flashtitle","start",cr.func.Bind(this.start,this));cr.evt.Register("webim.flashtitle","stop",cr.func.Bind(this.stop,this));},setFlashText:function(_3){try{this._arrayText=_3;}catch(e){}},_setTitle:function(){try{if(this._flashFlag){this._index=(this._index+1)%(this._arrayText.length);top.window.document.title=this._arrayText[this._index]+this._origWinTitle;}}catch(e){}},start:function(){try{if(!this._flashFlag){this._origWinTitle=top.window.document.title;this._index=-1;this._flashFlag=true;}}catch(e){}},stop:function(){try{if(this._flashFlag){this._flashFlag=false;top.window.document.title=this._origWinTitle;}}catch(e){}}});webim.title=webim.title||new (cr.Class({initialize:function(){},Init:function(){this.dstWin=webim.config.dst_window;this.titleText=webim.config.title;this.focus=false;this.flashTitle=new webim.FlashTitle(this.titleText,1000);cr.evt.Register("WEBIM","CMD_SYS",cr.func.Bind(this.Stop,this));this.onMsg=cr.evt.Register("webim.response","message",cr.func.Bind(this.OnMsg,this));cr.event.observe(this.dstWin,"focus",cr.func.Bind(this.setFocus,this));cr.event.observe(this.dstWin.document,"keypress",cr.func.Bind(this.setFocus,this));cr.event.observe(this.dstWin.document,"mousedown",cr.func.Bind(this.setFocus,this));cr.event.observe(this.dstWin,"blur",cr.func.Bind(this.setUnfocus,this));},setFocus:function(){this.focus=true;this.flashTitle.stop();},setUnfocus:function(){this.focus=false;},OnMsg:function(_1,_2,_3){var _4=false;cr.Array.ForEach(_3,function(_5){var _6=_5.type;if(!_6||_6=="chat"){_4=true;}});if(!this.focus&&_4){cr.evt.Send("webim.flashtitle","start","");}else{cr.evt.Send("webim.flashtitle","stop","");}},Stop:function(_7,_8,_9){if(_9.mcmd=="MCMD_NONEWMSG"){this.flashTitle.stop();}}}));webim.CandleArmy=cr.Class({initialize:function(){this._renew_timer=0;cr.evt.Register("WEBIM","CANDLEMAN",cr.func.Bind(this.onevt,this));},onevt:function(_1,_2,_3){try{this[_3.action](_3);}catch(e){}},set_callback:function(_4){if(typeof _4.id=="undefined"){_4.id=_4.n;}var _5=webim.sys.gConfig.get("candleman","menu");for(var i=_5.length-1;i>=0;i--){if(_5[i].id==_4.id){Object.crExtend(_5[i],_4);return;}}var _7=Object.crExtend({id:null,n:false,t:false,c:false,a:false,w:false},_4);_5.push(_7);},RENDER_ALL:function(_8){cr.Info("render all menu");var _9=Object.crExtend({container:"onlineIcon",product:"sohu/im"},_8);_dstwin=webim.config.dst_window;var _a=_dstwin.document.getElementsByName(_9.container);for(var i=_a.length-1;i>=0;i--){try{var _c=_a[i].getAttribute("rel");if(typeof _c!="string"||_c==""){_c=_a[i].innerHTML;}var _d=_c.replace("&","&amp,");_d=_d.replace("\\;","&semi,");var _e=_d.split(";");for(var j=_e.length-1;j>=0;j--){_e[j]=single_decode(_e[j]);}var _10=_e.shift();var _11=_e.shift();var _12=_e.shift();if(!_12||_12==""){_12=_9.product;}var c=new webim.CandleMan({_id:_10,_nick:_11,_category:_12,_args:_e});c.write({container:_a[i]});_a[i].style.display="";}catch(e){cr.Error("render cm",e);}}function single_decode(str){var _15=str.replace("&semi,",";");_15=_15.replace("&amp,","&");return _15;}},send_msg:function(_16,_17,_18){try{cr.evt.Send("WEBIM","CMD_USER",{mcmd:"MCMD_SEND_MSG",data:{userid:_16._id,nick:_16._nick,category:_16._category}});}catch(e){}return false;},chat:function(_19,_1a,_1b){try{cr.evt.Send("WEBIM","CMD_USER",{mcmd:"MCMD_CHAT_REQUEST",data:{userid:_19._id,nick:_19._nick,category:_19._category}});}catch(e){}return false;},subscribe:function(_1c,_1d,_1e){try{cr.evt.Send("WEBIM","CMD_USER",{mcmd:"MCMD_ADD_BUDDY",data:{userid:_1c._id,nick:_1c._nick,category:_1c._category}});}catch(e){}return false;},block:function(_1f,_20,_21){try{cr.evt.Send("WEBIM","CMD_USER",{mcmd:"MCMD_ADD_BLOCK",data:{userid:_1f._id,nick:_1f._nick}});}catch(e){}return false;}});webim.CandleMan=cr.Class({_id:"",_crid:"",_nick:"",_category:"",_imgElement:false,_imgid:false,_args:false,initialize:function(_1){this.m_icon=null;this.m_gender=null;this.m_isonline=null;Object.crExtend(this,_1);if(this._id.indexOf(".com")<0){this._id=webim.libs.passport.convert_userid("chinaren","passport",this._id);}this._crid=webim.libs.passport.convert_userid("passport","chinaren",this._id);if(typeof this._cbs=="undefined"){this._cbs=webim.sys.gConfig.get("candleman","menu").concat();}},setOptions:function(_2){var _3=Object.crExtend({icon:null,gender:null,isonline:null},_2);this.m_icon=_3.icon;this.m_gender=_3.gender;this.m_isonline=_3.isonline;},replace_var:function(_4,_5,_6){if(typeof _4!="string"){return "";}var _7;_7=_4.replace("$$","$DOLLAR");_7=_7.replace("$MYID","");_7=_7.replace("$PPUSER",this._id);_7=_7.replace("$IMGID",this._imgid);_7=_7.replace("$USER",this._id);_7=_7.replace("$CRUSER",this._crid);_7=_7.replace("$NICK",this._nick);_7=_7.replace("$CATEGORY",this._category);if(_5){_7=_7.replace("$NAME",_5.n);}if(_6){for(var j=_6.length;j>0;j--){_7=_7.replace("$"+j,_6[j-1]);}}_7=_7.replace("$DOLLAR","$");return _7;},get_img_url:function(){if(typeof this.m_gender!="string"||this.m_gender==""||typeof this.m_isonline!="string"||this.m_isonline==""){return webim.utils.getOnlineUrl(this._crid);}return webim.utils.getIconUrl(this.m_gender,this.m_icon,this.m_isonline);},write:function(_9){var _a=Object.crExtend({imgid:false,container:false},_9);var _b=webim.config.dst_window;var _c=this;var _d=_a.container;_d.onmouseover=function(_e){_c.OnOver.apply(this,[_c,_e]);};_d.onmouseout=function(_f){_c.OnOut.apply(this,[_c]);};setTimeout(cr.func.Bind(SetCallback,this,_d),500);function SetCallback(_10){var _11=_10.getElementsByTagName("img");if(_11.length){this._imgElement=_11[0];this._imgid=_11[0].getAttribute("id");}else{setTimeout(cr.func.Bind(SetCallback,this,_10),500);}}},write_single:function(_12){var _13=Object.crExtend({imgid:false,container:false},_12);var _14=webim.config.dst_window;if(typeof _13.imgid!="string"){var _15=webim.sys.gGlobal.get("candleman","imgid");_13.imgid=webim.sys.gConfig.get("candleman","imgid_pre")+_15++;webim.sys.gGlobal.set("candleman","imgid",_15);}var _16="<img id=\""+_13.imgid+"\" height=\"12px\" src=\""+this.get_img_url()+"\" border=0 class=\""+webim.gConfig.get("candleman","classname")+"\"/>";_13.container.innerHTML=_16;this.write(_12);},gen_menu:function(_17){_17.clear();var _18=webim.sys.gConfig.get("candleman","gen_menu");if(typeof _18=="function"){_18(this,this._cbs);}var _19=this._cbs.length;for(var i=0;i<_19;i++){var _1b=this._cbs[i];var _1c=function(_1d,_1e,_1f,_20){if(typeof _1d.c=="string"){window.open(this.replace_var(_1d.c,_1d,_1e));}else{if(typeof _1d.c=="function"){try{_1d.c(this,_1e,_20);}catch(e){cr.Warn(e);}}}return false;};var _21=new cr.ctrl.Action({m_text:_1b.n,m_tip:this.replace_var(_1b.t,_1b,this._args)},{checked:cr.func.Bind(_1c,this,_1b,this._args)});_17.insert(_21);}},OnOver:function(_22,_23){var _24=webim.sys.gGlobal.get("candleman","menuWin");if(!_24){try{var _24=new cr.ctrl.Menu(webim.config.dst_window);_24.appendTo(webim.config._dst_container);_24.getCss().addClassName("window");_24.getCss().addClassName("menuWin");webim.sys.gGlobal.set("candleman","menuWin",_24);}catch(e){cr.Warn(e);return false;}}_22.gen_menu(_24);if(!_23){_23=window.event;}var _25=new cr.Position(cr.event.pointerX(_23)+4,cr.event.pointerY(_23));_24.popup(_25);},OnOut:function(_26,_27){try{webim.sys.gGlobal.get("candleman","menuWin").hideMenu();}catch(e){cr.Warn(e);}}});webim.cm_drawer={prepare:function(){try{var _1=webim.config.dst_window.document;var _2=_1.getElementsByName(webim.config.cm_container);var _3=_2.length;for(var i=0;i<_3;i++){if(_2[i].getElementsByTagName("img").length){continue;}_2[i].innerHTML="<img src='http://images.sohu.com/cs/sohuim/em/user_off_0.gif' height='12px' border=0 />";_2[i].style.display="";}}catch(e){}for(var i=0;i<webim.config.cm_menu.length;i++){var _5=webim.config.cm_menu[i];webim.gCandleArmy.set_callback(_5);}webim.sys.gConfig.set("candleman","gen_menu",webim.config.cm_GenMenu);},init:function(){var _6=webim.config.cm_container;var _7=webim.config.dst_window.document;this.m_cms=cr.Array(_7.getElementsByName(_6));this.m_st={};this._ldr=new cr.net.JsLoader(webim.config._dst_container);this._ldr.Init();},draw:function(){this.m_td=[];var _8={};var _9="";for(var i=0;i<this.m_max&&this.m_cms.length>0;){var cm=this.m_cms.shift();var _c=this._gp(cm);if(!_c||!_c.length){continue;}var _d=_c[0];_d=webim.libs.passport.convert_userid("chinaren","passport",_d);cm.setAttribute("_webim_ppid",_d);this._gs(_d,cm);if(this.m_st[_d]){this._ds(_d,cm);continue;}this.m_td.push(cm);if(!_8[_d]){_9=_9+","+_d;i++;}_8[_d]=true;}if(_9.length>1){_9=_9.substr(1);}else{if(!this.tips&&webim.config.cm_showtip){this.tips=new webim.Tip(webim.config._tip.title,webim.config._tip.content);this.tips.remenderTip();}cr.Info("drawing candleman done");return;}this._ldr.Get(this.m_url+_9);},_dp:function(_e){var _f=_e.replace("&semi,",";");_f=_f.replace("&amp,","&");return _f;},_gp:function(cm){if(!cm){return;}var _11=cm.getAttribute("rel");if(typeof _11!="string"||_11==""){_11=cm.innerHTML;if(typeof _11!="string"||_11==""){return;}}var _12=_11.replace("&","&amp,");_12=_12.replace("\\;","&semi,");var _13=_12.split(";");for(var j=_13.length-1;j>=0;j--){_13[j]=this._dp(_13[j]);}return _13;},_gs:function(_15,_16){var _17=_16.getAttribute("cm_icon");var _18=_16.getAttribute("cm_gender");var _19=_16.getAttribute("cm_online");if(typeof _18!="string"||_18==""||typeof _19!="string"||_19==""){return false;}var _1a="0";if(typeof _18!="string"){_1a="0";}else{if(_18.length==1){_1a=_18;}else{_1a=_18.toLowerCase()=="female"?"2":"1";}}if(typeof _19=="string"&&(_19.toLowerCase()=="available"||_19.toLowerCase()=="true")){this.m_st[_15]="on_"+_1a+"_"+_17;}else{this.m_st[_15]="off_"+_1a;}return true;},_ds:function(_1b,_1c){var _1d=this.m_st[_1b];var _1e=this.m_idp+this.m_idn++;var url=this.m_ou;var _20=_1d;if(typeof _1d!="string"||_1d==""){url=this.m_su;_20=webim.libs.passport.convert_userid("passport","chinaren",_1b);}var _21=_1c.getElementsByTagName("img");var _22;if(_21.length>0){_22=_21[0];}else{var _23=webim.config.dst_window.document;_22=_23.createElement("img");}_22.setAttribute("id",_1e);_22.setAttribute("src",url.replace("%1",_20));if(!_22.style){_22.style={};}_22.style.height="12px";_22.style.border="0px";if(_21.length<=0){_1c.appendChild(_22);}},_dd:function(_24){try{for(var _25 in _24){if(typeof _24[_25]=="string"){this.m_st[_25]=_24[_25];}}while(this.m_td.length>0){var cm=this.m_td.shift();var _27=cm.getAttribute("_webim_ppid");this._ds(_27,cm);}this._ldr.Close();}catch(e){}this.draw();},handleData:function(_28,_29){if(_28.toLowerCase()=="ok"){this._dd(_29);}},m_max:20,m_url:"http://online.sohu.com/onlinejs2?",m_su:"http://online1.sohu.com/online?%1",m_ou:"http://images.sohu.com/cs/sohuim/em/user_%1.gif",m_idp:"s_cm_img",m_idn:0,m_cms:null,m_st:{},m_td:[],_ldr:null,tips:null};webim.Tip=cr.Class({initialize:function(_1,_2){this._doc=webim.config.dst_window.document;this._candlemanTips=[];this._title=_1;this._content=_2;this._cssFixed="display:inline;float:none;margin:0;padding:0;font-size:12px;font-weight:bold;line-height:1.6;";},clearCandleManTip:function(){var _3=this._candlemanTips;for(var i=_3.length-1;i>=0;i--){new cr.effect.Fade(_3[i],3,"","",1,0);}},delayClearCandleTip:function(){if(this.m_clearCandleTipTimeout){clearTimeout(this.m_clearCandleTipTimeout);}this.m_clearCandleTipTimeout=setTimeout(cr.func.Bind(this.clearCandleManTip,this),10000);},get_candlemanTip:function(){try{var _5="";var _6=webim.imageBase+"/css/images/tip_1_1/";var _7=new cr.ctrl.Container();_7.getDom().setAttribute("name","candlemanTip");_7.getCss().addClassName("meCandlemanTip");_7.getCss().setStyle({position:"absolute",opacity:0});_7.setInnerHTML("<div class=\"tipText\" style=\"position:absolute;top:8px;left:16px;\">"+"<span style=\""+this._cssFixed+"color:#32b08b;\">"+this._title+"</span><br/>"+"<span style=\""+this._cssFixed+"color:#32b08b;\">"+this._content+"</span>"+"</div>"+"<div class=\"bgDiv clearfix\">"+"<div name=\"bg01\" class=\"bg01\"></div>"+"<div name=\"bg02\" class=\"bg02\"></div>"+"<div name=\"bg03\" class=\"bg03\"></div>"+"<div name=\"bg04\" class=\"bg04\"></div>"+"</div>");var _8=_7.getDom();var _9=cr.utils.SubElem(_8,"bg02","div");var _a=this;_9.onclick=function(){_a.clearCandleManTip();var _b=new Date();var _c=webim.sys.gConfig.get("candleman","tipHideTime");_b.setTime(_b.getTime()+_c);var _d=null;try{_d=top.location.hostname;}catch(e){_d=location.hostname;}cr.cookie.Set("meNoCandleTip","true",_b,false,cr.utils.GetRootDomain(_d));return false;};if(cr.browser.isGecko){var _e=cr.utils.SubElem(_8,"tiplink","a");if(_e){_e.onclick=function(){window.open(_5);};}}if(cr.browser.isIE){var _f=cr.utils.SubElem(_8,"bg01","div");_f.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, src=\""+_6+"bg01.png\");";var _9=cr.utils.SubElem(_8,"bg02","div");_9.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, src=\""+_6+"bg02.png\");";var _10=cr.utils.SubElem(_8,"bg03","div");_10.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, src=\""+_6+"bg03.png\");";var _11=cr.utils.SubElem(_8,"bg04","div");_11.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, src=\""+_6+"bg04.png\");";}this._candlemanTips.push(_8);_8.onmouseover=function(_12){_12=_12?_12:window.event;cr.event.stop(_12);};_8.onmouseout=function(_13){_13=_13?_13:window.event;cr.event.stop(_13);};return _8;}catch(e){cr.Error(" webim.Tip.get_candlemanTip:",e);}},remenderTip:function(){var _14=webim.config.dst_window.document.getElementsByName(webim.config.cm_container);if(cr.cookie.Get("meNoCandleTip")!="true"){var _15=_14.length;var _16=new Array();var _17=Math.floor(Math.random()*2);if(_15>2){if(_17==0){_16.push(Math.floor(Math.random()*2));}else{var tmp=2+Math.floor(Math.random()*(_15-2));tmp=tmp>3?3:tmp;_16.push(2+Math.floor(Math.random()*tmp));}}else{_16.push(Math.floor(Math.random()*_15));}if(_15>=10){_16.push(Math.floor(Math.random()*(_15-9))+9);}for(var i=0;i<_16.length;i++){var _1a=this.get_candlemanTip();var _1b=_14[_16[i]];_1b.className="meCandleman";_1b.style.textDecoration="none";_1b.appendChild(_1a);var _1c=new cr.effect.Fade(_1a,1,"","",0,1);}this.delayClearCandleTip();}}});webim.comm=webim.comm||{Init:function(){webim.comm.method.current=webim.comm.method.current||new webim.comm.method.Script();webim.comm.gIndicator=webim.comm.gIndicator||new webim.comm.Indicator();},handleData:function(){var _1=webim.comm.method.current;_1.HandleData.apply(_1,cr.Array(arguments));},Send:function(_2,_3){return webim.comm.method.current.Send(_2,_3);},CreatePacket:function(_4,_5){var _6=webim.libs.dom.create();if(_5){_6._set_child(_4,_5);}_6._set_attr("from",cr.uid);_6._set_attr("to","messenger.sohu.com");_6._set_attr("sn",(new Date).getTime());_6._set_attr("version","1.0");return _6;},CreateIqPacket:function(_7,_8,_9){var _a=webim.libs.dom.create();_a._set_attr("type",_7);if(_9){_a._set_child(_8,_9);}return this._create_packet("iq",_a);},ProceedPacketError:function(_b){try{if(_b._find_attr("type")!="error"){return;}var _c=_b._find_child("error");if(_c.length<=0){return;}var _d=_c[0];if(_d._find_attr("type")=="auth"){cr.evt.Send("WEBIM","CMD_ERROR",{mcmd:"MCMD_AUTH",data:webim.sys.gConfig.get("locale",2001)});}else{cr.evt.Send("WEBIM","CMD_ERROR",{mcmd:"MCMD_SERVER_RESPONSE",data:_d});}}catch(e){}}};webim.comm.method=webim.comm.method||{};webim.comm.method.Base=cr.Class({initialize:function(){this._js=webim.sys.gConfig.get("server","url");this._sn=0;this._cache={};this._Clear=cr.func.Bind(this.Clear,this);this._cTimer=window.setTimeout(this._Clear,5000);},Load:function(sn,_2){},Unload:function(sn){},_Unload:function(sn){try{this.Unload(sn);}catch(e){}delete this._cache[sn];},Send:function(_5,_6){var sn=++this._sn;_5._set_attr("sn",sn);cr.Log("C==>S",_5);this._cache[sn]={done:_6,tm:(new Date()).getTime()};var _8=this.Load(sn,_5);if(!_8){delete this._cache[sn];}return _8;},HandleData:function(sn,_a){webim.libs.dom.init(_a.packet);try{var _b=[];var _c=_a.packet._childs();for(var _d in _c){try{var _e=_c[_d];switch(_d){case "roster":var _f=_e[0]._find_attr("available");var _10=_e[0]._find_attr("total");cr.evt.Send("webim.response","roster",{available:_f,total:_10});break;case "message":try{var _11=_e;if(_11.length>0){var _12=0;for(var i=_11.length-1;i>=0;--i){var _14=new webim.inc.Msg();_14.from_XML(_11[i]);if(_12==0){_12=_14.timestamp;}else{if(_12>_14.timestamp){_12=_14.timestamp;}}_b.push(_14);}if(_12>0){_12--;}webim.comm.gIndicator._last_timestamp=_12;}}catch(e){cr.Error("webim.comm.method.getmsgs",e);}break;case "presence":var _15=[];try{var _16=_e;if(_16.length>0){for(var i=_16.length-1;i>=0;--i){var _17=new webim.inc.Friend();_17.from_XML(_16[i]);if(_17.from&&_17.type=="available"){_17.presence="online";}if(_17.from&&_17.type=="unavailable"){_17.presence="offline";}_15.push(_17);}}}catch(e){cr.Error("webim.comm.method.getfriends",e);}if(_15.length>0){cr.evt.Send("webim.response","presence",_15);}break;default:cr.evt.Send("webim.response",_d,_e);break;}}catch(e){cr.Warn(e);}}if(_b.length>0){cr.evt.Send("webim.response","message",_b);}else{if(_d!="iq"){cr.evt.Send("WEBIM","CMD_SYS",{mcmd:"MCMD_NONEWMSG"});}}}catch(e){}this._cache[sn].done(_a.packet);this._Unload(sn);},Abort:function(sn){try{var _19=webim.libs.dom.create();_19._set_attr("type","cancel");_19._set_child("aborted",{});var _1a=webim.comm.CreatePacket("error",_19);this._cache[sn].done(_1a);}catch(e){}this._Unload(sn);},Timeout:function(sn){try{var _1c=webim.libs.dom.create();_1c._set_attr("type","wait");_1c._set_child("timeout",{});var _1d=webim.comm.CreatePacket("error",_1c);this._cache[sn].done(_1d);}catch(e){}this._Unload(sn);},Clear:function(){for(var _1e in this._cache){try{var req=this._cache[_1e];if((new Date()).getTime()-req.tm>10000){this.Timeout(_1e);}}catch(e){}}this._cTimer=window.setTimeout(this._Clear,5000);}});webim.comm.method.Script=cr.Class(webim.comm.method.Base,{initialize:function(){this.InitBase(webim.comm.method.Base);this._js=webim.sys.gConfig.get("server","url2");},Load:function(sn,_2){var _3=webim.libs.dom.toJSON(_2);var _4=this._js+encodeURIComponent(_3);if(cr.browser.isIE&&_4.length>=2000){cr.evt.Send("WEBIM","CMD_SYS",{mcmd:"MCMD_DOLOGIN",data:webim.sys.gConfig.get("locale",10008)});return false;}else{var _5=new cr.net.JsLoader(webim.config._dst_container);this._cache[sn].ldr=_5;_5.Init();_5.Get(_4);}return true;},Unload:function(sn){this._cache[sn].ldr.Close();}});webim.comm.buddy=webim.comm.buddy||{};cr.Extend(webim.comm.buddy,{refresh:function(){this._pI();var _1=function(_2){webim.comm.ProceedPacketError(_2);var _3=[];var _4=[];try{var _5=_2._find_child("iq");for(var j=_5.length-1;j>=0;--j){var _7=_5[j];var _8=_7._find_child("groups");if(_8.length>0){var _9=_8[0]._find_child("group");for(var i=_9.length-1;i>=0;--i){var _b=new webim.inc.Group();_b.from_XML(_9[i]);_3.push(_b);}}var _c=_7._find_child("roster");if(_c.length>0){var _d=_c[0]._find_child("item");for(var i=_d.length-1;i>=0;--i){var _e=new webim.inc.Friend();_e.from_Item(_d[i]);_4.push(_e);}}}}catch(e){cr.Warn(e);}cr.evt.Send("webim.cache.data","buddy",{friends:_4,groups:_3});};var _f=webim.libs.dom.create();_f._set_attr("type","get");_f._set_child("groups",webim.libs.dom.create());var _10=webim.comm.CreatePacket("iq",_f);_f=webim.libs.dom.create();_f._set_attr("type","get");_f._set_child("roster",webim.libs.dom.create());_10._set_child("iq",_f);webim.comm.Send(_10,_1);return false;},_pI:function(){if(!this._F){var _11=webim.libs.dom.create();if(typeof _11._set_value!="function"){cr.Error("webim.libs.dom.create",_11,typeof _11._set_attr,typeof _11._set_value,typeof _11._set_child);return;}_11._set_value(webim.config.position);var _12=webim.libs.dom.create();_12._set_child("position",_11);var _13=webim.libs.dom.create();_13._set_value(0);_12._set_child("timestamp",_13);var _14=webim.comm.CreatePacket();_14._set_child("presence",_12);webim.comm.Send(_14,function(){});this._F=true;}},_F:false});webim.comm.profile=webim.comm.profile||{};cr.Extend(webim.comm.profile,{refresh:function(_1){try{var _2=cr.Extend({onComplete:function(){}},_1);var _3=function(_4,_5){webim.comm.ProceedPacketError(_5);try{var _6=new webim.inc.UserInfo();_6.from_XML(_5);}catch(e){cr.Warn(e);}if(_6.GetGender()){_6.SetID(cr.uid);cr.evt.Send("webim.cache.data","profile",_6);}};var _7=webim.comm.CreatePacket();var _8=webim.libs.dom.create();var _9=webim.libs.dom.create();_9._set_attr("type","get");_9._set_child("profile",_8);_7._set_child("iq",_9);var _a=webim.libs.dom.create();_9=webim.libs.dom.create();_9._set_attr("type","get");_9._set_child("privacy",_a);_7._set_child("iq",_9);webim.comm.Send(_7,cr.func.Bind(_3,this,_2.onComplete));}catch(e){cr.Warn(e);}return false;},setProfile:function(_b,_c){_b=_b||webim.config._ns.webim.sys.gUserInfo;try{var _d=function(_e){webim.comm.ProceedPacketError(_e);var _f="";var _10="false";try{var _11=_e._find_child("iq");for(var i=0;i<_11.length;i++){var _iq=_11[i];var _14=webim.config.dst_window;switch(_iq._find_attr("type")){case "result":_10="true";_f="true";var _15=new webim.inc.UserInfo();_15.SetID(cr.uid);_15.from_XML(_e);break;case "error":var _16=_iq._find_child("error")[0];_f=_16._find_attr("type");break;}}}catch(e){cr.Warn(e);}webim.cache.gCache.setProfileResult({result:_10,info:_f,profile:_15},_c);};var _17=webim.comm.CreatePacket();var _18=webim.libs.dom.create();var _iq=webim.libs.dom.create();_iq._set_attr("type","set");_iq._set_child("profile",_18);_17._set_child("iq",_iq);var _1a=function(_1b){if(_b["Get"+_1b]()){var _1c=webim.libs.dom.create();_1c._set_value(_b["Get"+_1b]());_18._set_child(_1b.toLowerCase(),_1c);}};_1a("Icon");_1a("Nick");_1a("Gender");_1a("VerifyMethod");if(_b.GetSetting()){var _1d=_b.GetSetting();var _1e=webim.libs.dom.create();if(_1d.online_no_sound){_1e._set_child("online_no_sound",{});}if(_1d.newmsg_no_sound){_1e._set_child("newmsg_no_sound",{});}if(_1d.online_no_risen){_1e._set_child("online_no_risen",{});}if(_1d.newmsg_no_risen){_1e._set_child("newmsg_no_risen",{});}_18._set_child("setting",_1e);}if(_b.GetMsgPrivacy()){var _1f=webim.libs.dom.create();_1f._set_attr("name",_b.GetMsgPrivacy());var _20=webim.libs.dom.create();_20._set_child("active",_1f);var _iq=webim.libs.dom.create();_iq._set_attr("type","set");_iq._set_child("privacy",_20);_17._set_child("iq",_iq);}webim.comm.Send(_17,cr.func.Bind(_d,this));}catch(e){cr.Warn(e);}return false;}});webim.comm.Indicator=cr.Class({initialize:function(){this._last_timestamp=0;this.bStop=false;this.nTimer=0;cr.evt.Register("WEBIM","CMD_INDICATE",cr.func.Bind(this.onevt2,this));cr.evt.Register("webim.comm.indicator",null,cr.func.Bind(this.onevt,this));},onevt:function(_1,_2){switch(_2){case "start":this.bStop=false;this.Do();break;case "stop":this.bStop=true;if(this.nTimer){window.clearTimeout(this.nTimer);}break;}},onevt2:function(_3,_4,_5){this.onevt("webim.comm.indicator",_5);},Do:function(){this.nTimer=0;try{var _6=webim.libs.dom.create();if(typeof _6._set_value!="function"){cr.Error("webim.libs.dom.create",_6,typeof _6._set_attr,typeof _6._set_value,typeof _6._set_child);return;}_6._set_value(webim.config.position);var _7=webim.libs.dom.create();_7._set_child("position",_6);var _8=webim.libs.dom.create();_8._set_value(this._last_timestamp);_7._set_child("timestamp",_8);var _9=webim.comm.CreatePacket();_9._set_child("presence",_7);webim.comm.Send(_9,this.OnLoad);}catch(e){cr.Error("indicate",e);}if(!this.bStop){this.nTimer=window.setTimeout(cr.func.Bind(this.Do,this),webim.sys.gConfig.get("indicator","stimer"));}},OnLoad:function(_a){}});webim.cache=webim.cache||{};webim.cache.Cache=cr.Class({initialize:function(){this._data={buddy:null,profile:null};this._refreshing={buddy:false,profile:false};this._last_timestamp={buddy:0,profile:0};this.timestamp=0;this.expires=webim.config.cache_expires;var _1=this;cr.evt.Register("WEBIM","CMD_CACHE_REFRESH",cr.func.Bind(_1.onrefresh,_1));cr.evt.Register("webim.cache.refresh",null,cr.func.Bind(_1.onrefresh,_1));cr.evt.Register("webim.cache.data",null,cr.func.Bind(_1.ondata,_1));cr.evt.Register("webim.response","presence",cr.func.Bind(_1.OnPresence,_1));this.get_storageManager();},OnPresence:function(){webim.comm.buddy.refresh();},onrefresh:function(_2,_3,_4){if(_4&&typeof _4=="function"){cr.evt.RegisterOnce("webim.cache.ready",_3,_4);}this._refreshing[_3]=true;webim.comm[_3].refresh();},ondata:function(_5,_6,_7){this._data[_6]=_7;this._refreshing[_6]=false;this._last_timestamp[_6]=+new Date;var _8=this.set_localData(_6,_7);cr.evt.Send("webim.cache.ready",_6,_7);},setProfile:function(_9,_a){if(_9){var ui=new webim.config.dst_window.webim.inc.UserInfo();ui.from_JSON(_9);_9=ui;}else{if(!webim.config._ns.webim.sys.gUserInfo){return;}_9=webim.config._ns.webim.sys.gUserInfo;}webim.comm.profile.setProfile(_9,_a);},setProfileResult:function(_c,_d){if(_c.result=="true"){this.onrefresh(null,"profile");}if(_d){_d(null,"profile",_c);}},getBuddyList:function(_e,_f,_10){return this._getData("buddy",_e,_f,_10);},getProfile:function(_11,_12,_13){return this._getData("profile",_11,_12,_13);},_getData:function(_14,_15,_16,_17){if(_17){this.onrefresh(null,_14,_16);return false;}var r=this._data[_14];if(!this._data[_14]){if(this._initData(_14,_16)){return this._data[_14];}}else{if(this.ValidData(_14)){_16(null,_14,this._data[_14]);return this._data[_14];}}if(_15){this.onrefresh(null,_14,_16);return false;}else{return r;}},ValidData:function(_19){var mgr=this.get_storageManager();var _1b=mgr.GetTimestamp(cr.uid+":"+_19);var _1c=parseInt(new Date().getTime())-parseInt(_1b);if(_1c<this.expires){return true;}return false;},_initData:function(_1d,_1e,_1f){var _20=this.get_localData(_1d);if(_20){this._data[_1d]=_20;_1e(null,_1d,_20);return true;}return false;},get_storageManager:function(){if(!webim.localstorage.storageManager){webim.localstorage.storageManager=new webim.localstorage.StorageManager();}return webim.localstorage.storageManager;},get_localData:function(_21){try{if(!this.ValidData(_21)){return false;}var v=this.get_storageManager().getLocalStorage(cr.uid+":"+_21);if(v){return this._fromLocalData(_21,v);}else{return false;}}catch(e){return false;}},set_localData:function(_23,_24){_24=this._toLocalData(_23,_24);try{if(_24){var _25=this.get_storageManager();var key=cr.uid+":"+_23;if(_25.setLocalStorage(key,_24)){_25.SetTimestamp(key,(new Date()).getTime());}return true;}}catch(e){}return false;},_toLocalData:function(_27,_28){try{switch(_27){case "profile":var _29={};cr.Extend(_29,_28._cache);_28=cr.Json(_29);break;case "buddy":if(_28.friends.length>0){var _29={};cr.Extend(_29,_28);_28=cr.Json(_29);}else{return false;}break;}return _28;}catch(e){return false;}},_fromLocalData:function(_2a,_2b){try{switch(_2a){case "profile":var _2c=eval("("+_2b+")");var _2d=new webim.config.dst_window.webim.inc.UserInfo();if(!(_2c&&_2c.hasOwnProperty("id"))){cr.Warn("Invalid data type: profile ",_2c);return false;}_2d._cache=_2c;_2b=_2d;break;case "buddy":_2b=eval("("+_2b+")");if(!(_2b&&_2b.hasOwnProperty("friends")&&_2b.friends.length>0)){cr.Warn("Invalid data type: buddy ",_2b);return false;}break;}return _2b;}catch(e){return false;}}});webim.cache.gCache=null;webim.profile=new (cr.Class(webim.inc.UserInfo,{Load:function(){try{webim.cache.gCache.getProfile(true,webim.profile.OnLoad,true);}catch(e){}return false;},OnLoad:function(_1,_2,_3){cr.Extend(webim.profile,_3);cr.Provide("webim.profile");try{webim.Init._Profile();}catch(e){cr.Warn(e);}}}))();webim.message_adapter=webim.adapter||new (cr.Class({initialize:function(){},Init:function(){cr.evt.Register("webim.response","message",cr.func.Bind(this.OnMsg,this));cr.evt.Register("webim.response","presence",cr.func.Bind(this.OnPres,this));cr.evt.Register("webim.risen","auth",cr.func.Bind(this.OnAuth,this));},OnAuth:function(_1,_2,_3){cr.evt.Send("WEBIM","CMD_SYS",{mcmd:"MCMD_RISEN_AUTH",data:_3});},OnPres:function(_4,_5,_6){var _7=[];var _8=[];for(var i=_6.length-1;i>=0;i--){var _a=_6[i];if(_a.from&&_a.type=="available"){_7.push(_a);}if(_a.from&&_a.type=="available"){_8.push(_a);}}if(_7.length>0){cr.evt.Send("WEBIM","CMD_SYS",{mcmd:"MCMD_BUDDY_ONLINE",data:_7});}if(_8.length>0){cr.evt.Send("WEBIM","CMD_SYS",{mcmd:"MCMD_BUDDY_OFFLINE",data:_8});}},OnMsg:function(_b,_c,_d){cr.evt.Send("WEBIM","CMD_SYS",{mcmd:"MCMD_NEWMSG",data:_d});}}));webim.Presence=webim.Presence||cr.Class({initialize:function(){this.cache={};this.interval=0;},onEvt:function(_1,_2,_3){var _4=[];var _5=_3.friends;for(var i=_5.length-1;i>=0;i--){var _7=_5[i];if("available"==_7.type){if(this.cache[_7.id]&&this.cache[_7.id]!=_7.icon){var _8="online";switch(_5[j].icon){case "0998":_8="busy";break;case "0997":_8="away";break;default:_8="online";}_7.presence=_8;_4.push(_7);}this.cache[_7.id]=_7.icon;}}if(_4.length>0){cr.evt.Send("webim.response","presence",_4);}},init:function(){var _9=this;var _a=function(){webim.cache.gCache.getBuddyList(true,cr.func.Bind(_9.onEvt,_9),true);};this.interval=setInterval(_a,5*60*1000);}});webim.Sync=cr.Class({initialize:function(){this.c={};this.n="webimWin";this.p=null;this.u=null;this.t=0;this.windowList={};cr.evt.Register("webim.window","show",cr.func.Bind(this.onWinShow,this));cr.evt.Register("webim.window","minimize",cr.func.Bind(this.onWinMinimize,this));cr.evt.Register("webim.window","close",cr.func.Bind(this.onWinClose,this));},Init:function(){this.p="/";this.u=cr.utils.GetRootDomain(window.location.hostname);if(this.t>0){window.clearInterval(this.t);this.t=0;}this.t=window.setInterval(cr.func.Bind(this.Sync,this),2000);},stop:function(){window.clearInterval(this.t);this.t=0;},onWinShow:function(_1,_2,_3){if("chat"==_3.type){this.windowList[_3.uid]={w:_3.winid,s:"s",u:_3.uid,n:_3.nick};this.Save("w",this.windowList);}},onWinMinimize:function(_4,_5,_6){if("chat"==_6.type){this.windowList[_6.uid]={w:_6.winid,s:"m",u:_6.uid,n:_6.nick};this.Save("w",this.windowList);}},onWinClose:function(_7,_8,_9){if("chat"==_9.type){this.windowList[_9.uid]={w:_9.winid,s:"c",u:_9.uid,n:_9.nick};this.Save("w",this.windowList);}},_Save:function(_a){if(cr.browser.isIE6&&cr.json.Object(_a).length>2048){return;}_a.u=cr.uid;cr.cookie.Set(this.n,cr.json.Object(_a),null,this.p,this.u);},Save:function(_b,_c){var _d=this.Get();_d[_b]=_c;this._Save(_d);},Get:function(_e){this.v={};try{var _f=cr.cookie.Get(this.n);if(_f==""){_f="{}";}eval("this.v="+_f);}catch(e){cr.Error(e);}return _e?this.v[_e]:this.v;},Sync:function(){var _10=this.Get();if(_10.u!=cr.uid){this._Save({});return;}cr.evt.Send("webim.sync","window",_10);}});webim.load=function(){try{if(typeof PassportSC!=="undefined"){var _1=PassportSC.cookieHandle();if(_1==""&&document.location.host=="www.sohu.com"){return;}}}catch(e){}cr.Require(["cr.core","cr.net"],function(){webim.loader();cr.Require(["cr.net","cr.ctrl","cr.ctrl.menu"],function(){webim.Bootstrap();cr.Require(["cr.effect"],webim.Init);});});};webim.Bootstrap=function(){var _2=webim.config.dst_window;var _3=document.getElementsByTagName("head").item(0);if(webim.config.css_enable){var _4=document.createElement("link");_4.setAttribute("name","webim");_4.setAttribute("type","text/css");_4.setAttribute("rel","stylesheet");var _5=webim.imageBase+"/css/webim";if(cr.browser.isNstdIE){_5+="_ieN";}else{if(cr.browser.isIE6){_5+="_ie6";}}_5+="."+webim.majorVersion+".css";_4.setAttribute("href",_5);_3.appendChild(_4);}if(webim.config.ex_css){var _6=document.createElement("link");_6.setAttribute("name","webimExCss");_6.setAttribute("type","text/css");_6.setAttribute("rel","stylesheet");_6.setAttribute("href",webim.config.ex_css);_3.appendChild(_6);}webim.gCandleArmy=new webim.CandleArmy();webim.cm_drawer.prepare();if(webim.config.cm_draw){webim.api.cm_draw();}};webim.Init=function(){if(!cr.browser.isLoadingDone()){window.setTimeout(webim.Init,5);return;}cr.evt.Send("webim","preinit",null);try{webim.config.preInit();}catch(e){cr.Warn(e);}webim.Init.Dom();webim.cache.gCache=new webim.cache.Cache();try{new webim.BugReport();new webim.BugReportTip();webim.loadOnDemand=webim.loadOnDemand||new webim.LoadOnDemand();}catch(e){}webim.comm.Init();webim.LoadCurrentUser();if(webim.config.esc_key){webim.Init.EscKey();}new webim.SoundManager(webim.config.dst_window);try{cr.Provide("webim.loader");if(typeof webim.config.events.on_loader_init=="function"){webim.config.events.on_loader_init();}}catch(e){cr.Warn(e);}try{if(webim.config.load_panel&&(webim.config.load_panel===true||/.*.chinaren.com/.test(document.location.host)||document.location.host=="news.sohu.com"||document.location.host=="it.sohu.com"||document.location.host=="yule.sohu.com"||document.location.host=="music.sohu.com"||document.location.host=="music.yule.sohu.com"||document.location.host=="v.sohu.com"||document.location.host=="tv.sohu.com"||document.location.host=="data.yule.sohu.com"||document.location.host=="data.tv.sohu.com"||document.location.host=="app.yule.sohu.com")){if("tv.sohu.com"==document.location.host||"news.sohu.com"==document.location.host){return;}cr.Require.Uid(function(){if(cr.uid!=""){if(webim.checkFocusAccount(cr.uid)){return;}}var _7=document.createElement("div");_7.setAttribute("id","webim_panel_div");webim.config._dst_container.appendChild(_7);cr.Require([["webim.panel",webim.imageBase+"/js/panel."+webim.majorVersion+".js"]]);});}}catch(e){}};webim.checkFocusAccount=function(_8){return /@focus\.cn$/i.test(_8);};webim.Init.Dom=function(){var _9=webim.config.dst_window.document;var _a=_9.getElementById(webim.config.dst_container);if(!_a){_a=_9.createElement("div");_a.setAttribute("id",webim.config.dst_container);if(!_a.style){_a.style={};}_a.style.position="absolute";_a.style.top="0px";_a.style.left="0px";_a.style.zIndex="9999";_9.body.insertBefore(_a,_9.body.firstChild);}_a.className="CrSW";webim.config._dst_container=_a;};webim.Init.EscKey=function(){var _b=webim.config.dst_window;var _c=0;var _d=function(_e){if(_e.keyCode=="27"){var _f=(new Date()).getTime();if(_f-_c<=webim.sys.gConfig.get("windows","dblClickTime")){cr.evt.Send("WEBIM","CMD_USER",{mcmd:"MCMD_SHOW_BUDDYWIN"});_c=0;if(cr.browser.isGecko){cr.event.stop(_e);}return false;}_c=_f;if(cr.browser.isGecko){cr.event.stop(_e);}}};cr.event.observe(_b.document,"keydown",_d);};webim.LoadCurrentUser=function(){cr.Require.Uid(function(){if(cr.uid!=""){if(webim.checkFocusAccount(cr.uid)){webim.LoadingTip.hide();webim.config.loading_tip="none";webim.config.load_panel=false;return;}webim.Init.Indicate();webim.profile.Load();}});};webim.Init.Indicate=function(){window.setTimeout(cr.func.CallWith(cr.evt.Send,"WEBIM","CMD_INDICATE","start"),webim.sys.gConfig.get("indicator","delay"));};webim.Init._Profile=function(){webim.sound.Init();webim.title.Init();webim.message_adapter.Init();try{webim.presence=new webim.Presence();webim.presence.init();}catch(e){cr.Warn(e);}if(webim.config.sync){webim.sync=new webim.Sync();webim.sync.Init();}};webim.BugReportTip=cr.Class({initialize:function(){this.id=cr.evt.Register("cr.log","error",cr.func.Bind(this.on_error,this));this.tipDom=null;this.errMsg=null;this.m_clearErrorTipTimeout=null;this.errTime=null;},renderTip:function(){var _1=cr.utils.GetPagePosition(webim.config.dst_window);var _2=160;if(cr.browser.isIE){_2=144;}if(!this.tipDom){var _3=new cr.ctrl.Container(webim.config.dst_window);_3.getDom().setAttribute("name","bug_report_tip_dom");_3.getCss().addClassName("bugReportTip");_3.getCss().setStyle({left:(_1.clientWidth+_1.scrollLeft-_2)+"px",top:(_1.clientHeight+_1.scrollTop-87)+"px"});_3.setInnerHTML("<div class=\"bugReportTipTitle\">"+webim.config._bugreport.init.title+"</div>"+"<div style=\"line-height:20px;margin-bottom:4px;\">"+webim.config._bugreport.init.content+"</div>"+"<div class=\"bugTipSendBtn\" name=\"tipSender\">"+webim.config._bugreport.init.btn1+"</div>&nbsp;&nbsp;"+"<div class=\"bugTipSendBtn\" name=\"cancel\">"+webim.config._bugreport.init.btn2+"</div>");_3.appendTo(webim.config._dst_container,_3.getDom());this.tipDom=_3;}else{this.tipDom.getDom().style.top=(_1.clientHeight+_1.scrollTop-87)+"px";this.tipDom.getDom().style.left=(_1.clientWidth+_1.scrollLeft-_2)+"px";this.tipDom.show();}var _4=cr.utils.SubElem(_3.getDom(),"tipSender","div");var _5=cr.utils.SubElem(_3.getDom(),"cancel","div");var _6=this;_4.onclick=function(){cr.evt.Send("WEBIM_BUG_REPORT","RENDER",{msg:_6.errMsg,errtime:_6.errTime});_6.tipDom.hide();};_5.onclick=function(){_6.tipDom.hide();};this.delayClearErrTip();},delayClearErrTip:function(){if(this.m_clearErrorTipTimeout){clearTimeout(this.m_clearErrorTipTimeout);}this.m_clearErrorTipTimeout=setTimeout(cr.func.Bind(this.clearErrorTip,this),10000);},clearErrorTip:function(){if(this.tipDom){this.tipDom.hide();}},on_error:function(){this.errMsg=cr.Array(arguments);this.renderTip();this.errTime=(new Date()).getTime();}});webim.BugReport=cr.Class({initialize:function(){this.id=cr.evt.Register("WEBIM_BUG_REPORT","RENDER",cr.func.Bind(this.renderReport,this));this.reportDom=null;this.reportObj=null;this.sysErr=null;this.username=null;this.starttime=(new Date()).getTime();this.endtime=null;},renderReport:function(_1,_2,_3){this.sysErr=_3.msg;this.endtime=_3.errtime;var _4=cr.utils.GetPagePosition(webim.config.dst_window);if(!this.reportDom){var _5=new cr.ctrl.Container(this.dstwin);_5.getDom().setAttribute("name","bug_report_dom");_5.getCss().addClassName("bugReport");_5.getCss().setStyle({left:(_4.clientWidth/2+_4.scrollLeft-190)+"px",top:(_4.clientHeight/2+_4.scrollTop-150)+"px"});_5.setInnerHTML("<div class=\"bugReportTitle\"><span>"+webim.config._bugreport.send.title+"</span></div>"+"<form target=\"bugiframe\" action=\"http://chat.sohu.com/addbug.jsp\" method=\"post\" name=\"err_report_form\">"+"<div style=\"margin:4px 10px 2px 10px;\">"+webim.config._bugreport.send.content2+"</div>"+"<div class=\"bugReportSysErr\"><span name=\"sys_err_msg\"></span></div>"+"<div style=\"margin:2px 10px 2px 10px;\">"+webim.config._bugreport.send.contact+"<input type=\"text\"  name=\"contact\" size=\"48\" maxlength=\"300\" "+"disableautocomplete=\"\" autocomplete=\"off\" style=\"font-size:12px;margin:4px 0 4px 0;\" /></div>"+"<div style=\"margin:2px 10px 2px 10px;\">"+webim.config._bugreport.send.content1+"<input type=\"text\"  name=\"user_err_msg\" size=\"48\" maxlength=\"300\" "+"disableautocomplete=\"\" autocomplete=\"off\" style=\"font-size:12px;margin:4px 0 4px 0;\" /></div>"+"<input type=\"hidden\" name=\"username\" /><input type=\"hidden\" name=\"refer\"/>"+"<input type=\"hidden\" name=\"content\"  /><input type=\"submit\" style=\"display:none;\" name=\"err_submit\"/>"+"</form><iframe name=\"bugiframe\" frameborder=\"0\" id=\"bugiframe\" height=\"0px\" width=\"0px\"></iframe>"+"<div style=\"margin:5px 0px 7px 182px\">"+"<div  class=\"bugSendBtn\" name=\"send\">"+webim.config._bugreport.send.btn1+"</div>&nbsp;&nbsp;"+"<div  class=\"bugSendBtn\" name=\"sendcancel\">"+webim.config._bugreport.send.btn2+"</div></div>");_5.appendTo(webim.config._dst_container,_5.getDom());this.reportObj=_5;this.reportDom=this.reportObj.getDom();}else{this.reportDom.style.left=(_4.clientWidth/2+_4.scrollLeft-190)+"px";this.reportDom.style.top=(_4.clientHeight/2+_4.scrollTop-150)+"px";var _6=cr.utils.SubElem(this.reportDom,"user_err_msg","input");_6.value="";this.reportObj.show();}var _7=cr.utils.SubElem(this.reportDom,"send","div");var _8=cr.utils.SubElem(this.reportDom,"sendcancel","div");this.setMsg();var _9=this;_7.onclick=function(){_9.sendReport();};_8.onclick=function(){_9.reportObj.hide();};},setMsg:function(){var _a=cr.utils.SubElem(this.reportDom,"sys_err_msg","span");var _b=cr._Dump(this.sysErr[2]);_a.innerHTML=_b;},sendReport:function(){var _c=cr.utils.SubElem(this.reportDom,"err_report_form","form");var _d=cr.utils.SubElem(this.reportDom,"user_err_msg","input");var _e=cr.utils.SubElem(this.reportDom,"sys_err_msg","span");var _f=cr.utils.SubElem(this.reportDom,"username","input");var _10=cr.utils.SubElem(this.reportDom,"refer","input");var _11=cr.utils.SubElem(this.reportDom,"content","input");var _12=cr.utils.SubElem(this.reportDom,"contact","input");_10.value=webim.config.dst_window.location.href;_f.value=cr.uid;var _13="";var _14=cr._Dump(cr.browser);try{_13=navigator.userAgent;}catch(e){}var _15=(this.endtime-this.starttime)/1000;_11.value="reportUser  :"+_f.value+"\ncontact     :"+_12.value+"\nversion     :"+webim.majorVersion+"\nduration    :"+_15+"(second)"+"\nuser_err_msg:"+_d.value+"\nuserAgent   :"+_13+"\nbrowser     : "+_14+"\nsys_err_msg :\n  "+_e.innerHTML;try{_c.submit();this.reportObj.hide();}catch(e){cr.Log("error:",e);}}});webim.LoadOnDemand=cr.Class({initialize:function(){this.id=cr.evt.Register("WEBIM",null,cr.func.Bind(this.delay,this));},delay:function(_1,_2,_3){if(cr.uid&&/@focus\.cn$/i.test(cr.uid)&&!/cmd_risen|cmd_sys|cmd_error/.test(_2)){cr.evt.Send("WEBIM","CMD_SYS",{mcmd:"MCMD_RISEN_AUTH",data:"小纸条暂不支持Focus账号"});return;}if(typeof _2=="string"){_2=_2.toUpperCase();}try{if(_2=="PREINIT"||_2=="CMD_INDICATE"||_2=="CANDLEMAN"||_3.mcmd=="MCMD_NONEWMSG"){return;}}catch(e){}var _4=_3.mcmd;var _5=(typeof _3.data=="undefined")?_3:_3.data;try{var e=new webim.config._ns.webim.inc.Evt(_2,_4,_5);webim.config._ns.webim.mgr.gEvtCenter.send_event(e);}catch(e){this.pending.push([_2,_4,_5]);if(!webim.config._isLoading){if(webim.config.loading_tip=="default"&&(_2!="CMD_SYS"||(_4!="MCMD_NEWMSG"&&_4!="MCMD_BUDDY_OFFLINE"&&_4!="MCMD_BUDDY_ONLINE"))){new webim.LoadingTip(webim.config._loadingtip.content).show();}webim.config.init_immed=true;webim._loadMainApp();}cr.Log("pending event:",_2,_4,_3);return "break";}},clear:function(){cr.evt.Unregister("WEBIM",null,this.id);},sendpending:function(){while(this.pending.length){var _7=this.pending.shift();var e=new webim.config._ns.webim.inc.Evt(_7[0],_7[1],_7[2]);webim.config._ns.webim.mgr.gEvtCenter.send_event(e);cr.Log("send pending event:",e);}},id:0,pending:[]});webim.LoadingTip=cr.Class({initialize:function(_1,_2){this.content=_1;this.dstwin=_2?_2:window;},show:function(){try{var _3=cr.utils.SubElem(webim.config._dst_container,"loadingtip","div");var _4=cr.utils.GetPagePosition(webim.config.dst_window);if(!_3){var _5=new cr.ctrl.Container(this.dstwin);_5.getDom().setAttribute("name","loadingtip");_5.setStyle({border:"1px white solid",textAlign:"center",opacity:0.7,position:"absolute",height:"23px",width:"180px",left:(_4.clientWidth/2+_4.scrollLeft-90)+"px",top:(_4.clientHeight/2+_4.scrollTop-10)+"px",color:"white",paddingTop:"10px",backgroundColor:"black"});_5.setInnerHTML("<span style='color:white;font-size:12px;'>"+this.content+"</span>");_5.appendTo(webim.config._dst_container);}else{_3.style.top=(_4.clientHeight/2+_4.scrollTop-10)+"px";_3.style.left=(_4.clientWidth/2+_4.scrollLeft-90)+"px";_3.style.display="";}}catch(e){cr.Error("webim.LoadingTip.show:",e);}}});webim.LoadingTip.hide=function(){var _6=cr.utils.SubElem(webim.config._dst_container,"loadingtip","div");if(_6){_6.style.display="none";}};webim.loader.Config();webim.load();