var cr=cr||{};cr.imgBase=cr.imgBase||"http://images.chinaren.com/product/webim/libs";cr.version=cr.version||"0.2.10";cr.jsext=cr.jsext||".js";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.Privide||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(_1.length){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;};var spanel=spanel||{imageBase:"http://images.chinaren.com/product/webim/panel",version:"0.2.22",jsext:".js"};if(typeof sas=="undefined"){var sas=new Object();}if(typeof sas.ued=="undefined"){sas.ued=new Object();}if(typeof sas.ued.util=="undefined"){sas.ued.util=new Object();}if(typeof sas.ued.FlashObjectUtil=="undefined"){sas.ued.FlashObjectUtil=new Object();}sas.ued.FlashObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a,_b){if(!document.createElement||!document.getElementById){return;}this.DETECT_KEY=_b?_b:"detectflash";this.skipDetect=sas.ued.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();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 sas.ued.PlayerVersion(_5.toString().split(".")));}this.installedVer=sas.ued.FlashObjectUtil.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);}};sas.ued.FlashObject.prototype={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;},getFlashHTML:function(){var _1c="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");}_1c="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\"";_1c+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _1d=this.getParams();for(var key in _1d){_1c+=[key]+"=\""+_1d[key]+"\" ";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_1c+="flashvars=\""+_1f+"\"";}_1c+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");}_1c="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\">";_1c+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var _1d=this.getParams();for(var key in _1d){_1c+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_1c+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_1c+="</object>";}return _1c;},write:function(_20){if(this.useExpressInstall){var _21=new sas.ued.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!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 _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getFlashHTML();}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}}};sas.ued.FlashObjectUtil.getPlayerVersion=function(_23,_24){var _25=new sas.ued.PlayerVersion(0,0,0);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_25=new sas.ued.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);_25=new sas.ued.PlayerVersion([i,0,0]);}}catch(e){}if(_23&&_25.major>_23.major){return _25;}if(!_23||((_23.minor!=0||_23.rev!=0)&&_25.major==_23.major)||_25.major!=6||_24){try{_25=new sas.ued.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}catch(e){}}}return _25;};sas.ued.PlayerVersion=function(_29){this.major=parseInt(_29[0])||0;this.minor=parseInt(_29[1])||0;this.rev=parseInt(_29[2])||0;};sas.ued.PlayerVersion.prototype.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;};sas.ued.util={getRequestParameter:function(_2b){var q=document.location.search||document.location.href.hash;if(q){var _2d=q.indexOf(_2b+"=");var _2e=(q.indexOf("&",_2d)>-1)?q.indexOf("&",_2d):q.length;if(q.length>1&&_2d>-1){return q.substring(q.indexOf("=",_2d)+1,_2e);}}return "";}};if(Array.prototype.push==null){Array.prototype.push=function(_2f){this[this.length]=_2f;return this.length;};}var getQueryParamValue=sas.ued.util.getRequestParameter;var sohuFlash=sas.ued.FlashObject;function Cookie(_30,_31,_32,_33,_34,_35){this.$document=_30;this.$name=_31;this.$expiration=_32?new Date((new Date()).getTime()+_32*3600000):null;this.$path=_33?_33:null;this.$domain=_34?_34:null;this.$secure=_35;}Cookie.prototype.store=function(){var _36="";for(var _37 in this){if((_37.charAt(0)=="$")||((typeof this[_37])=="function")){continue;}if(_36!=""){_36+="&";}_36+=_37+":"+escape(this[_37]);}var _38=this.$name+"="+_36;if(this.$expiration){_38+="; expires="+this.$expiration.toGMTString();}if(this.$path){_38+="; path="+this.$path;}if(this.$domain){_38+="; domain="+this.$domain;}if(this.$secure){_38+="; secure";}this.$document.cookie=_38;};Cookie.prototype.load=function(){var _39=this.$document.cookie;if(_39==""){return false;}var _3a=_39.indexOf(this.$name+"=");if(_3a==-1){return false;}_3a+=this.$name.length+1;var end=_39.indexOf(";",_3a);if(end==-1){end=_39.length;}var _3c=_39.substring(_3a,end);var a=_3c.split("&");for(var i=0;i<a.length;i++){a[i]=a[i].split(":");}for(var i=0;i<a.length;i++){this[a[i][0]]=unescape(a[i][1]);}return true;};Cookie.prototype.remove=function(){var _3f;_3f=this.$name+"=";if(this.$path){_3f+="; path="+this.$path;}if(this.$domain){_3f+="; domain="+this.$domain;}_3f+="; expires=Fri, 02-Jan-1970 00:00:00 GMT";this.$document.cookie=_3f;};var spanel_config=spanel_config||{};spanel.config=spanel.config||{userCss:false,mini:false,debug:false,divId:"spanel",applets:false};spanel.state=spanel.state||{shrink:false};spanel.Load=function(){cr.Require(["cr.core","cr.ext","cr.effect","cr.window"],spanel.Init,spanel.Error.Require);};spanel.Init=spanel.Init||function(){var _1=spanel;var _2=_1.config;if(_1._ready){return;}_1._ready=true;var _3=document.getElementsByTagName("head")[0];var _4=document.createElement("link");_4.setAttribute("type","text/css");_4.setAttribute("rel","stylesheet");_4.setAttribute("charset","gbk");if(cr.browser.isNstdIE){_4.setAttribute("href",_1.imageBase+"/css/style_ie."+_1.version+".css");}else{if(cr.browser.isIE6){_4.setAttribute("href",_1.imageBase+"/css/style_ie6."+_1.version+".css");}else{_4.setAttribute("href",_1.imageBase+"/css/style."+_1.version+".css");}}_3.appendChild(_4);for(var _5 in _2){if(typeof spanel_config[_5]!="undefined"){_2[_5]=spanel_config[_5];}}if(_2.debug){cr.logLevel=0;}if(_2.userCss&&typeof _2.userCss=="string"){var _6=document.createElement("link");_6.setAttribute("type","text/css");_6.setAttribute("rel","stylesheet");_6.setAttribute("charset","gbk");_6.setAttribute("href",_2.userCss);_3.appendChild(_6);}if(cr.browser.isIE6||cr.browser.isNstdIE){_2.mini=true;}_1.sdom=document.getElementById(_2.divId);_1.sdom_css=new cr.Css(_1.sdom);_1.sdom_css.setClassName("CrSP");_1.sfloat=new cr.effect.Float(window,_1.sdom,true,true);_1.sfloat.start(0,0);_1.sdom.innerHTML="<div class='CrSP_mix'></div>"+"<table cellspacing='0' cellpadding='0' class='CrSP_bg'>"+"<tr>"+(_2.mini?"":"<td>&nbsp;</td>")+"<td style='width:10px'>"+"<table cellspacing='0' cellpadding='0' class='CrSP_bar'>"+"<tr class='CrSP_bar'></tr>"+"</table>"+"</td>"+"</tr>"+"</table>";_1.dom=_1.sdom.getElementsByTagName("tr")[1];_1.mix=_1.sdom.getElementsByTagName("div")[0];_1.Mini(_2.mini);_1.Shrink(_1.sync.Get("s"));_1.Init.Uid();};spanel.Init.Uid=spanel.Init.Uid||function(){if(cr.passport.IsAvaliable()){cr.uid=cr.passport.GetCurrentuser();spanel.Init._Uid();}else{cr.Delete("cr.uid");cr.Require.Uid(spanel.Init._Uid);}};spanel.Init._Uid=spanel.Init._Uid||function(){if(typeof cr.uid!="string"||cr.uid==""){spanel.Error.Auth();}else{if(!spanel.config.mini){spanel.Mini(false);}}spanel.Init.Applets();var _1=new cr.Css(document.getElementsByTagName("body")[0]);var _2=_1.getStyle("paddingBottom");_2=parseInt(_2)+25+"px";_1.setStyle({paddingBottom:_2});};spanel.Init.Applets=spanel.Init.Applets||function(){cr.Require([["spanel.applets",spanel.imageBase+"/js/applets."+spanel.version+spanel.jsext]],spanel.Init._Applets);};spanel.Init._Applets=spanel.Init._Applets||function(){spanel.applets.Init();spanel.Init.Plugins();};spanel.Init.Plugins=spanel.Init.Plugins||function(){cr.Require([["spanel.plugins",spanel.imageBase+"/js/plugins."+spanel.version+spanel.jsext]],spanel.Init._Plugins);};spanel.Init._Plugins=spanel.Init._Plugins||function(){try{new spanel.plugins.webim.Window();}catch(e){cr.Error("spanel.Init.Plugins",e);}spanel.Init.WebIM();cr.Provide("spanel");};spanel.Init.WebIM=spanel.Init.WebIM||function(){var _1="http://images.sohu.com/cs/sohuim/xiaozt/version/2.0/js/loader.sohu.js";if(/.*.chinaren.com/.test(document.location.host)){_1="http://images.chinaren.com/product/webim/version/2.0/js/loader.cr.js";}cr.Require([["webim.loader",_1]],spanel.Init._WebIM);};spanel.Init._WebIM=spanel.Init._WebIM||function(){if(typeof cr.uid!="string"||cr.uid==""){return;}try{var _2=webim.majorVersion.split(".");if(!/demo|test/.test(_2)){var v0=parseInt(_2[0]);var v1=parseInt(_2[1]);var v2=parseInt(_2[2]);if(!(v0>1||v1>6||(v1==6&&v2>=7))){return spanel.Error();}}}catch(e){}webim_config._padding_bot=25;spanel.buddyList.Enable();};spanel.utils=spanel.utils||{GetStickPos:function(_1,_2,_3){return [-2000,-2000];},StickTo:function(_4,_5,_6,_7,_8,_9){if(!_7){_7=0;}if(!_8){_8=0;}var _a=cr.utils.GetOffset(_5);var _b=cr.utils.GetPagePosition(window);var _c=_5.clientWidth;var _d=_4.clientWidth;var _e=_a[0]+_c-_d;var _f=new cr.Css(_5);var _10=0;try{_10=parseInt(_f.getStyle("borderLeftWidth"));}catch(e){}var _11=0;try{_11=parseInt(_f.getStyle("borderRightWidth"));}catch(e){}if(isNaN(_10)){_10=0;}if(isNaN(_11)){_11=0;}var _12=_b.clientWidth-_a[0]-_c-_10-_11-_7;var _13=_b.clientHeight-_a[1]-_8;if(cr.browser.isNstdIE||cr.browser.isIE6){_12+=_b.scrollLeft;_13+=_b.scrollTop;}_6.start(_12,_13);}};spanel.Error=spanel.Error||function(){spanel.dom.className="CrsPhide";};spanel.Error.Auth=spanel.Error.Auth||function(){spanel.sdom_css.addClassName("CrSP_s");};spanel.Error.Require=spanel.Error.Require||function(){spanel.dom.className="CrSPhide";};spanel.Sync=cr.Class({initialize:function(){this.c={};this.n="spanel";this.p=null;this.u=null;},Register:function(_1,_2){this.c[_1]=_2;},_Save:function(_3){if(cr.browser.isIE6&&cr.json.Object(_3).length>2048){return;}_3.u=cr.uid;cr.cookie.Set(this.n,cr.json.Object(_3),null,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;},Sync:function(){var _9=this.Get();if(_9.u!=cr.uid){this._Save({});return;}for(var _a in _9){var _b=this.c[_a];if(typeof _b=="function"){try{_b(_9[_a]);}catch(e){}}}}});spanel.sSync=cr.Class(spanel.Sync,{Init:function(){this.p="/";this.u=cr.utils.GetRootDomain(window.location.hostname);window.setInterval(cr.func.Bind(this.Sync,this),2000);cr.evt.Send("spanel.sync","ready");}});spanel.sync=spanel.sync||new spanel.sSync();cr.Require("cr.core",function(){spanel.sync.Init();cr.evt.RegisterOnce("spanel","ready",cr.func.Bind(spanel.sync.Sync,spanel.sync));});spanel.Shrink=spanel.Shrink||function(_1){try{var _2=spanel;var _3=_2.config;var _4=_2.state;var _5=_2.sdom_css;if((_4.shrink&&_1)||(!_4.shrink&&!_1)){return;}_4.shrink=_1;_2.sync.Save("s",_1?1:0);if(_1){_5.addClassName("CrSP_s");_5.addClassName("CrSPshrink");}else{if(!_3.mini){_5.removeClassName("CrSP_s");}_5.removeClassName("CrSPshrink");}cr.evt.Send("spanel","shrink",_1);}catch(e){cr.Error("spanel.Shrink",e);}};spanel.sync.Register("s",spanel.Shrink);cr.Require("cr.core",function(){cr.evt.Register("plugin.webim.window","predocreate",cr.func.Bind(spanel.Shrink,spanel,false));cr.evt.Register("plugin.webim.window","predoshow",cr.func.Bind(spanel.Shrink,spanel,false));});spanel.Mini=spanel.Mini||function(_1){var _2=spanel;var _3=_2.sdom_css;if(_1){_3.addClassName("CrSP_s");}else{if(!_2.state.shrink){_3.removeClassName("CrSP_s");}}};spanel.Load();