if(!CRJ){
var CRJ={Version:"0.1"};
}

Object.CRExtend=function(_1,_2){
for(var _3 in _2){
_1[_3]=_2[_3];
}
return _1;
};
if(!window.Element){
var Element=new Object();
}
Element.CRMethods={_bExtended:true,GetOffset:function(_4){
var _5=0;
var el=this;
while(el!=null){
_5+=el["offset"+_4];
el=el.offsetParent;
}
return _5;
},Show:function(_7){
if(!this.style){
return;
}else{
if(_7||(arguments.length==0&&this.style.display=="none")){
this.style.display="";
}else{
this.style.display="none";
}
}
},SubElem:function(_8,_9){
if(!_9){
_9="span";
}
var _a=this.getElementsByTagName(_9);
for(var i=0;i<_a.length;i++){
if(_a[i].getAttribute("name")==_8){
return CR$(_a[i]);
}
}
},SubElems:function(_c,_d){
if(!_d){
_d="span";
}
var _e=this.getElementsByTagName(_d);
var _f=[];
for(var i=0;i<_e.length;i++){
if(_e[i].getAttribute("name")==_c){
_f.push(CR$(_e[i]));
}
}
return _f;
},ClearChilds:function(){
for(var i=this.childNodes.length-1;i>=0;i--){
this.removeChild(this.childNodes[i]);
}
},SetOpacity:function(_12){
if(window.ActiveXObject){
this.style.filter="alpha(opacity="+(_12*100)+");";
}else{
this.style.opacity=_12;
}
}};
if(typeof HTMLElement!="undefined"){
Object.CRExtend(HTMLElement.prototype,Element.CRMethods);
}
function CR$(){
if(arguments.length==1){
return get$(arguments[0]);
}
var _13=[];
for(var i=0;i<arguments.length;i++){
_13.push(get$(arguments[i]));
}
return _13;
function get$(_15){
if(typeof _15=="string"){
_15=document.getElementById(_15);
}
if(_15&&!_15._bExtended&&_15.tagName&&_15!=window){
Object.CRExtend(_15,Element.CRMethods);
}
return _15;
}
}
function CR$A(_16){
if(!_16){
return [];
}
if(_16.toArray){
return _16.toArray();
}
var _17=[];
for(var i=0;i<_16.length;i++){
_17.push(_16[i]);
}
return _17;
}
function CR$P(key){
var cgi=window.location.href;
var idx=cgi.indexOf("?");
if(idx!=-1){
cgi=cgi.substring(idx+1);
var _1c=new Array();
if(cgi.indexOf("&")!=-1){
var spl=cgi.split("&");
for(i=0;i<spl.length;i++){
if(spl[i].indexOf("=")!=-1){
var _1e=spl[i].split("=");
_1c[_1e[0]]=_1e[1];
}
}
}else{
if(cgi.indexOf("=")!=-1){
var _1e=cgi.split("=");
_1c[_1e[0]]=_1e[1];
}
}
}
if(_1c&&_1c[key]){
return decodeURI(_1c[key]);
}
return "";
}
function CRCreateElement(_1f,_20,_21,_22){
var _23=document.createElement(_1f);
for(var _24 in _20){
_23.setAttribute(_24,_20[_24]);
}
for(var _24 in _21){
_23.style[_24]=_21[_24];
}
if(_22){
_22.appendChild(_23);
}
return CR$(_23);
}

Function.prototype.bind=function(){
var _1=this,args=CR$A(arguments),object=args.shift();
return function(){
return _1.apply(object,args.concat(CR$A(arguments)));
};
};
Function.prototype.CallWith=function(){
var _2=this,args=CR$A(arguments);
return function(){
return _2.apply(this,args.concat(CR$A(arguments)));
};
};

if(!CRJ){
var CRJ={};
}
if(!CRJ.Window){
CRJ.Window={};
}
CRJ.Window.GetScrollInfo=function(_1,_2){
if(!_2){
_2=window;
}
var _3=0;
var _4=0;
if(typeof _2.pageYOffset!="undefined"){
_4=1;
}else{
if(typeof document.compatMode!="undefined"&&document.compatMode!="BackCompat"){
_4=2;
}else{
if(typeof document.body!="undefined"){
_4=0;
}
}
}
switch(_1.toUpperCase()){
case "Y":
if(_4==1){
_3=_2.pageYOffset;
}else{
if(_4==2){
_3=_2.document.documentElement.scrollTop;
}else{
if(_4==0){
_3=_2.document.body.scrollTop;
}
}
}
break;
case "X":
if(_4==1){
_3=_2.pageXOffset;
}else{
if(_4==2){
_3=_2.document.documentElement.scrollLeft;
}else{
if(_4==0){
_3=_2.document.body.scrollLeft;
}
}
}
break;
case "HEIGHT":
if(_4==1||_4==2){
_3=_2.document.documentElement.scrollHeight;
}else{
_3=_2.document.body.scrollHeight;
}
break;
case "WIDTH":
if(_4==1||_4==2){
_3=_2.document.documentElement.scrollWidth;
}else{
_3=_2.document.body.scrollWidth;
}
break;
}
return parseInt(_3);
};
CRJ.Window.GetInnerInfo=function(_5,_6){
if(!_6){
_6=window;
}
var _7=0;
var _8=0;
if(typeof _6.innerHeight!="undefined"){
_8=1;
}else{
if(_6.document.documentElement&&_6.document.documentElement.clientHeight){
_8=2;
}
}
switch(_5.toUpperCase()){
case "HEIGHT":
if(_8==1){
_7=_6.innerHeight;
}else{
if(_8==2){
_7=_6.document.documentElement.clientHeight;
}else{
_7=_6.document.body.clientHeight;
}
}
break;
case "WIDTH":
if(_8==1){
_7=_6.innerWidth;
}else{
if(_8==2){
_7=_6.document.documentElement.clientWidth;
}else{
_7=_6.document.body.clientWidth;
}
}
break;
}
return parseInt(_7);
};

if(!Cajax){
var Cajax=function(_1,_2){
this.onSuccess=function(){
};
this.onFailure=function(){
};
this.onAbort=function(){
};
this.onSending=function(){
};
this.onReceiving=function(){
};
this.SetOptions(_1,_2);
this.GetRequest();
};
}
Cajax.prototype.SetOptions=function(_3,_4){
if(typeof _3=="function"){
this.onSuccess=_3;
}
if(typeof _4=="function"){
this.onFailure=_4;
}
};
Cajax.prototype.SetOption=function(_5){
for(var _6 in _5){
if(typeof _5[_6]!="undefined"){
this[_6]=_5[_6];
}
}
};
Cajax.prototype.GetRequest=function(){
this.request=null;
if(window.XMLHttpRequest){
this.request=new XMLHttpRequest();
if(this.request.overrideMimeType){
this.request.overrideMimeType("text/xml");
}
}else{
try{
this.request=new ActiveXObject("Msxml2.XMLHTTP");
}
catch(e){
try{
this.request=new ActiveXObject("Microsoft.XMLHTTP");
}
catch(e){
if(CRJ&&CRJ.Dump){
CRJ.Dump("exception in Cajax.prototype.GetRequest",e);
}
}
}
}
if(!this.request){
return false;
}
};
Cajax.prototype.OnStateChange=function(){
switch(this.request.readyState){
case 2:
this.onSending(this.request);
break;
case 3:
this.onReceiving(this.request);
break;
case 4:
if(this.request.status==200){
this.onSuccess(this.request);
}else{
this.onFailure(this.request);
}
break;
}
};
Cajax.prototype.Post=function(_7,_8,_9){
if(!this.request){
return false;
}
if(typeof _9=="undefined"){
_9=true;
}
this.request.open("POST",_7,_9);
this.request.onreadystatechange=this.OnStateChange.bind(this);
if(typeof _8=="undefined"){
this.request.send(null);
}else{
this.request.send(_8);
}
if(!_9){
return this.request;
}
return true;
};
Cajax.prototype.Get=function(_a,_b,_c){
if(!this.request){
return false;
}
if(typeof _c=="undefined"){
_c=true;
}
this.request.open("GET",_a,_c);
this.request.onreadystatechange=this.OnStateChange.apply(this);
this.request.send(null);
if(!_c){
return this.request;
}
return true;
};
Cajax.prototype.Abort=function(){
this.request.onreadystatechange=function(){
};
this.request.abort();
this.onAbort(this.request);
};

if(!CRJ){
var CRJ={};
}
if(!CRJ.Input){
CRJ.Input={};
}
CRJ.Input.Radio=function(_1){
var _2=document.getElementsByName(_1);
this.GetValue=function(){
for(var i=0;i<_2.length;i++){
if(_2[i].checked){
return _2[i].value;
}
}
};
this.Check=function(_4){
for(var i=0;i<_2.length;i++){
if(_2[i].value==_4){
_2[i].checked=true;
return;
}
}
};
return this;
};
CRJ.Input.Checkbox=function(_6,_7){
var _8=_7.SubElems(_6,"input");
this.GetValues=function(){
var _9=[];
for(var i=0;i<_8.length;i++){
if(_8[i].checked){
_9.push(_8[i].value);
}
}
return _9;
};
this.Check=function(_b){
for(var i=0;i<_8.length;i++){
if(_b[_8[i].value]==true){
_8[i].checked=true;
}else{
_8[i].checked=false;
}
}
};
this.CheckAll=function(){
for(var i=0;i<_8.length;i++){
_8[i].checked=true;
}
};
this.UnCheckAll=function(){
for(var i=0;i<_8.length;i++){
_8[i].checked=false;
}
};
this.TroggleCheck=function(){
for(var i=0;i<_8.length;i++){
_8[i].checked=!_8[i].checked;
}
};
return this;
};

if(!CRJ){
var CRJ={};
}
CRJ.Dump=function(){
var _1=GenDumpMsg(CR$A(arguments));
if(typeof dump!="undefined"){
dump(_1+"\n");
}else{
if(typeof opera!="undefined"){
opera.postError(_1);
}else{
if(typeof console!="undefined"){
console.log(_1);
}else{
if(CR$("debug_console")){
CR$("debug_console").value=_1+"\n\n"+CR$("debug_console").value;
}
}
}
}
function GenDumpMsg(_2){
var _3=[];
var _4=_2.shift();
while(typeof _4!="undefined"){
switch(typeof _4){
case "undefined":
_3.push("undefined");
break;
case "object":
if(_4.nodeName){
_3.push(_4.nodeName);
}
for(var _5 in _4){
switch(_5){
case "domConfig":
_3.push(" (domConfig)");
break;
default:
switch(typeof _4[_5]){
case "function":
_3.push(" (",_5,":function)");
break;
default:
_3.push(" (",_5,":",typeof _4[_5]);
_3.push("=",_4[_5],")");
break;
}
}
}
break;
default:
if(_4.nodeName){
_3.push(_4.nodeName,"=",_4);
}else{
_3.push(_4);
}
break;
}
_4=_2.shift();
if(typeof _4!="undefined"){
_3.push(" ");
}
}
return _3.join("");
}
};

if(!CRJ){
var CRJ={};
}
if(!CRJ.JS){
CRJ.JS={};
}
CRJ.JS.DynamicJS=function(_1){
this.jf=_1.js?_1.js:null;
this.dw=_1.dstWin?eval(_1.dstWin):window;
this.lang=_1.language?_1.language:"JavaScript";
this.jid=_1.id?_1.id:null;
this.fc=_1.checkDone?_1.checkDone:null;
this.fa=_1.funcAfter?_1.funcAfter:null;
};
CRJ.JS.DynamicJS.prototype.Load=function(){
if(this.jid){
var _2=this.dw.document.getElementById(this.jid);
}
if(!_2){
_2=this.dw.document.createElement("script");
_2.setAttribute("language",this.lang);
if(this.jid){
_2.setAttribute("id",this.jid);
}
_2.setAttribute("src",this.jf);
this.dw.document.getElementsByTagName("head").item(0).appendChild(_2);
if(this.fc){
this.CheckDone();
}
return true;
}
return false;
};
CRJ.JS.DynamicJS.prototype.Unload=function(){
if(this.jid){
var _3=this.dw.document.getElementById(this.jid);
if(_3){
this.dw.document.getElementsByTagName("head").item(0).removeChild(_3);
}
}
};
CRJ.JS.DynamicJS.prototype.CheckDone=function(){
if(this.fc()){
if(this.fa){
this.fa();
}
}else{
setTimeout(this.CheckDone.bind(this),500);
}
};

if(!CRJ){
var CRJ={};
}
if(!CRJ.Cookie){
CRJ.Cookie={Set:function(_1,_2,_3,_4,_5,_6){
document.cookie=_1+"="+escape(_2)+((_3)?"; expires="+_3.toGMTString():"")+((_4)?"; path="+_4:"")+((_5)?"; domain="+_5:"")+((_6)?"; secure":"");
},Get:function(_7){
var _8=document.cookie.split("; ");
for(var i=0;i<_8.length;i++){
var _a=_8[i].split("=");
if(_7==_a[0]){
return unescape(_a[1]);
}
}
return "";
},Delete:function(_b,_c,_d){
if(CRJ.Cookie.Get(_b).length>0){
document.cookie=_b+"="+((_c)?"; path="+_c:"")+((_d)?"; domain="+_d:"")+"; expires=Thu, 01-Jan-70 00:00:01 GMT";
}
}};
}
function GetUserFromPP(){
var _e=document.cookie.split("; ");
for(var i=0;i<_e.length;i++){
if(_e[i].indexOf("passport=")==0){
var _10=_e[i].substr(9);
try{
var x=unescape(_10).split("|");
if(x[0]=="1"){
var _12=utf8to16(b64_decodex(x[3]));
return getuser(_12);
}
}
catch(e){
if(CRJ&&CRJ.Dump){
CRJ.Dump("Exception in GetUserFromPP",e);
}
}
}
}
return false;
function utf8to16(str){
var out,i,j,len,c,c2,c3,c4,s;
out=[];
len=str.length;
i=j=0;
while(i<len){
c=str.charCodeAt(i++);
switch(c>>4){
case 0:
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
out[j++]=str.charAt(i-1);
break;
case 12:
case 13:
c2=str.charCodeAt(i++);
out[j++]=String.fromCharCode(((c&31)<<6)|(c2&63));
break;
case 14:
c2=str.charCodeAt(i++);
c3=str.charCodeAt(i++);
out[j++]=String.fromCharCode(((c&15)<<12)|((c2&63)<<6)|(c3&63));
break;
case 15:
switch(c&15){
case 0:
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
c2=str.charCodeAt(i++);
c3=str.charCodeAt(i++);
c4=str.charCodeAt(i++);
s=((c&7)<<18)|((c2&63)<<12)|((c3&63)<<6)|(c4&63)-65536;
if(0<=s&&s<=1048575){
out[j]=String.fromCharCode(((s>>>10)&1023)|55296,(s&1023)|56320);
}else{
out[j]="?";
}
break;
case 8:
case 9:
case 10:
case 11:
i+=4;
out[j]="?";
break;
case 12:
case 13:
i+=5;
out[j]="?";
break;
}
}
j++;
}
return out.join("");
}
function getuser(str){
var _16;
var _17;
var _18;
_16=0;
_17=str.indexOf(":",_16);
while(_17!=-1){
var k;
var l;
var v;
k=str.substring(_16,_17);
lenEnd_offset=str.indexOf(":",_17+1);
if(lenEnd_offset==-1){
break;
}
l=parseInt(str.substring(_17+1,lenEnd_offset));
v=str.substr(lenEnd_offset+1,l);
if(str.charAt(lenEnd_offset+1+l)!="|"){
break;
}
if(k.toLowerCase()=="userid"){
return v;
}
_16=lenEnd_offset+2+l;
_17=str.indexOf(":",_16);
}
return false;
}
function b64_423(str){
b64table=new Array("A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9","-","_");
var _1d=new String();
for(var i=0;i<str.length;i++){
for(var j=0;j<64;j++){
if(str.charAt(i)==b64table[j]){
var bin=j.toString(2);
_1d+=("000000"+bin).substr(bin.length);
break;
}
}
if(j==64){
if(i==2){
return _1d.substr(0,8);
}else{
return _1d.substr(0,16);
}
}
}
return _1d;
}
function b2i(str){
var x=0;
var k=128;
for(var i=0;i<8;i++,k=k/2){
if(str.charAt(i)=="1"){
x+=k;
}
}
return String.fromCharCode(x);
}
function b64_decodex(str){
var ret=new Array();
var i;
var x="";
for(i=0;i<str.length;i+=4){
x+=b64_423(str.substr(i,4));
}
for(i=0;i<x.length;i+=8){
ret+=b2i(x.substr(i,8));
}
return ret;
}
}

if(!sohuim){
var sohuim={};
}
if(!sohuim.oIndicator){
sohuim.oIndicator={oTimer:null,sUser:"",sNick:"",sSession:"0",oFList:[],oMList:[],nNewMsgs:0,nError:0,nUsec:35000,options:{nick:function(_1){
},friend:function(_2){
},msg:function(_3,_4){
},error:function(_5){
},pos:10000,src:"http://messenger.chinaren.com/indicator.js"},SetOptions:function(_6){
for(var _7 in _6){
sohuim.oIndicator.options[_7]=_6[_7];
}
},SetTimer:function(_8){
if(typeof _8=="undefined"){
_8=35000;
}
sohuim.oIndicator.nUsec=_8;
try{
if(sohuim.oIndicator.oTimer){
window.clearInterval(sohuim.oIndicator.oTimer);
}
sohuim.oIndicator.DoTimer();
sohuim.oIndicator.oTimer=window.setInterval(sohuim.oIndicator.DoTimer,_8);
}
catch(e){
try{
CRJ.Dump("Exception in sohuim.oIndicator.SetTimer",e);
}
catch(e){
}
}
},ResumeTimer:function(){
try{
if(!sohuim.oIndicator.oTimer){
sohuim.oIndicator.oTimer=window.setInterval(sohuim.oIndicator.DoTimer,sohuim.oIndicator.nUsec);
}
}
catch(e){
try{
CRJ.Dump("Exception in sohuim.oIndicator.ResumeTimer",e);
}
catch(e){
}
}
},ClearTimer:function(){
window.clearInterval(sohuim.oIndicator.oTimer);
sohuim.oIndicator.oTimer=false;
},DoTimer:function(){
sohuim.oIndicator.oFList=[];
sohuim.oIndicator.oMList=[];
sohuim.oIndicator.nNewMsgs=0;
sohuim.oIndicator.nError=0;
var _9=document.getElementById("sohuim_indicator_js");
if(_9&&_9.tagName.toLowerCase()=="script"){
document.getElementsByTagName("head").item(0).removeChild(_9);
}
_9=document.createElement("script");
_9.setAttribute("language","JavaScript");
_9.setAttribute("id","sohuim_indicator_js");
_9.setAttribute("src",sohuim.oIndicator.options.src+"?sn="+(new Date).getTime()+"&session="+sohuim.oIndicator.sSession+"&position="+sohuim.oIndicator.options.pos);
document.getElementsByTagName("head").item(0).appendChild(_9);
},SetTimer2:function(_a){
if(typeof _a=="undefined"){
_a=35000;
}
sohuim.oIndicator.nUsec=_a;
try{
if(!sohuim.oIndicator.oTimer){
sohuim.oIndicator.DoTimer2();
}else{
window.clearInterval(sohuim.oIndicator.oTimer);
}
sohuim.oIndicator.oTimer=window.setInterval(sohuim.oIndicator.DoTimer2,_a);
}
catch(e){
try{
CRJ.Dump("Exception in sohuim.oIndicator.SetTimer",e);
}
catch(e){
}
}
},DoTimer2:function(){
var _b=function(){
var _c=xmlbox3.getPresenceResult();
if(_c.type!="error"){
sohuim.oIndicator.nError=0;
}else{
sohuim.oIndicator.nError=_c.errorCode;
}
var _d=xmlbox3.getProfile();
if(_d!="noProfile"){
ZhiTiao.userProfile=_d;
}
if(!ZhiTiao.userProfile.sNick){
ZhiTiao.userProfile.sNick="修改昵称";
}
if(!ZhiTiao.userProfile.sName){
ZhiTiao.userProfile.sName="修改真名";
}
sohuim.oIndicator.DoIndicate();
};
var _e=function(_f){
if(_f.responseText.search("error type=\"auth\"")!=-1){
if(ZhiTiao_Login){
ZhiTiao_Login();
}
return false;
}
};
if(ZhiTiao&&ZhiTiao.InitOK){
sohuim.oStanza.SendPacket("<presence><indicate-only/></presence>",_b,true,_e);
}else{
sohuim.oStanza.SendPacket("<presence><indicate-only/></presence><iq type='get'><profile/></iq>",_b,true,_e);
}
},DefaultIndicator:function(){
try{
sohuim.oIndicator.options.error(sohuim.oIndicator.nError);
}
catch(e){
try{
CRJ.Dump("Exception in sohuim.oIndicator.DefaultIndicator.Error",e);
}
catch(e){
}
}
try{
sohuim.oIndicator.options.msg(sohuim.oIndicator.nNewMsgs,sohuim.oIndicator.oMList);
}
catch(e){
try{
CRJ.Dump("Exception in sohuim.oIndicator.DefaultIndicator.MList",e);
}
catch(e){
}
}
try{
sohuim.oIndicator.options.friend(sohuim.oIndicator.oFList);
}
catch(e){
try{
CRJ.Dump("Exception in sohuim.oIndicator.DefaultIndicator.FList",e);
}
catch(e){
}
}
try{
sohuim.oIndicator.options.nick(sohuim.oIndicator.sNick);
}
catch(e){
try{
CRJ.Dump("Exception in sohuim.oIndicator.DefaultIndicator.Nick",e);
}
catch(e){
}
}
},DoIndicate:function(){
sohuim.oIndicator.DefaultIndicator();
},tFriendItem:function(_10){
this.from=null;
this.nick=null;
this.gtype=0;
this.category="sohu/im";
for(var _11 in _10){
this[_11]=_10[_11];
}
},tMsgItem:function(msg){
this.type="chat";
this.from=null;
this.to=null;
this.id=null;
this.timestamp=0;
this.unread=false;
this.body=null;
this.key=null;
for(var _13 in msg){
this[_13]=msg[_13];
}
}};
}

if(!sohuim){
var sohuim={Version:"1.0"};
}
if(!sohuim.categories){
sohuim.categories=["chinaren/alumni","chinaren/club","chinaren/xiaonei","sohu/im","sohu/blog"];
sohuim.catenames=["ChinaRen校友录","ChinaRen社区","ChinaRen校内","","搜狐博客"];
sohuim.Categories={"chinaren/alumni":"ChinaRen校友录","chinaren/club":"ChinaRen社区","chinaren/xiaonei":"ChinaRen校内","sohu/im":"Sohu Messenger","sohu/blog":"搜狐博客"};
}
if(!sohuim.UserIDConvertor){
sohuim.domains={"chinaren":"chinaren.com","sohu":"sohu.com","vip":"vip.sohu.com","17173":"17173.com","focus":"focus.cn","sol":"sol.sohu.com","game":"game.sohu.com","sms":"sms.sohu.com"};
sohuim.domains_blog={"chinaren.com":"!c","sohu.com":"","vip.sohu.com":"!vs","17173.com":"!17173","focus.cn":"!f","sogou.com":"!sg","sol.sohu.com":"!sol","sms.sohu.com":"!sms"};
sohuim.UserIDConvertor={"im/passport":function(_1){
var _2=_1.indexOf("@");
if(_2<0){
return _1;
}
var _3=_1.substr(_2+1);
if(!sohuim.domains[_3]){
return _1;
}
var _4=sohuim.domains[_3];
if(!_4){
return _1;
}
return _1.substring(0,_2+1)+_4;
},"passport/im":function(_5){
var _6=_5.indexOf("@");
if(_6<0){
return "";
}
var _7=_5.substr(_6+1);
for(var _8 in sohuim.domains){
if(_7.toLowerCase()==sohuim.domains[_8]){
return _5.substring(0,_6+1)+_8;
}
}
return "";
},"chinaren/passport":function(_9){
if(_9.indexOf("@")<0){
return _9+"@chinaren.com";
}
return sohuim.UserIDConvertor["im/passport"](_9);
},"passport/chinaren":function(_a){
var _b=_a.indexOf("@");
var _c=_a.substr(_b+1);
if(_c.toLowerCase()=="chinaren.com"){
return _a.substring(0,_b);
}
return sohuim.UserIDConvertor["passport/im"](_a);
},"passport/blog":function(_d){
var _e=_d.indexOf("@");
if(_e<0){
return "";
}
var _f=_d.substr(_e+1);
_f=_f.toLowerCase();
for(var _10 in sohuim.domains_blog){
if(_f==_10){
return _d.substring(0,_e)+sohuim.domains_blog[_10];
}
}
return _d;
}};
sohuim.ConvertUserID=function(_11,sTo,_13){
var _14=_11+"/"+sTo;
_14=_14.toLowerCase();
if(typeof sohuim.UserIDConvertor[_14]=="function"){
return sohuim.UserIDConvertor[_14](_13);
}
return _13;
};
}
sohuim.sMyID=GetUserFromPP();

if(!sohuim){
var sohuim={};
}
sohuim.indicator={dstWindow:window,borderStyle:"style='border:1px solid #8495CB;'",topBackground:"http://images.sohu.com/cs/messenger/images/indicator_bj.gif",middleBackground:"#FFFFFF",buttomBackground:"http://images.sohu.com/cs/messenger/images/indicator_bj01.gif",closeIconDefault:"http://images.sohu.com/cs/messenger/images/sendmsg2_close.gif",closeIconHighLight:"http://images.sohu.com/cs/messenger/images/sendmsg2_close_a.gif",messageIcon:"http://images.sohu.com/cs/messenger/images/online_newmsg.gif",friendIcon:"http://images.chinaren.com/product/aluclub/images/online_friends.gif",txtStyle:"style='font-size:12px;color:#3B4C82'",urlStyle:"style='font-size:12px;color:#FF6600;text-decoration:underline'",nonUrlStyle:"style='font-size:12px;color:#FF6600;'",friendUrl:{"chinaren/club":"<a target=_blank href='http://club.chinaren.com/user/profile.jsp?uid=$CRUSERID' $URLSTYLE>$USERNICK</a>&nbsp;","chinaren/alumni":"<a target=_blank href='http://messenger.sohu.com/index.jsp?a=3&b=4' $URLSTYLE>$USERNICK</a>&nbsp;","chinaren/xiaonei":"<a target=_blank href='http://xiaonei.chinaren.com/user/space.jsp?userid=$CRUSERID' $URLSTYLE>$USERNICK</a>&nbsp;","sohu/im":"<a target=_blank href='http://messenger.sohu.com/index.jsp?a=3&b=2' $URLSTYLE>$USERNICK</a>&nbsp;","sohu/blog":"<a target=_blank href='http://blog.sohu.com/people/$BLOGUSERID' $URLSTYLE>$USERNICK</a>&nbsp;"},newMsgUrl:"<a $URLSTYLE target=_blank href=\"http://messenger.sohu.com/\">您有新的小纸条,请注意查收!</a>",displayTime:8000};
sohuim.indicator.replaceContent=function(_1,_2){
var _3=null;
_3=_1.replace("$$","$DOLLAR");
if(_2){
_3=_3.replace("$USERID",sohuim.ConvertUserID("passport","chinaren",_2.from));
_3=_3.replace("$PPUSERID",_2.from);
_3=_3.replace("$CRUSERID",sohuim.ConvertUserID("passport","chinaren",_2.from));
_3=_3.replace("$BLOGUSERID",sohuim.ConvertUserID("passport","blog",_2.from));
_3=_3.replace("$USERNICK",_2.nick);
}
_3=_3.replace("$TXTSTYLE",sohuim.indicator.txtStyle);
_3=_3.replace("$URLSTYLE",sohuim.indicator.urlStyle);
_3=_3.replace("$NONURLSTYLE",sohuim.indicator.nonUrlStyle);
_3=_3.replace("$DOLLAR","$");
return _3;
};
sohuim.indicator.msghandler=function(_4,_5){
if(_4){
sohuim.popUpMsg(sohuim.indicator.dstWindow,sohuim.indicator.messageIcon,sohuim.indicator.replaceContent(sohuim.indicator.newMsgUrl),sohuim.indicator.displayTime);
}
};
sohuim.indicator.friendhandler=function(_6){
var _7="";
for(var i=0;i<_6.length;i++){
if(!_6[i].nick||_6[i].nick.length==0){
_6[i].nick=_6[i].from;
}
_7+=sohuim.indicator.replaceContent(sohuim.indicator.friendUrl[_6[i].category.toLowerCase()],_6[i]);
}
if(_7.length){
sohuim.popUpMsg(sohuim.indicator.dstWindow,sohuim.indicator.friendIcon,"<span "+sohuim.indicator.txtStyle+">您的好友 "+_7+" 上线啦！</span>",sohuim.indicator.displayTime);
}
};
sohuim.indicator.errorhandler=function(_9){
switch(_9){
case -2:
sohuim.oIndicator.ClearTimer();
break;
}
};
sohuim.oIndicator.SetOptions({msg:sohuim.indicator.msghandler,friend:sohuim.indicator.friendhandler,error:sohuim.indicator.errorhandler});

var msgWinTop,msgWinLeft,msgWinWidth,msgWinHeight,mainWinHeight,mainWinWidth;
var oTimer;
var isFF=(navigator.userAgent.indexOf("Firefox")>0);
var DEFAULT_MSGICON="http://images.chinaren.com/product/aluclub/images/chnren_29.gif";
var DEFAULT_MSGCONTENT="";
var DEFAULT_MSGTIME=3000;
var tipTime;
var dW;
var dWDoc;
sohuim.popUpMsg=function(_1,_2,_3,_4){
try{
var _5=eval(_1);
if((isFF&&_5.document.body==null)||(!isFF&&_5.document.readyState!="complete")){
oTimer=window.setTimeout(sohuim.popUpMsg.CallWith(_1,_2,_3,_4),5);
return;
}
if(oTimer){
window.clearTimeout(oTimer);
}
_1=eval(_1);
if(_1==null){
return;
}
dW=_1.window;
dWDoc=dW.document;
sohuim.closeMsgWin();
dWDoc.body.onresize=sohuim.resizeMainWin;
dW.onresize=sohuim.resizeMainWin;
if(_2==""){
_2=DEFAULT_MSGICON;
}
if(_3==""){
_3=DEFAULT_MSGCONTENT;
}
tipTime=(_4==null)?DEFAULT_MSGTIME:_4;
var mw=dWDoc.createElement("div");
mw.id="msgWin";
mw.style.position="absolute";
mw.style.visibility="hidden";
mw.style.zIndex="99999";
mw.style.top="0px";
mw.style.left="0px";
mw.style.width="180px";
var _7="<table "+sohuim.indicator.borderStyle+" cellpadding=0 cellspacing=0  width=180>"+"<tr style=\"background:"+sohuim.indicator.middleBackground+"\"><td style=\"padding:3px\">"+"<table style=\"background:url("+sohuim.indicator.topBackground+");background-repeat:repeat-x;\" border=0 cellpadding=0 cellspacing=0 width=\"100%\" height=21><td width=\"2px\"></td>"+"<td align=\"right\" style=\"background:url(http://images.sohu.com/cs/messenger/images/sendmsg2_t_l.gif) no-repeat\"><img src=\""+sohuim.indicator.closeIconDefault+"\" onmouseover=\"javascript:{this.src='"+sohuim.indicator.closeIconHighLight+"'}\" onmouseout=\"javascript:{this.src='"+sohuim.indicator.closeIconDefault+"'}\" onclick=\"top"+(window==top?"":"."+window.name)+".sohuim.closeMsgWin()\" width=\"22px\" height=\"17px\" style=\"cursor:pointer\"></td>"+"</td>"+"</table></td></tr>"+"<tr style=\"background:"+sohuim.indicator.middleBackground+"\">"+"<td>"+"<table><tr>"+"<td width=\"40\" align=\"center\" valign=\"middle\"><img src=\""+_2+"\"></td>"+"<td style=\""+sohuim.indicator.txtStyle+"\">"+_3+"</td>"+"</tr></table>"+"</td>"+"</tr>"+"<tr>"+"<td style=\"background:url("+sohuim.indicator.buttomBackground+");background-repeat:repeat-x;\" width=\"180\" height=33></td>"+"</tr>"+"</table>";
mw.innerHTML=_7;
dWDoc.body.appendChild(mw);
msgWinTop=parseInt(mw.style.top,10);
msgWinLeft=parseInt(mw.style.left,10);
msgWinHeight=parseInt(mw.offsetHeight,10);
msgWinWidth=parseInt(mw.offsetWidth,10);
mainWinWidth=CRJ.Window.GetInnerInfo("Width",dW);
mainWinHeight=CRJ.Window.GetInnerInfo("Height",dW);
mw.style.top=parseInt(CRJ.Window.GetScrollInfo("Y",dW),10)+mainWinHeight+"px";
mw.style.left=parseInt(CRJ.Window.GetScrollInfo("X",dW),10)+mainWinWidth-msgWinWidth-(isFF?21:0)+"px";
mw.style.visibility="visible";
oTimer=window.setInterval("sohuim.moveUpMsgWin()",1);
}
catch(e){
if(CRJ&&CRJ.Dump){
CRJ.Dump("Exception in sohuim.popUpMsg ",e);
}
}
};
sohuim.resizeMainWin=function(){
try{
msgWinHeight=parseInt(dWDoc.getElementById("msgWin").offsetHeight,10);
msgWinWidth=parseInt(dWDoc.getElementById("msgWin").offsetWidth,10);
mainWinWidth=CRJ.Window.GetInnerInfo("Width",dW);
mainWinHeight=CRJ.Window.GetInnerInfo("height",dW);
dWDoc.getElementById("msgWin").style.top=mainWinHeight-msgWinHeight+parseInt(CRJ.Window.GetScrollInfo("Y",dW),10)+"px";
dWDoc.getElementById("msgWin").style.left=mainWinWidth-msgWinWidth+parseInt(CRJ.Window.GetScrollInfo("X",dW),10)-(isFF?21:0)+"px";
}
catch(e){
}
};
sohuim.moveUpMsgWin=function(){
try{
msgWinTop=parseInt(dWDoc.getElementById("msgWin").style.top,10);
if(msgWinTop<=(mainWinHeight-msgWinHeight+parseInt(CRJ.Window.GetScrollInfo("Y",dW),10))){
window.clearInterval(oTimer);
oTimer=window.setTimeout("sohuim.holdOnMsgWin()",tipTime);
}
dWDoc.getElementById("msgWin").style.top=msgWinTop-2+"px";
}
catch(e){
if(CRJ&&CRJ.Dump){
CRJ.Dump("Exception in sohuim.popUpMsg.moveUpMsgWin",e);
}
}
};
sohuim.moveDownMsgWin=function(){
try{
msgWinTop=parseInt(dWDoc.getElementById("msgWin").style.top,10);
if(msgWinTop>=(mainWinHeight+parseInt(CRJ.Window.GetScrollInfo("Y",dW),10))){
sohuim.closeMsgWin();
}
dWDoc.getElementById("msgWin").style.top=msgWinTop+2+"px";
}
catch(e){
}
};
sohuim.holdOnMsgWin=function(){
window.clearInterval(oTimer);
oTimer=window.setInterval("sohuim.moveDownMsgWin()",1);
};
sohuim.closeMsgWin=function(){
try{
if(oTimer){
window.clearInterval(oTimer);
}
dWDoc.body.removeChild(dWDoc.getElementById("msgWin"));
}
catch(e){
}
};

