2009-04-05 01:12:29 +04:00
|
|
|
var nt={qt:function(rt){if(rt.contentDocument){return rt.contentDocument;} else if(rt.contentWindow){return rt.contentWindow.document;} else if(rt.document){return rt.document;} else{return null;} } ,st:function(rt){var tt=this.qt(rt);tt.open();tt.write("<html><head>");tt.write("<link rel=\"stylesheet\" type=\"text/css\" media=\"all\" href=\""+ut.cssfile+"\" />");tt.write("</head><body bgcolor='#FFFFFF' text='#000000' link='#C28400' vlink='#C28400' alink='#C28400' marginwidth='0' marginheight='0' leftmargin='0' rightmargin='0' topmargin='0' bottommargin='0'>");tt.write("<table width='100%' cellspacing='0' cellpadding='0' border='0'><tr><td valign='top' class='message' id='content'></td></tr></table><a id='bottom'/>");tt.write("</body></html>");tt.close();rt.onload=function(){if(rt.ht){nt.qt(rt).getElementById('content').innerHTML+=rt.ht;nt.it(rt);} } ;} ,jt:function(rt,kt){var lt=this.qt(rt).getElementById('content');if(lt==null){if(!rt.ht)rt.ht="";rt.ht+=kt;} else{lt.innerHTML+=kt;} } ,it:function(rt){var ot=this.qt(rt).getElementById('bottom');if(myAgent=='opera'){rt.contentWindow.scrollTo(0,this.qt(rt).getElementById('content').clientHeight);} else if(ot)ot.scrollIntoView(false);} } ;sq.pt=mn.nn();mn.sn(sq.pt,sq.lq,{qn:function(pq){this.oq(pq);this.pq.onComplete=this.dt.on(this);this.pq.jr=this.et.on(this);this.pq.hr=this._q.on(this);this.pq.timeout=(3861+1139);this.ft={} ;this.frequency=(this.pq.frequency||2);this.gt=0;this.at=true;this.bt=true;this.ct=true;this.vt=this.pq.wt!=null;nt.st(this.pq.xt);if(this.pq.wt){this.pq.wt.onkeydown=this.yt.on(this);this.pq.wt.onfocus=(function(){this.ct=true;} ).on(this);this.pq.wt.onblur=(function(){this.ct=false;} ).on(this)} this.zt();} ,et:function($t,_t){this.mu("offline, reconnecting");this.nu();this.qu=setTimeout(this.zt.on(this),(973+27));} ,_q:function($t){this.mu("timeout, reconnecting");this.nu();this.qu=setTimeout(this.zt.on(this),(603+397));} ,ru:function(su){this.pq.fq='act='+su+'&thread='+(this.pq.threadid||0)+'&token='+(this.pq.token||0)+'&lastid='+(this.pq.tu||0);if(this.pq.user)this.pq.fq+="&user=true";if(su=='refresh'&&this.pq.wt&&this.pq.wt.value!='')this.pq.fq+="&typed=1";} ,uu:function(hu){if(this.pq.wt)this.pq.wt.disabled=!hu;} ,nu:function(){this.uu(true);if(this.ft.pq)this.ft.pq.onComplete=undefined;clearTimeout(this.qu);} ,zt:function(){this.ru("refresh");this.ft=new sq.vq(this.pq.servl,this.pq);} ,dt:function(hq){try{this.uu(true);this.at=true;var iu=sq.uq(hq);if(iu&&iu.tagName=='thread'){this.ju(iu);} else{this.ku(hq,iu,'refresh messages failed');} } catch(e){} this.bt=false;this.qu=setTimeout(this.zt.on(this),this.frequency*01750);} ,lu:function(ou){if(ou==""||!this.at){return;} this.at=false;this.nu();this.bt=true;this.ru("post");var pu={} .un(this.pq);pu.fq+="&message="+encodeURIComponent(ou);pu.onComplete=(function(du){this.dt(du);if(this.pq.wt){this.pq.wt.value='';this.pq.wt.focus();} } ).on(this);if(myRealAgent!='opera')this.uu(false);this.ft=new sq.vq(this.pq.servl,pu);} ,eu:function(fu){this.bt=true;new sq.vq(this.pq.servl,{fq:'act=rename&thread='+(this.pq.threadid||0)+'&token='+(this.pq.token||0)+'&name='+encodeURIComponent(fu)} );} ,gu:function(hq){var iu=sq.uq(hq);if(iu&&iu.tagName=='closed'){setTimeout('window.close()',(1389+611));} else{this.ku(hq,iu,'cannot close');} } ,au:function(){var bu='act=close&thread='+(this.pq.threadid||0)+'&token='+(this.pq.token||0);if(this.pq.user)bu+="&user=true";new sq.vq(this.pq.servl,{fq:bu,onComplete:this.gu.on(this)} );} ,cu:function(vu,wt){var wu=qs.us(wt);nt.jt(vu,wu);} ,xu:function(yu){if($("typingdiv")){$("typingdiv").style.display=yu?'inline':'none';} } ,zu:function($u){var _u=qs.us($u);if(this.pq.$u&&this.pq.user){this.pq.$u.innerHTML=_u!=""?"<img src=\""+ut.mh+"/images/free.gif\" width=\"7\" height=\"1\" border=\"0\" alt=\"\" /><img src=\""+_u+"\" border=\"0\" alt=\"\"/>":"";} } ,ju:function(iu){var nh=false;var qh=this.pq.xt;var rh=qs.ks(iu,"lastid");if(rh){this.pq.tu=rh;} var sh=qs.ks(iu,"typing");if(sh){this.xu(sh=='1');} var th=qs.ks(iu,"canpost");if(th){if(th=='1'&&!this.vt||this.vt&&th!='1')
|