﻿
var webChatPath        = "http://talk.520940.com.cn:8888/";//聊天服务器的地址
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('4(!B.8.5){R.8.5=3(){d a=[\'[\'],b,i,l=2.S,v;3 p(s){4(b){a.h(\',\')}a.h(s);b=C}q(i=0;i<l;i+=1){v=2[i];D(o v){7\'w\':4(v){4(o v.5===\'3\'){p(v.5())}}E{p("x")}F;7\'G\':7\'H\':7\'I\':p(v.5())}}a.h(\']\');6 a.J(\'\')};U.8.5=3(){6 y(2)};V.8.5=3(){3 f(n){6 n<10?\'0\'+n:n}6\'"\'+2.W()+\'-\'+f(2.X()+1)+\'-\'+f(2.Y())+\'T\'+f(2.Z())+\':\'+f(2.11())+\':\'+f(2.12())+\'"\'};13.8.5=3(){6 14(2)?y(2):"x"};B.8.5=3(){d a=[\'{\'],b,k,v;3 p(s){4(b){a.h(\',\')}a.h(k.5(),\':\',s);b=C}q(k K 2){4(2.L(k)){v=2[k];D(o v){7\'w\':4(v){4(o v.5===\'3\'){p(v.5())}}E{p("x")}F;7\'G\':7\'H\':7\'I\':p(v.5())}}}a.h(\'}\');6 a.J(\'\')};(3(s){d m={\'\\b\':\'\\\\b\',\'\\t\':\'\\\\t\',\'\\n\':\'\\\\n\',\'\\f\':\'\\\\f\',\'\\r\':\'\\\\r\',\'"\':\'\\\\"\',\'\\\\\':\'\\\\\\\\\'};s.M=3(z){d j;3 A(k,v){d i;4(v&&o v===\'w\'){q(i K v){4(v.L(i)){v[i]=A(i,v[i])}}}6 z(k,v)}15{4(/^("(\\\\.|[^"\\\\\\n\\r])*?"|[,:{}\\[\\]0-9.\\-+17-u \\n\\r\\t])+?$/.N(2)){j=18(\'(\'+2+\')\');4(o z===\'3\'){j=A(\'\',j)}6 j}}19(e){}1a 1b 1c("M");};s.5=3(){4(/["\\\\\\O-\\P]/.N(2)){6\'"\'+2.1d(/([\\O-\\P\\\\"])/g,3(a,b){d c=m[b];4(c){6 c}c=b.1e();6\'\\\\1f\'+1g.1h(c/16).Q(16)+(c%16).Q(16)})+\'"\'}6\'"\'+2+\'"\'}})(y.8)}',62,80,'||this|function|if|toJSONString|return|case|prototype|||||var||||push|||||||typeof||for||||||object|null|String|filter|walk|Object|true|switch|else|break|string|number|boolean|join|in|hasOwnProperty|parseJSON|test|x00|x1f|toString|Array|length||Boolean|Date|getFullYear|getMonth|getDate|getHours||getMinutes|getSeconds|Number|isFinite|try||Eaeflnr|eval|catch|throw|new|SyntaxError|replace|charCodeAt|u00|Math|floor'.split('|'),0,{}))
browserType = navigator.userAgent;
MyIE=false;
Tencent=false;
if(browserType.indexOf("Max")!=-1||browserType.indexOf("My")!=-1)
{MyIE=true;}
if(browserType.indexOf("Tencent")!=-1)
{Tencent=true;}
function getCookie(sName){var sRE="(?:; )?"+sName+"=([^;]*);?";var oRE=new RegExp(sRE);if(oRE.test(document.cookie)){return decodeURIComponent(RegExp["$1"])}else{return 0}}
function ChatTo(friend)
{
	var isOpenChatWin = getCookie("isOpenChatWin");
		if(isOpenChatWin==1)//已打开聊天窗口
		{
			if(friend!=null)
			{
				sendchatto.location.href=webChatPath+"addfriend.jsp?clientuin="+LoginMember.id+"&fromname="+escape(LoginMember.name)+"&uin="+friend.id+"&loginMember="+escape(LoginMember.toJSONString())+"&chatto="+escape(friend.toJSONString());//不再打开聊天窗口，发送加好友的消息
			}
				
		}
		else//尚未打开聊天窗口
		{
			var expdate = new Date();
			expdate.setTime (expdate.getTime() + (86400 * 1000));
			var url_t="";
			if(friend!=null)
			{
				url_t = webChatPath+"sendmain.jsp?uin="+friend.id+"&clientuin="+LoginMember.id+"&loginMember="+escape(LoginMember.toJSONString())+"&chatto="+escape(friend.toJSONString());
			}
			else
			{
				url_t = webChatPath+"sendmain.jsp?uin=&clientuin="+LoginMember.id+"&loginMember="+escape(LoginMember.toJSONString())+"&chatto=null";
			}
			if(MyIE||Tencent)
			{
				window.open(url_t);
			}
			else
			{
				window.open(url_t,"tsy","width=635,height=495,location=no,resizable=0,scrollbars=0,status=no,toolbar=no,menu=no,top=100,left=200");
			}
		}
	//}
}
