var kban="kisabanner.php";

function openWin(page, i, width, height) {
	window.name = "main";
	if(!width) width=488;
	if(!height) height=270;
	Win=this.open(page+'?i='+i, "smiley"+i, "toolbar=no,scrollbars=yes,resizable=yes,status=yes,height="+height+",width="+width);
	Win.focus();
	return false;
}


function openWin2(page, i, width, height) {
	window.name = "main";
	if(!width) width=488;
	if(!height) height=270;
	Win=this.open(page, 'profile'+i, "toolbar=no,scrollbars=yes,resizable=no,status=yes,height="+height+",width="+width);
	Win.focus();
	return false;
}

function ShowD(t)
{
	var currStyle = document.getElementById(t).style.display; var cact;
	if ( currStyle == 'block' ) { cact = 'none'; } else { cact = 'block'; }
	document.getElementById(t).style.display = cact;
}

function ShowAct(t,veids)
{
	var currStyle = document.getElementById(t).style.display; var cact;
	if ( veids == '0' ) { cact = 'none'; } else { cact = 'block'; }
	document.getElementById(t).style.display = cact;
	return;
}


function CheckAll(obj) { 
	var form_obj = obj.form
	for (i = 0;i < form_obj.length;i++ )	{
		if (form_obj.elements[i].type == "checkbox") { 
			form_obj.elements[i].checked = (obj.checked) ? true : false; 
		}
	}
}

function mt(v) {
n=Math.round(Math.random()*1000000);
u=kban+'?u='+n;
document.getElementById(v).src=u;
setTimeout("mt('"+v+"');",30000);
}

function RefreshCurrentPage() {
	var href = window.location.href;
	window.location.assign(href);
}

function getValCheck(i) {
t=document.getElementById(i).checked;
if (t==true) { v=1; } else { v=0;}
return v;
}