url=self.location.toString();
iev=0;
latt=0;
if(typeof window.external!='object'&&typeof XMLHttpRequest!='object'&&typeof XMLHttpRequest!='function'&&url.indexOf('=browser')==-1){
	window.location='info.php?why=browser'
}
if(typeof window.external=='object' && typeof document.all=='object'){
	iev=navigator.userAgent;
	iev=iev.split('MSIE');
	iev=parseInt(iev[1]);
	if(iev<7){
		document.write('<link rel="stylesheet" type="text/css" href="'+skin_dir+'/msie.css" />');
	}
}
flash='<object data="'+skin_dir+'/sound.swf" type="application/x-shockwave-flash" width="1" height="1" style="visibility:hidden"><param name="movie" value="'+skin_dir+'/sound.swf" /><param name="menu" value="false" /><param name="quality" value="high" /></object>';
function q00(){
	eeL.focus()
}
function q01(){
	for(i=0;i<smiles.length;i++){
		document.writeln(' <a href="info.php?why=link" onclick="q06(\''+smiles[i]+'\');return false"><img class="emoticons" src="'+skin_dir+'/smilies/'+sfiles[i]+'" alt="'+smiles[i]+'" title="'+smiles[i]+'" onmouseover="return q08(this,5)" onmouseout="return q08(this,10)" /></a> ')
	}
}
function q02(){
	for(i=0;i<colors.length;i++){
		document.writeln('<img class="color_squares" src="'+skin_dir+'/images/trans.png" onclick="q15(this.style.backgroundColor)" style="background-color:#'+colors[i]+'" alt="" />')
	}
}
function q03(){
	for(i=-12;i<0;i++){
		j=i*-1;document.write(' <a href="info.php?why=link" style="text-decoration:none" onclick="q16('+i+');return false">'+j+'</a> ')
	};
	document.write('- <a href="info.php?why=link" style="text-decoration:none" onclick="q16(0);return false">GMT</a> +');
	for(i=1;i<13;i++){
		document.write(' <a href="info.php?why=link" style="text-decoration:none" onclick="q16('+i+');return false">'+i+'</a> ')
	}
}
function q04(){
	z=document.body.clientHeight;
	if(typeof window.external=='object' && typeof document.all=='object' && iev<7 && url.indexOf('blab.php')!=-1){
		h=z-ie1rs;eeB.style.height=h+'px';h=z-ie2rs;eeC.style.height=h+'px'
	}
}
function q05(w){
	window.location=w;
	return false
}
function q06(w){
	eeL.value=eeL.value+ ' '+w+' ';
	q00();
}
function q07(){
	r=Math.round(99999999*Math.random());
	return r
}
function q08(m,n){
	if(typeof window.external=='object' && typeof document.all=='object'){
		m.style.filter='alpha(opacity='+n*10+')';
	}else{
		m.style.opacity=n/10;
	}
	return false
} 
function q09(w){
	f=document.forms.fms;
	ok=1;
	a=f.name;
	if(a.value.length<3){
		a.value='';
		a.focus();
		ok=0
	};
	if(ok==1){
		return true
	}else{
		document.getElementById('emms').innerHTML=w;
		return false
	}
}
function q10(){
	if(typeof window.external=='object' && typeof document.all=='object'){
		r=new ActiveXObject("Microsoft.XMLHTTP")
	}else{
		r=new XMLHttpRequest()
	}
	return r
}
function q11(){
	eeE.style.display='none';
	eeF.style.display='none';
	eeG.style.display='none';
	eeH.style.display='none';
}
function q12(){
	if(ajx_sndd==1){
		allow_flash=flash
	}else{
		allow_flash=''
	}
	tit='<br /><br />'+set_disc+'<br /><a href="blab.php?r='+r+'"><b>'+set_clck+'</b></a>'+allow_flash;
	if(typeof chat_tout=='number'){
		clearTimeout(chat_tout)
	};
	eeB.innerHTML=tit;
	lock=0
}
function q13(){
	if(sup_errs<1){
		r=q07();
		if(typeof conn_tout=='number'){
			clearTimeout(conn_tout)
		}
		conn_tout=setTimeout('q12()',set_refr*6000)
	}
}
function q14(){
	if(lock==0){
		if(eeL.value.length>0){
			ajx_line=eeL.value;eeL.value='';
			stlB=stlB.toString();
			stlI=stlI.toString();
			stlU=stlU.toString();
			stlC=stlC.toString();
			ajx_lbiu=stlB+stlI+stlU;
			ajx_lclr=stlC;
			q00();
			if(typeof chat_tout=='number'){
				clearTimeout(chat_tout)
			}
			q22();
		}
	}
}
function q15(w){
	eeL.style.color=w;
	eeC.style.display='block';
	eeE.style.display='none';
	eeF.style.display='none';
	eeG.style.display='none';
	eeH.style.display='none';
	stlC=w;
	q00()
}
function q16(s){
	s=parseInt(s);
	ajx_zone=s;
	eeG.style.display='none';
	q00()
}
function q17(q){
	ajx_sndd=q;
	eeH.style.display='none';
	q00()
}
function q18(){
	if(eeF.style.display!='block'){
		q11();
		eeF.style.display='block'
	}else{
		q11()
	}
	q00()
}
function q19(){
	if(eeH.style.display=='none'){
		q11();
		eeH.style.display='block'
	}else{
		q11()
	}
	q00()
}
function q20(){
	if(eeE.style.display!='block'){
		q11();
		eeE.style.display='block';
	}else{
		q11()
	}
	q00()
}
function q21(){
	if(eeG.style.display=='none'){
		q11();
		eeG.style.display='block'
	}else{
		q11()
	}
	q00()
}
function q22(){
	if(lock==0){
		r=q07();
		lock=1;
		s='ajx_user='+ajx_user+'&ajx_name='+ajx_name+'&ajx_last='+ajx_last+'&ajx_zone='+ajx_zone+'&rnd='+r;
		sess.open('post','aroom.php');
		if(ajx_line!=''){
			per=/%/g;
			ajx_line=ajx_line.replace(per,'%25');
			amp=/&/g;
			ajx_line=ajx_line.replace(amp,'%26');
			pl=/\+/g;
			ajx_line=ajx_line.replace(pl,'%2B');
			s=s+'&ajx_line='+ajx_line+'&ajx_lbiu='+ajx_lbiu+'&ajx_lclr='+ajx_lclr
		}ajx_line='';
		sess.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
		sess.onreadystatechange=q23;
		sess.send(s);
		tt1=new Date();
		latt=parseInt(tt1.getTime());
		document.getElementById('wttin').src=''+skin_dir+'/images/waitt.gif';
		document.getElementById('reqt').innerHTML=set_xmlr
		
	}
}
function q23(){
	if(sess.readyState==4){
		response=sess.responseText.toString();
		if(response.length<2){
			response=parseInt(response)
		}
		if(!isNaN(response)&&response>0){
			if(sup_errs<1){
				url='blab.php?r='+response;q05(url);
			}else{
				chat_tout=setTimeout('q22()',set_refr*1000);
			}
		}else{
			online='<div class="online_title">'+set_onle+'</div><div class="online_list">';
			addlns='';
			response=response.toString();
			reply=response.split('^');
			if(!reply[2]){
				if(sup_errs<1){
					url='info.php?why='+response;
					q05(url);
				}else{
					chat_tout=setTimeout('q22()',set_refr*1000);
				}
			}else{
				slast=reply[0].toString();
				lines=reply[1].toString();
				mnny=reply[2].toString();
				ajx_last=parseInt(slast);
				mnny=mnny.split('|');
				for(i=0;i<mnny.length;i++){
					aline=mnny[i].toString();
					aline=aline.split('*');
					if(parseInt(aline[1])==parseInt(ajx_user)){
						dtt=' &not;'
					}else{
						dtt=''
					}
					online=online+'&middot; '+aline[0]+dtt+'<br />'
				}
				lines=lines.split('|');
				for(i=0;i<lines.length;i++){
					aline=lines[i].toString();
					aline=aline.split('*');
					if(aline[2]){
						tmm=aline[0].toString();
						usr=aline[1].toString();
						if(tmm.length>1){
							tmm='<span class="small_font">['+tmm+']</span> '
						}
						usr='<span class="small_font"><b>'+usr+'</b></span>:';
						addlns=addlns+tmm+usr+' '+aline[2]+'<br />';
					}
				}
				if(addlns.length>9){
					txt=q24(txt);
					txt=txt+addlns;
					if(ajx_sndd==1){
						allow_flash=flash
					}else{
						allow_flash=''
					}
					eeB.innerHTML=txt+allow_flash
				}
				eeC.innerHTML=online+'</div>';
				eeB.scrollTop=999999;
				eeB.scrollTop=999999
			}
			lock=0;
			q13();
			if(mnny.length>199){
				q05('login.php')
			}else{
				tt2=new Date();
				latt=(parseInt(tt2.getTime())-latt)/1000;
				document.getElementById('reqt').innerHTML='['+set_latt+': '+latt+'s]';
				document.getElementById('wttin').src=skin_dir+'/images/waitt.png';
				chat_tout=setTimeout('q22()',set_refr*1000);
			}
		}
	}
}
function q24(t){
	l=50;
	a=t.split('<br />');
	if(a.length>l){
		b=a.length-l;t='';
		for(i=b;i<a.length;i++){
			t=t+'<br />'+a[i]
		}
	}
	return t
}
function q25(){
	eeB=document.getElementById('dvB');
	eeC=document.getElementById('dvC');
	eeE=document.getElementById('dvE');
	eeF=document.getElementById('dvF');
	eeG=document.getElementById('dvG');
	eeH=document.getElementById('dvH');
	eeL=document.getElementById('ln');
}
function q26(a){
	b=document.getElementById('reqt');
	if(a==1){
		if(typeof hdag=='number'){
			clearTimeout(hdag)
		}
		b.style.visibility='visible'
	}else{
		hdag=setTimeout("b.style.visibility='hidden'",3000)
	}
	return false
}
