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("");tt.write("");tt.write("");tt.write("
");tt.write("");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'){try{rt.contentWindow.scrollTo(0,this.qt(rt).getElementById('content').clientHeight);} catch(e){} } if(ot){ot.scrollIntoView(false);} } } ;nq.pt=mn.nn();mn.rn(nq.pt,nq.iq,{qn:function(kq){this.jq(kq);this.kq.onComplete=this.dt.ln(this);this.kq.ur=this.et.ln(this);this.kq.sr=this.yq.ln(this);this.kq.timeout=(3954+1046);this.ft={} ;this.frequency=(this.kq.frequency||2);this.gt=0;this.at=true;this.bt=true;this.ct=true;this.vt=this.kq.wt!=null;nt.st(this.kq.xt);if(this.kq.wt){this.kq.wt.onkeydown=this.yt.ln(this);this.kq.wt.onfocus=(function(){this.ct=true;} ).ln(this);this.kq.wt.onblur=(function(){this.ct=false;} ).ln(this)} this.zt();} ,et:function($t,_t){this.mu("offline, reconnecting");this.nu();this.qu=setTimeout(this.zt.ln(this),0x3e8);} ,yq:function($t){this.mu("timeout, reconnecting");this.nu();this.qu=setTimeout(this.zt.ln(this),0x3e8);} ,ru:function(su){this.kq.pq='act='+su+'&thread='+(this.kq.threadid||0)+'&token='+(this.kq.token||0)+'&lastid='+(this.kq.tu||0);if(this.kq.user)this.kq.pq+="&user=true";if(su=='refresh'&&this.kq.wt&&this.kq.wt.value!='')this.kq.pq+="&typed=1";} ,uu:function(hu){if(this.kq.wt)this.kq.wt.disabled=!hu;} ,nu:function(){this.uu(true);if(this.ft.kq)this.ft.kq.onComplete=undefined;clearTimeout(this.qu);} ,zt:function(){this.ru("refresh");this.ft=new nq.aq(this.kq.servl,this.kq);} ,dt:function(sq){try{this.uu(true);this.at=true;var iu=nq.rq(sq);if(iu&&iu.tagName=='thread'){this.ju(iu);} else{this.ku(sq,iu,'refresh messages failed');} } catch(e){} this.bt=false;this.qu=setTimeout(this.zt.ln(this),this.frequency*(973+27));} ,lu:function(ou){if(ou==""||!this.at){return;} this.at=false;this.nu();this.bt=true;this.ru("post");var pu={} .tn(this.kq);pu.pq+="&message="+encodeURIComponent(ou);pu.onComplete=(function(du){this.dt(du);if(this.kq.wt){this.kq.wt.value='';this.kq.wt.focus();} } ).ln(this);if(myRealAgent!='opera')this.uu(false);this.ft=new nq.aq(this.kq.servl,pu);} ,eu:function(fu){this.bt=true;new nq.aq(this.kq.servl,{pq:'act=rename&thread='+(this.kq.threadid||0)+'&token='+(this.kq.token||0)+'&name='+encodeURIComponent(fu)} );} ,gu:function(sq){var iu=nq.rq(sq);if(iu&&iu.tagName=='closed'){setTimeout('window.close()',0x7d0);} else{this.ku(sq,iu,'cannot close');} } ,au:function(){var bu='act=close&thread='+(this.kq.threadid||0)+'&token='+(this.kq.token||0);if(this.kq.user)bu+="&user=true";new nq.aq(this.kq.servl,{pq:bu,onComplete:this.gu.ln(this)} );} ,cu:function(vu,wt){var wu=ms.ss(wt);nt.jt(vu,wu);} ,xu:function(yu){if($("typingdiv")){$("typingdiv").style.display=yu?'inline':'none';} } ,zu:function($u){var _u=ms.ss($u);if(this.kq.$u&&this.kq.user){this.kq.$u.innerHTML=_u!=""?"\"\"\"\"/":"";} } ,ju:function(iu){var nh=false;var qh=this.kq.xt;var rh=ms.is(iu,"lastid");if(rh){this.kq.tu=rh;} var sh=ms.is(iu,"typing");if(sh){this.xu(sh=='1');} var th=ms.is(iu,"canpost");if(th){if(th=='1'&&!this.vt||this.vt&&th!='1'){window.location.href=window.location.href;} } for(var i=0;i=0){var hu="updated";if(this.gt>0){var hh=((new Date()).getTime()-this.gt)/(974+26);hu=hu+", "+hh+" secs";if(hh>(6+4)){alert(hu);} } this.gt=(new Date()).getTime();this.mu(hu);} else{this.ih();} if(nh){nt.it(this.kq.xt);if(!this.bt){var jh=$('soundimg');if(jh==null||jh.className.match(new RegExp("\\bisound\\b"))){ys(ut.mh+'/sounds/new_message.wav');} } if(!this.ct){window.focus();} } } ,kh:function(lh,oh){return((oh==(9+4)&&(lh||this.kq.ignorectrl))||(oh==012));} ,yt:function(k){if(k){ph=k.ctrlKey;k=k.which;} else{k=event.keyCode;ph=event.ctrlKey;} if(this.kq.wt&&this.kh(ph,k)){var dh=this.kq.wt.value;if(this.kq.ignorectrl){dh=dh.replace(/[\r\n]+$/,'');} this.lu(dh);return false;} return true;} ,ku:function(sq,iu,eh){if(iu&&iu.tagName=='error'){this.mu(ms.ns(iu,"descr"));} else{this.mu("reconnecting");} } ,fh:function(k){if($("engineinfo")){$("engineinfo").style.display='inline';$("engineinfo").innerHTML=k;} } ,mu:function(k){if(this.gh)clearTimeout(this.gh);this.fh(k);this.gh=setTimeout(this.ih.ln(this),0xfa0);} ,ih:function(){$("engineinfo").style.display='none';} } );var ut={ah:{} ,bh:function(){ut.ah.eu($('uname').value);$('changename1').style.display='none';$('changename2').style.display='inline';$('unamelink').innerHTML=_s($('uname').value);} ,ch:function(){$('changename1').style.display='inline';$('changename2').style.display='none';} } ;pr.ir({'#postmessage a':function(vh){vh.onclick=function(){var wt=$('msgwnd');if(wt)ut.ah.lu(wt.value);} ;} ,'select#predefined':function(vh){vh.onchange=function(){var wt=$('msgwnd');if(this.selectedIndex!=0){wt.value=this.options[this.selectedIndex].innerText||this.options[this.selectedIndex].innerHTML;} this.selectedIndex=0;wt.focus();} ;} ,'div#changename2 a':function(vh){vh.onclick=function(){ut.ch();return false;} ;} ,'div#changename1 a':function(vh){vh.onclick=function(){ut.bh();return false;} ;} ,'div#changename1 input#uname':function(vh){vh.onkeydown=function(e){var kr=e||event;if(kr.keyCode==(10+3)){ut.bh();} } ;} ,'a#refresh':function(vh){vh.onclick=function(){ut.ah.nu();ut.ah.zt();} ;} ,'a#togglesound':function(vh){vh.onclick=function(){var jh=$('soundimg');if(!jh){return;} if(jh.className.match(new RegExp("\\bisound\\b"))){jh.className="tplimage inosound";} else{jh.className="tplimage isound";} var wh=$('msgwnd');if(wh)wh.focus();} ;} ,'a.closethread':function(vh){vh.onclick=function(){ut.ah.au();} ;} } );hr.ir(window,'onload',function(){ut.mh=threadParams.wroot;ut.cssfile=threadParams.cssfile;ut.ah=new nq.pt(({ignorectrl:-1,xt:myRealAgent=='safari'?self.frames[0]:$("chatwnd"),$u:$("avatarwnd"),wt:$("msgwnd")} ).tn(threadParams||{} ));} );