var cr=cr||{};cr.imgBase=cr.imgBase||"http://images.chinaren.com/product/webim/libs";cr.version=cr.version||"0.3.1";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.DeepExtend=cr.DeepExtend||function(_4,_5){if(!_5){return _4;}for(var p in _5){if(typeof _5[p]=="object"){_4[p]=_4[p]||{};arguments.callee(_4[p],_5[p]);}else{_4[p]=_5[p];}}return _4;};cr.Clone=cr.Clone||function(_1){var _2;if(_1.constructor==Object){_2=new this.constructor();}else{_2=new _1.constructor(_1.valueOf());}for(var _3 in _1){if(_2[_3]!=_1[_3]){if(typeof (_1[_3])=="object"){_2[_3]=cr.Clone(_1[_3]);}else{_2[_3]=_1[_3];}}}return _2;};cr.Class=cr.Class||function(){var _1=function(){this.InitBase=function(_2){var _3=new cr.Array(arguments);_3.shift();_2.prototype.initialize.apply(this,_3);};this.initialize.apply(this,arguments);};var _4=arguments.length;for(var i=0;i<_4;i++){cr.Extend(_1.prototype,arguments[i].prototype||arguments[i]);}return _1;};var webim=webim||{imageBase:"http://images.chinaren.com/product/webim/version/2.0",majorVersion:"1.8.56"};webim.libs={};cr.Json=cr.Json||function(_1){if(_1 instanceof Array){return cr.Json._A(_1);}switch(typeof _1){case "string":return cr.Json._S(_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._A=cr.Json._A||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._S=cr.Json._S||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;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 cr.Json(_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.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.libs.Escape=function(_1){var _2=/&/g;_1=_1.replace(_2,"&amp;");_2=/\"/g;_1=_1.replace(_2,"&quot;");_2=/</g;_1=_1.replace(_2,"&lt;");_2=/>/g;_1=_1.replace(_2,"&gt;");return _1;};webim.libs.Timer=webim.libs.Timer||cr.Class({initialize:function(){this._timestamp=0;this._func=null;this._timer=0;},Start:function(){if(!this._timer){this._timer=window.setInterval(cr.func.Bind(this._check_job,this),500);}},Stop:function(){if(this._timer){window.clearInterval(this._timer);this._timer=0;}},Set_job:function(_1,_2){this._func=_1;this._timestamp=(new Date).getTime()+_2;},Clear_job:function(){this._func=null;this._timestamp=0;},_check_job:function(){var _3=this._func;var _4=this._timestamp;if(typeof _3=="function"&&_4<(new Date).getTime()){this._func=null;this._timestamp=0;_3();}}});webim.inc={};webim.inc.Msg=cr.Class({type:"chat",id:"",from:"",to:"",nick:"",category:"sohu/im",timestamp:0,unread:false,body:"",key:"",initialize:function(){},from_XML:function(_1){try{var _2=function(_3){return _1._find_attr(_3)||"";};var _4=function(_5){var _6=_1._find_child(_5);if(_6.length>0){return _6[0]._get_value();}return "";};this.type=_1._find_attr("type")||"chat";this.from=_2("from");this.to=_2("to");this.category=_1._find_attr("category")||"sohu/im";this.id=_2("id");this.timestamp=parseInt(_4("timestamp"));if(_1._find_child("unread").length>0){this.unread=true;}this.nick=_4("nick");if(this.nick==""){this.nick=this.from;}this.body=_4("body");this.key=_4("key");}catch(e){cr.Warn(e);}}});webim.inc.Friend=cr.Class({from:"",id:"",nick:"",gender:"",type:"",icon:"0000",gid:0,category:"sohu/im",subscription:"both",presence:"offline",initialize:function(){},from_Item:function(_1){try{this.from=_1._find_attr("jid")||_1._find_attr("from")||"";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;}var _3=function(_4){return _1._find_attr(_4)||"";};this.gender=_3("gender");this.type=_3("type");this.icon=_3("icon");this.category=_3("category");this.subscription=_3("subscription");this.presence=_3("presence");_2=_1._find_child("group");if(_2.length>0){this.gid=parseInt(_2[0]._get_value());}}catch(e){}},from_XML:function(_5){this.from_Item(_5);this.subscription=this.presence;},SetAttribute:function(_6){cr.Extend(this,_6);},GetAttribute:function(_7){if(typeof (this[_7])!="undefined"){return this[_7];}else{return null;}}});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({gid:0,name:"",initialize:function(){},from_XML:function(_1){try{this.gid=_1._find_attr("gid");this.name=_1._find_attr("name");if(typeof this.name!="string"){this.name="";}}catch(e){}},SetAttribute:function(_2){cr.Extend(this,_2);},GetAttribute:function(_3){if(typeof (this[_3])!="undefined"){return this[_3];}else{return null;}}});webim.inc.Presence=cr.Class({initialize:function(){this.userid=null;this.type="unavailable";this.icon="0000";this.presence="offline";},from_XML:function(_1){try{if(_1._find_attr("from")){this.userid=_1._find_attr("from");}if(_1._find_attr("type")){this.type=_1._find_attr("type");}if(this.type=="available"){this.presence="online";}}catch(e){cr.Warn(e);}}});webim.utils={getIconUrl:function(_1,_2,_3){var _4="0";if(typeof _1!="string"){_4="0";}else{if(_1.length==1){_4=_1;}else{_4=_1.toLowerCase()=="female"?"2":"1";}}var _5=webim.sys.gConfig.get("system","icon_url_off");if(typeof _3=="string"&&(_3.toLowerCase()=="available"||_3.toLowerCase()=="true")){_5=webim.sys.gConfig.get("system","icon_url_on");}return cr.str.Format$(_5,_4,_2);},_onlineRand:(new Date()).getTime(),getOnlineUrl:function(_6){var _7=webim.sys.gConfig.get("candleman","img_urls");var _8=webim.utils._onlineRand%_7.length;var _9=_7[_8];return _9.replace("$CRUSER",_6);},convertKr:function(_a){var _b="";var _c=_a.length;var _d=0;for(var i=0;i<_c;i++){_d=_a.charCodeAt(i);if((_d>=128&&_d<=255)||(_d>=12592&&_d<=12687)||(_d>=44032&&_d<=55203)){_b+="&#"+_d;}else{_b+=_a.charAt(i);}}return _b;}};webim.utils.BASE64={enKey:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",deKey:new Array(-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,-1,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,-1,-1,-1,-1,-1),encode:function(_1){var _2=new Array();var _3,ch2,ch3;var _4=0;while(_4+3<=_1.length){_3=_1.charCodeAt(_4++);ch2=_1.charCodeAt(_4++);ch3=_1.charCodeAt(_4++);_2.push(this.enKey.charAt(_3>>2),this.enKey.charAt(((_3<<4)+(ch2>>4))&63));_2.push(this.enKey.charAt(((ch2<<2)+(ch3>>6))&63),this.enKey.charAt(ch3&63));}if(_4<_1.length){_3=_1.charCodeAt(_4++);_2.push(this.enKey.charAt(_3>>2));if(_4<_1.length){ch2=_1.charCodeAt(_4);_2.push(this.enKey.charAt(((_3<<4)+(ch2>>4))&63));_2.push(this.enKey.charAt(ch2<<2&63),"=");}else{_2.push(this.enKey.charAt(_3<<4&63),"==");}}return _2.join("");},decode:function(_5){var _6=new Array();var _7,ch2,ch3,ch4;var _8=0;_5=_5.replace(/[^A-Za-z0-9\+\/]/g,"");while(_8+4<=_5.length){_7=this.deKey[_5.charCodeAt(_8++)];ch2=this.deKey[_5.charCodeAt(_8++)];ch3=this.deKey[_5.charCodeAt(_8++)];ch4=this.deKey[_5.charCodeAt(_8++)];_6.push(String.fromCharCode((_7<<2&255)+(ch2>>4),(ch2<<4&255)+(ch3>>2),(ch3<<6&255)+ch4));}if(_8+1<_5.length){_7=this.deKey[_5.charCodeAt(_8++)];ch2=this.deKey[_5.charCodeAt(_8++)];if(_8<_5.length){ch3=this.deKey[_5.charCodeAt(_8)];_6.push(String.fromCharCode((_7<<2&255)+(ch2>>4),(ch2<<4&255)+(ch3>>2)));}else{_6.push(String.fromCharCode((_7<<2&255)+(ch2>>4)));}}return _6.join("");}};webim.utils.id={char_table:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0],IsValid:function(_1){for(var i=_1.length-1;i>=0;--i){if(_1.charCodeAt(i)>=this.char_table.length||!this.char_table[_1.charCodeAt(i)]){return false;}}return /^\w[\w-.]*@(([\w-])+[.])+(\w)+$/.test(_1);}};webim.i18n=function(w){return w;};webim.sys={};webim.sys.Config=cr.Class();webim.sys.Config.prototype={initialize:function(_1){this._cache={};cr.Extend(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},profile:{idL:32,nickL:8},setNick:{orderCates:["sohu/blog","sohu/bbs","chinaren/alumni","chinaren/club","chinaren/xiaonei","sohu/mail","17173"]},loginWindow:{content:"<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\"><html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=gbk\"/><link href=\""+webim.imageBase+"/css/login."+webim.majorVersion+".css\" rel=\"stylesheet\" type=\"text/css\"/></head><body margin=0 padding=0 leftMargin=0 topMargin=0 marginheight=0 marginwidth=0><script charset=\"gbk\" src=\"http://www.sohu.com/passport/pp18030_7.js\"></script><script charset=\"gbk\" src=\"http://www.sohu.com/passport/pp18030_ui_9.js\"></script><div id=\"login\" style=\"text-align:left;\"><div id=\"card\">正在加载,请稍候... </div><div id=\"info\"><div id=\"msg\" class=infomsg></div></div></div><script charset=\"gbk\" src=\""+webim.imageBase+"/js/login."+webim.majorVersion+".js\"></script></body></html>",msg:"欢迎您使用<a href=\"http://me.sohu.com/\" target=\"_blank\">搜狐小纸条</a>！<br/>使用此功能需先登录搜狐通行证。若您还不是搜狐通行证用户，请<a href=\"http://passport.sohu.com/web/reguser\" target=\"_blank\">注册新用户</a><br/>"},imwindow:{txtMax:150}});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);if(!webim.sys.stat.i){webim.sys.stat.i=document.createElement("img");webim.config._dst_container.appendChild(webim.sys.stat.i);}webim.sys.stat.i.setAttribute("src",_2+_1+_3+"?"+_4);};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:true,panel:{},cm_showtip:false,cm_container:"onlineIcon",cm_mood_flash:"crmood",cm_menu:[],cm_GenMenu:function(_1,_2){},chatv_url:"http://me.sohu.com/chatv.js",_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);};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(){webim.LoadCurrentUser();});}catch(e){cr.Warn(e);}},show_login:function(_3){try{cr.evt.Send("webim.loginwindow","open",_3);}catch(e){cr.Warn(e);}},close_login:function(){cr.evt.Send("webim.loginwindow","close",null);},show_buddyWin:function(x,y){cr.evt.Send("webim.buddylist","show",{x:x,y:y});},close_buddyWin:function(){cr.evt.Send("webim.buddylist","close");},get_roster:function(_6){try{var _7=function(_8,_9,_a){_6(_a);};if(cr.uid){webim.cache.gCache.getBuddyList(true,_7);}else{cr.evt.RegisterOnce("webim.profile","ready",function(){webim.cache.gCache.getBuddyList(true,_7);});}}catch(e){cr.Warn(e);}},show_setWin:function(_b,_c){cr.evt.Send("webim.set","openprofilewin",{left:_b,top:_c});},get_profile:function(_d){try{cr.evt.RegisterOnce("webim.profile","ready",function(_e,_f,_10){var _11=webim.profile.GetProfile();_d(_11);});cr.Require.Uid(function(){if(cr.uid){webim.profile.Load();}});}catch(e){cr.Warn(e);}},set_profile:function(_12,_13){try{var fun=function(cmd,_16,_17){var _18=true;if("true"!=_17.result){_18=false;}_13(_18);};webim.cache.gCache.setProfile(_12,fun);}catch(e){cr.Warn(e);}},get_presence:function(_19,_1a){try{cr.evt.RegisterOnce("webim.response","presence.status",function(cmd,_1c,_1d){_1a(_1d);});if(cr.uid){cr.evt.Send("webim.comm.presence","get",{_ids:_19});}else{cr.evt.RegisterOnce("webim.profile","ready",function(){cr.evt.Send("webim.comm.presence","get",{_ids:_19});});}}catch(e){cr.Warn(e);}},get_my_presence:function(_1e){try{var fun=function(cmd,_21,_22){var _23="";switch(_22._cache.icon){case "0998":_23="busy";break;case "0997":_23="away";break;case "0999":_23="invisible";break;default:_23="online";break;}var _24={presence:_23,icon:_22._cache.icon};_1e(_24);};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(_25,_26,_27){try{switch(_25){case "busy":_26="0998";break;case "away":_26="0997";break;case "invisible":_26="0999";break;case "online":default:if(!_26){_26="0000";}}webim.api.set_profile({icon:_26},_27);}catch(e){cr.Warn(e);}},chat:function(_id,_29,_2a,_2b,_2c,_2d){_id=webim.libs.passport.convert_userid("chinaren","passport",_id);var _2e={userid:_id,nick:_29,category:_2a,historytimestamp:_2b,nLeft:_2c,nTop:_2d};cr.evt.Send("webim.imwindow","openim",_2e);},open_imWin:function(_id,_30,_31,_32,_33,_34,_35){_id=webim.libs.passport.convert_userid("chinaren","passport",_id);var _36={userid:_id,nick:_30,category:_31,presence:_32,historytimestamp:_33,nLeft:_34,nTop:_35};cr.evt.Send("webim.imwindow","openim",_36);},chat_msg:function(_37){try{for(var i=_37.length-1,j=0;i>=0;i--,j++){cr.evt.Send("webim.imwindow","showimbymsg",_37[j]);}}catch(e){cr.Warn(e);}},close_imWin:function(_39){cr.evt.Send("webim.imwindow","closeim",_39);},mini_imWin:function(_3a){try{cr.evt.Send("webim.imwindow","minimizeim",_3a);}catch(e){cr.Warn(e);}},sendmsg:function(_id,_3c,_3d,_3e,_3f,_40){_id=webim.libs.passport.convert_userid("chinaren","passport",_id);var _41={userid:_id,nick:_3c,category:_3d,message:_3e,left:_3f,top:_40};cr.evt.Send("webim.imwindow","sendmsgchat",_41);},adduser:function(_id,_43,_44){cr.evt.Send("webim.useraction","add",{userid:_id,nick:_43,category:_44});},blockuser:function(_id,_46){cr.evt.Send("webim.useraction","block",{userid:_id,nick:_46});},deluser:function(_id,_48){cr.evt.Send("webim.useraction","del",{userid:_id,nick:_48,category:""});}};sohuim={webmsg:{SendMsg:function(_49,_4a,_4b,_4c,_4d,_4e){webim.api.sendmsg(_49,_4a,_4b,_4c);},AddUser:function(_4f,_50,_51,_52,_53){webim.api.adduser(_4f,_50,_51);},BlockUser:function(_54,_55,_56){webim.api.blockuser(_54,_54);}},candleArmy:{RenderAll:function(){webim.api.cm_draw();}}};webim.playsound=webim.playsound||new (cr.Class({onMsg:-1,onOnline:-1,timeStamp:0,initialize:function(){},Init:function(){if(this.onMsg>=0){cr.evt.Unregister("webim.response","message",this.onMsgHdl);this.onMsg=-1;}if(this.onOnline>=0){cr.evt.Unregister("webim.response","presence",this.onOnlineHdl);this.onOnline=-1;}if(!webim.profile.GetSetting().newmsg_no_sound){this.onMsgHdl=cr.func.Bind(this.OnMsg,this);this.onOnlineHdl=cr.func.Bind(this.OnOnline,this);this.onMsg=cr.evt.Register("webim.response","message",this.onMsgHdl);this.onOnline=cr.evt.Register("webim.response","presence",this.onOnlineHdl);}},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=_d;if(_e.from&&_e.type=="available"){_c=true;}});if(_c){cr.evt.Send("webim.sound","play","buddy_online");}}}));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){}},_c:function(){try{var _4=top.window.document.title;for(var i=this._arrayText.length-1;i>=0;i--){_4=_4.replace(this._arrayText[i],"");}top.window.document.title=_4;}catch(e){}},start:function(){try{if(!this._flashFlag){this._c();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(){var _1=this;var _2=webim.config.dst_window;_1.titleText=webim.config.title;_1.focus=false;_1.flashTitle=new webim.FlashTitle(_1.titleText,1000);cr.evt.Register("WEBIM","CMD_SYS",cr.func.Bind(_1.Stop,_1));_1.onMsg=cr.evt.Register("webim.response","message",cr.func.Bind(_1.OnMsg,_1));_1.f=function(){_1.focus=true;_1.flashTitle.stop();};_1.u=function(){_1.focus=false;};cr.event.observe(_2,"focus",_1.f);cr.event.observe(_2.document,"keypress",_1.f);cr.event.observe(_2.document,"mousedown",_1.f);cr.event.observe(_2,"blur",_1.u);},OnMsg:function(_3,_4,_5){var _6=false;cr.Array.ForEach(_5,function(_7){var _8=_7.type;if(!_8||_8=="chat"){_6=true;}});if(!this.focus&&_6){cr.evt.Send("webim.flashtitle","start");}else{cr.evt.Send("webim.flashtitle","stop");}},Stop:function(_9,_a,_b){if(_b.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){cr.Extend(_5[i],_4);return;}}var _7=cr.Extend({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=cr.Extend({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{var _19={userid:_16._id,nick:_16._nick,category:_16._category};cr.evt.Send("webim.imwindow","sendmsgchat",_19);}catch(e){}return false;},chat:function(_1a,_1b,_1c){try{var _1d={userid:_1a._id,nick:_1a._nick,category:_1a._category};cr.evt.Send("webim.imwindow","openim",_1d);}catch(e){}return false;},subscribe:function(_1e,_1f,_20){try{var _21={userid:_1e._id,nick:_1e._nick,category:_1e._category};cr.evt.Send("webim.useraction","add",_21);}catch(e){}return false;},block:function(_22,_23,_24){try{var _25={userid:_22._id,nick:_22._nick,category:_22._category};cr.evt.Send("webim.useraction","block",_25);}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;cr.Extend(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=cr.Extend({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=cr.Extend({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=cr.Extend({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){var _e=this;cr.Require("cr.effect",function(){thisptr.tips=new webim.Tip(webim.config._tip.title,webim.config._tip.content);_e.tips.remenderTip();});}cr.Info("drawing candleman done");return;}this._ldr.Get(this.m_url+_9);},_dp:function(_f){var _10=_f.replace("&semi,",";");_10=_10.replace("&amp,","&");return _10;},_gp:function(cm){if(!cm){return;}var _12=cm.getAttribute("rel");if(typeof _12!="string"||_12==""){_12=cm.innerHTML;if(typeof _12!="string"||_12==""){return;}}var _13=_12.replace("&","&amp,");_13=_13.replace("\\;","&semi,");var _14=_13.split(";");for(var j=_14.length-1;j>=0;j--){_14[j]=this._dp(_14[j]);}return _14;},_gs:function(_16,_17){var _18=_17.getAttribute("cm_icon");var _19=_17.getAttribute("cm_gender");var _1a=_17.getAttribute("cm_online");if(typeof _19!="string"||_19==""||typeof _1a!="string"||_1a==""){return false;}var _1b="0";if(typeof _19!="string"){_1b="0";}else{if(_19.length==1){_1b=_19;}else{_1b=_19.toLowerCase()=="female"?"2":"1";}}if(typeof _1a=="string"&&(_1a.toLowerCase()=="available"||_1a.toLowerCase()=="true")){this.m_st[_16]="on_"+_1b+"_"+_18;}else{this.m_st[_16]="off_"+_1b;}return true;},_ds:function(_1c,_1d){var _1e=this.m_st[_1c];var _1f=this.m_idp+this.m_idn++;var url=this.m_ou;var _21=_1e;if(typeof _1e!="string"||_1e==""){url=this.m_su;_21=webim.libs.passport.convert_userid("passport","chinaren",_1c);}var _22=_1d.getElementsByTagName("img");var _23;if(_22.length>0){_23=_22[0];}else{var _24=webim.config.dst_window.document;_23=_24.createElement("img");}_23.setAttribute("id",_1f);_23.setAttribute("src",url.replace("%1",_21));if(!_23.style){_23.style={};}_23.style.height="12px";_23.style.border="0px";if(_22.length<=0){_1d.appendChild(_23);}},_dd:function(_25){try{for(var _26 in _25){if(typeof _25[_26]=="string"){this.m_st[_26]=_25[_26];}}while(this.m_td.length>0){var cm=this.m_td.shift();var _28=cm.getAttribute("_webim_ppid");this._ds(_28,cm);}this._ldr.Close();}catch(e){}this.draw();},handleData:function(_29,_2a){if(_29.toLowerCase()=="ok"){this._dd(_2a);}},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--){cr.effect.Fade(_3[i],0,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);cr.effect.Fade(_1a,0,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();webim.comm.gPresenceComm=webim.comm.gPresenceComm||new webim.comm.PresenceComm();webim.comm.chG=webim.comm.chG||new webim.comm.ChgroupComm();},handleData:function(){var _1=webim.comm.method.current;_1.HandleData.apply(_1,cr.Array(arguments));},Send:function(_2,_3,_4){return webim.comm.method.current.Send(_2,_3,_4);},CreatePacket:function(_5,_6){var _7=webim.libs.dom.create();if(_6){_7._set_child(_5,_6);}_7._set_attr("from",cr.uid);_7._set_attr("to","messenger.sohu.com");_7._set_attr("sn",(new Date).getTime());_7._set_attr("version","1.0");return _7;},CreateIqPacket:function(_8,_9,_a){var _b=webim.libs.dom.create();_b._set_attr("type",_8);if(_a){_b._set_child(_9,_a);}return this.CreatePacket("iq",_b);},ProceedPacketError:function(_c){try{if(_c._find_attr("type")!="error"){return;}var _d=_c._find_child("error");if(_d.length<=0){return;}var _e=_d[0];if(_e._find_attr("type")=="auth"){cr.evt.Send("WEBIM","CMD_ERROR",{mcmd:"MCMD_AUTH",data:webim.i18n("您还没有登录，请您先登录吧！")});}else{cr.evt.Send("WEBIM","CMD_ERROR",{mcmd:"MCMD_SERVER_RESPONSE",data:_e});}}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,_7){var sn=++this._sn;_5._set_attr("sn",sn);cr.Log("C==>S",_5);this._cache[sn]={done:_6,tm:(new Date()).getTime(),options:_7};var _9=this.Load(sn,_5);if(!_9){delete this._cache[sn];}return _9;},HandleData:function(sn,_b){webim.libs.dom.init(_b.packet);try{var _c=[];var _d=_b.packet._childs();for(var _e in _d){try{var _f=_d[_e];switch(_e){case "roster":var _10=_f[0]._find_attr("available");var _11=_f[0]._find_attr("total");cr.evt.Send("webim.response","roster",{available:_10,total:_11});break;case "message":try{var _12=_f;if(_12.length>0){var _13=0;for(var i=_12.length-1,j=0;i>=0;--i,j++){var _15=new webim.inc.Msg();_15.from_XML(_12[j]);if(_13==0){_13=_15.timestamp;}else{if(_13>_15.timestamp){_13=_15.timestamp;}}_c.push(_15);}if(_13>0){_13--;}webim.comm.gIndicator._last_timestamp=_13;}}catch(e){cr.Error("webim.comm.method.getmsgs",e);}break;case "presence":var _16=[];try{var _17=_f;if(_17.length>0){for(var i=_17.length-1;i>=0;--i){var _18=new webim.inc.Friend();_18.from_XML(_17[i]);if(_18.from&&_18.type=="available"){_18.presence="online";}if(_18.from&&_18.type=="unavailable"){_18.presence="offline";}_16.push(_18);}}}catch(e){cr.Error("webim.comm.method.getfriends",e);}var _19=this._cache[sn].options;if(!(_19&&_19.type=="presenceComm")&&_16.length>0){cr.evt.Send("webim.response","presence",_16);}break;default:cr.evt.Send("webim.response",_e,_f);break;}}catch(e){cr.Warn(e);}}if(_c.length>0){cr.evt.Send("webim.response","message",_c);}else{if(_e!="iq"){cr.evt.Send("WEBIM","CMD_SYS",{mcmd:"MCMD_NONEWMSG"});}}}catch(e){}this._cache[sn].done(_b.packet);this._Unload(sn);},Abort:function(sn){try{var _1b=webim.libs.dom.create();_1b._set_attr("type","cancel");_1b._set_child("aborted",{});var _1c=webim.comm.CreatePacket("error",_1b);this._cache[sn].done(_1c);}catch(e){}this._Unload(sn);},Timeout:function(sn){try{var _1e=webim.libs.dom.create();_1e._set_attr("type","wait");_1e._set_child("timeout",{});var _1f=webim.comm.CreatePacket("error",_1e);this._cache[sn].done(_1f);}catch(e){}this._Unload(sn);},Clear:function(){for(var _20 in this._cache){try{var req=this._cache[_20];if((new Date()).getTime()-req.tm>10000){this.Timeout(_20);}}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.i18n("您输入的消息长度超出了浏览器的限制，请拆分发送")});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.PresenceComm=webim.comm.PresenceComm||cr.Class({initialize:function(){cr.evt.Register("webim.comm.presence",null,cr.func.Bind(this.OnEvt,this));},_get:function(_1){try{var _2=cr.Extend({type:"probe",_ids:[],onComplete:false},_1);var _3=function(_4,_5){webim.comm.ProceedPacketError(_5);if(typeof _4=="function"){_4(_5);}else{try{var _6=_5._find_child("presence");}catch(e){}var _7=[];if(_6.length>0){for(var i=_6.length-1,j=0;i>=0;--i,j++){var _9=new webim.inc.Presence();_9.from_XML(_6[j]);_7.push(_9);}}cr.evt.Send("webim.response","presence.status",_7);}return true;};var _a={type:"presenceComm"};var _b=webim.comm.CreatePacket();for(var j=_2._ids.length-1,i=0;j>=0;j--,i++){var _d=webim.libs.dom.create();_d._set_attr("type",_2.type);if(_2._ids[i]){_d._set_attr("to",_2._ids[i]);}_b._set_child("presence",_d);}webim.comm.Send(_b,cr.func.Bind(_3,this,_2.onComplete),_a);}catch(e){}return false;},OnEvt:function(_e,_f,_10){var _11="_"+_f;if(typeof this[_11]=="function"){this[_11](_10);}}});webim.comm.Indicator=cr.Class({initialize:function(){this._last_timestamp=0;this.bStop=false;this.nTimer=0;this._uTimer={};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,_3){switch(_2){case "start":this.bStop=false;this.Do();break;case "stop":this.bStop=true;if(this.nTimer){window.clearTimeout(this.nTimer);}break;case "userindicator.start":this._u1(_3);break;case "userindicator.stop":this._u2(_3);break;}},onevt2:function(_4,_5,_6){this.onevt("webim.comm.indicator",_6);},Do:function(){this.nTimer=0;try{var _7=webim.libs.dom.create();if(typeof _7._set_value!="function"){cr.Error("webim.libs.dom.create",_7,typeof _7._set_attr,typeof _7._set_value,typeof _7._set_child);return;}_7._set_value(webim.config.position);var _8=webim.libs.dom.create();_8._set_child("position",_7);var _9=webim.libs.dom.create();_9._set_value(this._last_timestamp);_8._set_child("timestamp",_9);var _a=webim.comm.CreatePacket();_a._set_child("presence",_8);webim.comm.Send(_a,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(_b){var _c=[];var _d=[];try{var _e=_b._find_child("presence");if(_e.length>0){for(var i=_e.length-1;i>=0;--i){var _10=new webim.inc.Friend();_10.from_XML(_e[i]);if(_10.from&&_10.type=="available"){_c.push(_10);}if(_10.from&&_10.type=="unavailable"){_d.push(_10);}}}}catch(e){cr.Error("webim.comm.indicator.getfriends",e);}if(_c.length>0){cr.evt.Send("WEBIM","CMD_SYS",{mcmd:"MCMD_BUDDY_ONLINE",data:_c});}if(_d.length>0){cr.evt.Send("WEBIM","CMD_SYS",{mcmd:"MCMD_BUDDY_OFFLINE",data:_d});}},_u1:function(_11){var _12=cr.Extend({userid:null,timestamp:0,startmax:false},_11);if(!_12.userid){return;}if(this._uTimer[_12.userid]){if(_12.timestamp){this._uTimer[_12.userid].Update_timestamp(_12.timestamp);}if(_12.startmax){this._uTimer[_12.userid].Start_max();}else{this._uTimer[_12.userid].Start();}}else{if(_12.timestamp==0){_12.timestamp=this._last_timestamp;}var _13=new webim.comm.UserIndicator(_12.userid,_12.timestamp);this._uTimer[_12.userid]=_13;if(_12.startmax){_13.Start_max();}else{_13.Start();}}},_u2:function(_14){var _15=cr.Extend({userid:null},_14);if(!_15.userid){return;}var _16=this._uTimer[_15.userid];if(!_16){return;}_16.Stop();}});webim.comm.ChgroupComm=webim.comm.ChgroupComm||cr.Class({initialize:function(){cr.evt.Register("webim.comm.useraction","chgroup",cr.func.Bind(this.OnEvt,this));},_chgroup:function(_1){try{var _2=cr.Extend({user:false,gid:0},_1);var _3=function(_4,_5){webim.comm.ProceedPacketError(_5);var _6="";var _7="false";try{var _8=_5._find_child("iq")[0];switch(_8._find_attr("type")){case "result":_7="true";_6=webim.i18n("移动成功");_4.user.gid=_4.gid;break;case "error":var _9=_8._find_child("roster")[0];var _a=_9._find_child("item")[0];var _b=_8._find_child("error")[0];switch(_b._find_attr("type")){case "wait":_6=webim.i18n("服务器内部出错");break;case "auth":_6=webim.i18n("已掉线");break;case "cancel":_6=webim.i18n("移动失败");for(var _c in _b._childs()){switch(_c){case "conflict":_6+=" "+webim.i18n("此用户已在该组中");break;case "not-found":_6+=" "+webim.i18n("此用户不在您的好友列表中");break;case "not-acceptable":_6+=" "+webim.i18n("好友列表已满");}}break;}break;default:_6=webim.i18n("移动失败");break;}}catch(e){_6=webim.i18n("移动失败");}cr.evt.Send("webim.changegid","result",{friend:_4.user,result:_7,info:_6});};var _d=webim.libs.dom.create();_d._set_attr("jid",_2.user.id);_d._set_attr("action","chgroup");var _e=webim.libs.dom.create();_e._set_value(_2.gid);_d._set_child("group",_e);var _f=webim.libs.dom.create();_f._set_child("item",_d);var _10=webim.comm.CreateIqPacket("set","roster",_f);webim.comm.Send(_10,cr.func.Bind(_3,this,_2));}catch(e){}return false;},OnEvt:function(cmd,_12,_13){var _14="_"+_12;if(typeof this[_14]=="function"){this[_14](_13);}}});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();},onrefresh2:function(_5,_6,_7){this.onevt("webim.cache.refresh",_7.cmd,_7.data);},ondata:function(_8,_9,_a){this._data[_9]=_a;this._refreshing[_9]=false;this._last_timestamp[_9]=+new Date;var _b=this.set_localData(_9,_a);cr.evt.Send("webim.cache.ready",_9,_a);},setProfile:function(_c,_d){if(_c){var ui=new webim.config.dst_window.webim.inc.UserInfo();ui.from_JSON(_c);_c=ui;}else{if(!webim.config._ns.webim.sys.gUserInfo){return;}_c=webim.config._ns.webim.sys.gUserInfo;}webim.comm.profile.setProfile(_c,_d);},setProfileResult:function(_f,_10){if(_f.result=="true"){this.onrefresh(null,"profile");}if(_10){_10(null,"profile",_f);}},getBuddyList:function(_11,_12,_13){return this._getData("buddy",_11,_12,_13);},getProfile:function(_14,_15,_16){return this._getData("profile",_14,_15,_16);},_getData:function(_17,_18,_19,_1a){if(_1a){this.onrefresh(null,_17,_19);return false;}var r=this._data[_17];if(!this._data[_17]){if(this._initData(_17,_19)){return this._data[_17];}}else{if(this.ValidData(_17)){_19(null,_17,this._data[_17]);return this._data[_17];}}if(_18){this.onrefresh(null,_17,_19);return false;}else{return r;}},ValidData:function(_1c){var mgr=this.get_storageManager();var _1e=mgr.GetTimestamp(cr.uid+":"+_1c);var _1f=parseInt(new Date().getTime())-parseInt(_1e);if(_1f<this.expires){return true;}return false;},_initData:function(_20,_21,_22){var _23=this.get_localData(_20);if(_23){this._data[_20]=_23;_21(null,_20,_23);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(_24){try{if(!this.ValidData(_24)){return false;}var v=this.get_storageManager().getLocalStorage(cr.uid+":"+_24);if(v){return this._fromLocalData(_24,v);}else{return false;}}catch(e){return false;}},set_localData:function(_26,_27){_27=this._toLocalData(_26,_27);try{if(_27){var _28=this.get_storageManager();var key=cr.uid+":"+_26;if(_28.setLocalStorage(key,_27)){_28.SetTimestamp(key,(new Date()).getTime());}return true;}}catch(e){}return false;},_toLocalData:function(_2a,_2b){try{switch(_2a){case "profile":var _2c={};cr.Extend(_2c,_2b._cache);_2b=cr.Json(_2c);break;case "buddy":if(_2b.friends.length>0){var _2c={};cr.Extend(_2c,_2b);_2b=cr.Json(_2c);}else{return false;}break;}return _2b;}catch(e){return false;}},_fromLocalData:function(_2d,_2e){try{switch(_2d){case "profile":var _2f=eval("("+_2e+")");var _30=new webim.config.dst_window.webim.inc.UserInfo();if(!(_2f&&_2f.hasOwnProperty("id"))){cr.Warn("Invalid data type: profile ",_2f);return false;}_30._cache=_2f;_2e=_30;break;case "buddy":_2e=eval("("+_2e+")");if(!(_2e&&_2e.hasOwnProperty("friends")&&_2e.friends.length>0)){cr.Warn("Invalid data type: buddy ",_2e);return false;}break;}return _2e;}catch(e){return false;}}});webim.cache.gCache=null;webim.profile=new (cr.Class(webim.inc.UserInfo,{initialize:function(){this.InitBase(webim.inc.UserInfo);this.init=false;},Init:function(){if(!this.init){this.init=true;cr.evt.Register("webim.cache.ready","profile",cr.func.Bind(this.OnLoad,this));}},GetProfile:function(){return this._cache;},Load:function(_1){var _2=_1?_1:true;try{webim.cache.gCache.getProfile(true,webim.profile.OnLoad,_2);}catch(e){}return false;},OnLoad:function(_3,_4,_5){cr.Extend(webim.profile,_5);cr.Provide("webim.profile");try{webim.Init._Profile();}catch(e){cr.Warn(e);}},IdLimit:function(_6){return this._s(_6,webim.sys.gConfig.get("profile","idL"));},NickLimit:function(_7){return this._s(_7,webim.sys.gConfig.get("profile","nickL"));},_s:function(_8,_9){var _a=cr.str.CutStrHZ(_8,_9);if(_a!=_8){_a=_a+"..";}return _a;}}))();webim.message_adapter=webim.message_adapter||new (cr.Class({initialize:function(){this.INIT=false;},Init:function(){if(!this.INIT){cr.evt.Register("webim.response","message",cr.func.Bind(this.OnMsg,this));cr.evt.Register("webim.response","history",cr.func.Bind(this.onHistory,this));cr.evt.Register("webim.response","buddyonline",cr.func.Bind(this.onBuddyOL,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));}this.INIT=true;},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=="unavailable"){_8.push(_a);}}if(_7.length>0){cr.evt.Send("webim.response","buddyonline",_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.imwindow","message",_d);},onHistory:function(_e,_f,_10){cr.evt.Send("webim.imwindow","historymessage",_10);},onBuddyOL:function(cmd,_12,_13){cr.evt.Send("webim.risen","openrisenwin",{buddy:_13});}}));webim.products={c:["chinaren/alumni","chinaren/club","chinaren/xiaonei","chinaren/xiaowai","sohu/im","sohu/blog","sogou/s","sohu/bbs","17173","sohu/mail","sohu/digi","sohu/auto","sohu/family","sohu/sns","chinaren/kids","sohu/sports/boss"],n:["ChinaRen校友录","ChinaRen社区","ChinaRen空间","ChinaRen群组","搜狐小纸条","搜狐博客","搜狐说吧","搜狐社区","17173","搜狐邮件","搜狐数码公社","搜狐汽车社区","搜狐Family","搜狐SNS","中国人·幼儿园","篮球大亨"],g:["校友录同学","CR社区好友","空间好友","群组好友","纸条好友","博友","说吧好友","搜狐社区好友","17173好友","邮件好友","数码好友","我的车友","公司好友","SNS好友","幼儿园好友","篮球大亨好友"],pn:[1,0,2,3,4,5,6,7,8,9,10,11,12,13,14,15],_get:function(_1,_2){for(var i=0;i<webim.products.c.length;i++){if(webim.products.c[i]==_1){return webim.products[_2][i];}}return "";},getCateGroupName:function(_4){return webim.products._get(_4,"g");},getName:function(_5){return webim.products._get(_5,"n");},getProfileUrl:function(_6,_7){if(!_6||!_7){return "#";}var pn=webim.products.getPn(_7);var ed=0;if("sohu/sns"===_7){_6=webim.utils.BASE64.encode(_6);ed=1;}return "http://profile.chinaren.com/zhs/usergoto.jsp?uid="+_6+"&pn="+pn+"&ed="+ed;},getNickUrl:function(_a,_b){if(!_a||!_b){return "#";}var pn=webim.products.getPn(_b);var ed=0;if("sohu/sns"===_b){_a=webim.utils.BASE64.encode(_a);ed=1;}return "http://profile.chinaren.com/zhs/profilegoto.jsp?uid="+_a+"&pn="+pn+"&ed="+ed;},getPn:function(_e){return webim.products._get(_e,"pn");}};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.im.window",null,cr.func.Bind(this.OnImEvt,this));},OnImEvt:function(_1,_2,_3){var _4=_3;var _5=_4.GetWin();var _6=_4.GetUid();var _7=_5.GetStyles();var _8=_5.GetDisplayState();var s="s";switch(_8){case "show":s="s";break;case "minimize":s="m";break;case "close":s="c";break;default:break;}this.windowList[_6]={w:_6,s:s,u:_6,n:_4.GetUnick(),x:_7.width,y:_7.height};this.Save("w",this.windowList);},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;},_Save:function(_a){if(cr.browser.isIE6&&cr.Json(_a).length>2048){return;}_a.u=cr.uid;cr.cookie.Set(this.n,cr.Json(_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.WinSizeManager=webim.WinSizeManager||cr.Class({initialize:function(){this.n="webimSize";this.p="/";this.u=cr.utils.GetRootDomain(window.location.hostname);this.t=new Date(new Date().getTime()+7*24*60*60*1000);this._check();this.size=this.Get(this.n)||{};cr.evt.Register("webim.im.window","resize",cr.func.Bind(this.OnImResize,this));cr.evt.Register("webim.buddylist.window","resize",cr.func.Bind(this.OnBuddyWinResize,this));},GetImSize:function(_1){if(this.size[_1]){return {width:this.size[_1].w,height:this.size[_1].h};}return null;},GetBuddyWinSize:function(){return this.GetImSize("buddyWin");},_check:function(){var _2=this.Get();if(_2.u!=cr.uid){this.Save(this.n,{});}},_Save:function(_3){if(cr.browser.isIE6&&cr.Json(_3).length>2048){return;}_3.u=cr.uid;cr.cookie.Set(this.n,cr.Json(_3),this.t,this.p,this.u);},Save:function(_4,_5){var _6=this.Get();_6[_4]=_5;this._Save(_6);},Get:function(_7){this.v={};try{var _8=cr.cookie.Get(this.n);if(_8==""){_8="{}";}eval("this.v="+_8);}catch(e){cr.Error(e);}return _7?this.v[_7]:this.v;},OnImResize:function(_9,_a,_b){var _c=_b.GetWin();var _d=_b.GetUid();var _e=_c.GetStyles();this.size[_d]={w:_e.width,h:_e.height};this.Save(this.n,this.size);},OnBuddyWinResize:function(_f,_10,_11){var ctr=_11.GetCtr();var _13=ctr.GetStyles();this.size["buddyWin"]={w:_13.width,h:_13.height};this.Save(this.n,this.size);}});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.net"],function(){webim.loader();cr.Require(["cr.ctrl","cr.ctrl.menu"],function(){webim.Bootstrap();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/loader";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.Init.LoadOnDemand();}catch(e){}webim.comm.Init();webim.LoadCurrentUser();if(webim.config.esc_key){webim.Init.EscKey();}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{var _7=document.location.host;if(webim.config.load_panel&&(webim.config.load_panel===true||/.*.chinaren.com/.test(_7)||cr.Array.In(["news.sohu.com","it.sohu.com","yule.sohu.com","music.sohu.com","music.yule.sohu.com","v.sohu.com","tv.sohu.com","data.yule.sohu.com","data.tv.sohu.com","app.yule.sohu.com"],_7))){if("tv.sohu.com"==document.location.host){return;}var _8=document.createElement("div");_8.setAttribute("id","webim_panel_div");webim.config._dst_container.appendChild(_8);cr.Require([["webim.panel",webim.imageBase+"/js/panel."+webim.majorVersion+".js"]]);}webim.chatV=new webim.ChatV();}catch(e){alert(e);}};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={};}cr.Extend(_a.style,{position:"absolute",top:"0px",left:"0px",zIndex:"9999"});_9.body.insertBefore(_a,_9.body.firstChild);}_a.className="CrSW";webim.config._dst_container=_a;};webim.Init.LoadOnDemand=function(){var _b=webim.loadOnDemand=webim.loadOnDemand||{};_b.s=_b.s||new webim.LoadOnDemand("webim.sound","sound");_b.im=_b.im||new webim.LoadOnDemand("webim.imwindow","imwindow");_b.ua=_b.ua||new webim.LoadOnDemand("webim.useraction","useraction");_b.ga=_b.ga||new webim.LoadOnDemand("webim.groupaction","groupaction");_b.bl=_b.bl||new webim.LoadOnDemand("webim.buddylist","buddylist");_b.set=_b.set||new webim.LoadOnDemand("webim.set","set");_b.sysmes=_b.sysmes||new webim.LoadOnDemand("webim.sysmes","sysmes");_b.risen=_b.risen||new webim.LoadOnDemand("webim.risen","risen");_b.login=_b.login||new webim.LoadOnDemand("webim.loginwindow","loginwindow");};webim.Init.EscKey=function(){var _c=webim.config.dst_window;var _d=0;var _e=function(_f){if(_f.keyCode=="27"){var _10=(new Date()).getTime();if(_10-_d<=webim.sys.gConfig.get("windows","dblClickTime")){webim.api.show_buddyWin();_d=0;if(cr.browser.isGecko){cr.event.stop(_f);}return false;}_d=_10;if(cr.browser.isGecko){cr.event.stop(_f);}}};cr.event.observe(_c.document,"keydown",_e);};webim.LoadCurrentUser=function(){cr.Require.Uid(function(){if(cr.uid!=""){webim.Init.Indicate();webim.profile.Init();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(){try{webim.playsound.Init();webim.title.Init();webim.message_adapter.Init();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.sizeMgr=webim.sizeMgr||new webim.WinSizeManager();};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(_1,_2){this._l=false;this._n=_1;this._f=_2;this._id=cr.evt.Register(_1,null,cr.func.Bind(this.delay,this));this._c=[];},delay:function(_3,_4,_5){if(_4&&_4=="ready"){return;}var _6=cr.uid||webim.profile.GetID();if(typeof _6!=="string"&&_3!=="webim.loginwindow"){var _7=webim.i18n("欢迎您使用<a href=\"http://me.sohu.com/\" target=\"_blank\">搜狐小纸条</a>！<br/>"+"使用此功能需先登录搜狐通行证。若您还不是搜狐通行证用户，请<a href=\"http://passport.sohu.com/web/reguser\" target=\"_blank\">注册新用户</a><br/>");webim.api.show_login(_7);this._c.push([_3,_4,_5]);var _8=this;cr.evt.RegisterOnce("webim","login",function(){webim.api.get_profile(function(_9){_8._pop();});});return;}if(this._l){return;}var _8=this;_8._c.push([_3,_4,_5]);try{webim.loadingTip.Show(webim.config._loadingtip.content);}catch(e){}cr.Require([[this._n,webim.imageBase+"/js/"+this._f+"."+webim.majorVersion+".js"]],function(){_8._l=true;_8._clear();_8._pop();});return;},_clear:function(){webim.loadingTip.Hide();},_pop:function(){cr.Array.EraseIf(this._c,function(_a){cr.evt.Send(_a[0],_a[1],_a[2]);return true;});}});webim.loadingTip=webim.loadingTip||{Show:function(_1,_2){_2=_2||window;try{var _3=cr.utils.GetPagePosition(webim.config.dst_window);if(!webim.loadingTip.o){var _4=webim.loadingTip.o=new cr.ctrl.Container(this.dstwin);_4.setStyle({border:"1px white solid",textAlign:"center",opacity:0.7,position:"absolute",height:"23px",width:"180px",color:"white",paddingTop:"10px",backgroundColor:"black"});_4.setInnerHTML("<span style='color:white;font-size:12px;'>"+_1+"</span>");_4.appendTo(webim.config._dst_container);}var _4=webim.loadingTip.o;_4.setStyle({top:(_3.clientHeight/2+_3.scrollTop-10)+"px",left:(_3.clientWidth/2+_3.scrollLeft-90)+"px"});_4.show();}catch(e){cr.Warn(e);}},Hide:function(){try{webim.loadingTip.o.hide();}catch(e){}}};webim.loader.Config();webim.load();webim.ChatV=webim.ChatV||cr.Class({initialize:function(){this.url=webim.config.chatv_url;this._win=window;this.m_doc=this._win.document;this.body=this.m_doc.getElementsByTagName("body")[0];cr.evt.Register("webim.im.window","show",cr.func.Bind(this.GetScript,this));},GetScript:function(){var _1=this.url+"?"+(new Date()).getTime();var _2=this.m_doc.createElement("script");_2.setAttribute("type","text/javascript");_2.setAttribute("charset","gbk");_2.setAttribute("src",_1);this.body.appendChild(_2);}});webim.chatv=function(_3){try{cr.evt.Send("webim.imwindow","updateChatV",_3);}catch(e){}};