var tho = 'in-chat.com.ua';
function inb(i) {
document.forms.sender.tp.value=document.forms.sender.tp.value+' <'+i+'> ';
}

function tos(n,user) {
document.forms.post.tp.value=document.forms.post.tp.value+'\n <B>to['+n+'] '+user+': </B>';
document.forms.post.tp.focus();
}

function show_smiles() {
window.open('smiles.cp','','toolbar=0,status=0,menubar=0,scrollbars=1,resizable=no,width=300,height=300');
}

function user_info(nums) {
window.open('http://'+tho+'/info/'+nums+'.html','','toolbar=0,status=0,menubar=0,scrollbars=1,resizable=yes,width=980,height=700');
return false;
}

function o_aw(action) {
window.open('http://admin.'+tho+'/'+action,'','toolbar=0,status=0,menubar=0,scrollbars=1,resizable=yes,width=400,height=300');
return false;
}

function getCookie(name) {
var prefix = name + "=";
var cookieStartIndex = document.cookie.indexOf(prefix);
if(cookieStartIndex == -1) return null;
var cookieEndIndex = document.cookie.indexOf(";", cookieStartIndex + prefix.length);
if(cookieEndIndex == -1) cookieEndIndex = document.cookie.length;
return unescape(document.cookie.substring(cookieStartIndex + prefix.length, cookieEndIndex));
}
	    
function sconfirm(fm) {
return confirm('Увага!\nЗапам\'ятати пароль це означає:\nВам не потрібно вводити логін і пароль на протязі місяця, тобто з вашого комп\'ютера зможуть зайти без Вашого відома, якщо не Ви за комп\'ютером.Для того щоб вийти з чату, вам потрібно натиснути на вихі. \nНе рекомендується використувовути цю опцію, якщо ви в клубі, або Вашим комп\'ютером користується ще хтось...\nВи впевнені що хочете запамя\'тати пароль?');
} 

function quote(id) {
window.alert('В розробці...');
}



function get_brouser()
{
        this.ver = navigator.appVersion.toLowerCase();
        this.verNum = parseInt(this.ver);
        this.agent = navigator.userAgent.toLowerCase();
        this.dom = (document.getElementById ? 1 : 0);
        this.opera = (this.agent.indexOf("opera") > -1 && this.dom ? 1 : 0);
        this.opera7 = (this.opera && this.verNum >= 7);
        this.opera9 = (this.opera && this.verNum >= 9);
        this.ie = (this.ver.indexOf("msie") > -1 && this.dom && !this.opera ? 1 : 0);
        this.ieVer = 0;
        if (this.ie) {
                var pos = this.ver.indexOf("msie");
                if (pos != -1)
                        this.ieVer = parseInt(this.ver.substr(pos + 5));
        }
        this.ie6 = (this.ie && (this.ieVer >= 6));
        this.ie6only = (this.ie && (this.ieVer >= 6) && (this.ieVer < 7));
        this.ie7 = (this.ie && (this.ieVer >= 7));
        this.macOS = (this.agent.indexOf("mac") > -1);
        this.mac = (this.macOS && this.verNum >= 7 ? 1 : 0);
        this.moz = (this.agent.indexOf("gecko") > -1);
        this.ns6 = (this.dom && this.agent.indexOf("netscape") > -1 && this.verNum >= 5 ? 1 : 0);
        this.ff = (this.agent.indexOf("firefox") > -1);
        this.b = (this.ie || this.ns6 || this.opera7 || this.mac || this.moz || this.dom);

        return this;
}

var brt = new get_brouser();


function load_a(){
ael1=document.getElementById('at1')
ael2=document.getElementById('at2')
ael3=document.getElementById('at3')
ael4=document.getElementById('at4')
ael5=document.getElementById('at5')
ael6=document.getElementById('at6')
ael10=document.getElementById('at10')
var bnt1='<Center><iframe id="a1a1da44" name="a1a1da44" src="http://a.'+tho+'/a.cp?n=a1a1da44" framespacing="0" frameborder="no" scrolling="no" width="100" height="100" allowtransparency="true"></iframe></center>';
var bnt2='<iframe id="a3d5f73b" name="a3d5f73b" src="http://a.'+tho+'/a.cp?n=a3d5f73b" framespacing="0" frameborder="no" scrolling="no" width="120" height="60" allowtransparency="true"></iframe>';
var bnt3='<iframe id="ae7e69ef" name="ae7e69ef" src="http://a.'+tho+'/a.cp?n=ae7e69ef" framespacing="0" frameborder="no" scrolling="no" width="468" height="60" allowtransparency="true"></iframe>';
if (ael1) {ael1.innerHTML=bnt1;}
if (ael2) {ael2.innerHTML=bnt1;}
if (ael3) {ael3.innerHTML=bnt2;}
if (ael4) {ael4.innerHTML=bnt3;}
if (ael5) {ael5.innerHTML=bnt2;}
if (ael6) {ael6.innerHTML='<iframe id="b120" name="b120" src="http://a.'+tho+'/a.cp?n=120600" framespacing="0" frameborder="no" scrolling="no" width="120" height="600" allowtransparency="true"></iframe>';}
if (ael10) {ael10.innerHTML=bnt3;}

}

function mo(obj)
{
	this.elem = document.getElementById(obj);
   	this.css = this.elem ? this.elem.style : null;
	return this;
}

var px = window.opera ? "" : "px";
var topos=0;
function spos(next) {
	var oT = new mo("mFF");
	var oT1 = new mo("fF");
	if (!oT.elem || !oT1.elem)
		return true;
	var oTmpW = 600;
	var sW = (!brt.ie) ? self.innerWidth : self.document.body.offsetWidth;

	oT.css.width= oT1.css.width = oTmpW + px;
	oT.css.left = (sW - oTmpW)/2 + px;
	oT.css.top = document.body.scrollTop + parseInt(sW * 0.07);
	if (next) setTimeout("spos("+next+")",500);
}
function sh_ad(act, formAct)
{
	var oT = new mo("mFF");
	var oT1 = new mo("fF");
	if (!oT.elem || !oT1.elem)
		return true;
	if (act) {
		oT.css.display = 'none';
		tDisplay('SELECT', 'visible');
		tDisplay('OBJECT', 'visible');
		tDisplay('EMBED', 'visible');
	spos(0);
	} else {
	spos(1);
		if(brt.ns6 && !brt.opera) return true;
		oT.css.display = 'block';
		tDisplay('SELECT', 'hidden');
		tDisplay('OBJECT', 'hidden');
		tDisplay('EMBED', 'hidden');
		
	}

	return false;
}

function tDisplay(tag, value)
{
	var s = document.getElementsByTagName(tag);
	for (var i = 0; i < s.length; i++)
		s[i].style.visibility = value;
}

function aD() {
	var el = new mo('mFF');
	if (!el.elem)
		return;
	el.elem.innerHTML = '<table cellspacing="0" border=1 bordercolor=red cellpadding="0" id="fF" bgcolor=White onkeyup="if(event.keyCode==27)sh_ad(1)">' +
	'<tr bgcolor=Red><td width=99%>&nbsp;&nbsp;<span style="color:white"><b>Увага!!!</b></span></td><td width=20><A href=# onclick="sh_ad(1);" class=link4 style="color:white">Закрити</a>&nbsp;&nbsp;</td></tr>' +
	'<tr><td colSpan=2>'+
	'<div class=text2 leftmargin=10>'+
'<h1>Безкоштовний доступ</h1>'+
'<p>In-Chat спільно з проектом <A href=http://in-net.com.ua/ target=_blank class=text2>In-Net</a> пропонують користувачам чату безкоштовний доступ до Ін-Чату та Інтернету через модем. </p>'+
'<p>Відтепер для входу в мережу Інтернет не потрібно купувати картки, укладати договори, реєструватись достатньо ввести телефон доступу, логін та пароль і користуватися всіма можливостями всесвітньої мережі.</p>'+
'<p>Доступ до інтернету та чату не оплачується, оплачується тільки місцевий телефонний звязок.</p>'+
'<p>Послуга надається для абонентів м.Львів</p>'+
'<b>Параметри для підключення абонентів: </b>'+
'<br>ім\'я користувача - <i>in-chat</i><br>'+
'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;пароль – <i>in-chat</i><br><br>'+
'<b>Телефони для дозвону:</b><br>'+
'Львів: <i>224-79-49</i><br>'+
'<br><br>Всі питання, пропозиції, зауваження прошу на <a href=http://in-chat.com.ua/forum/topic/135649.html class=text2 target=_blank>форумі</a></div><br><p align=right><A href=# onclick="sh_ad(1);" class=link4>Закрити</a>&nbsp;&nbsp;&nbsp;</p><br></td></tr></table>';
	el.css.display = 'none';
}