
function ShowHide(layer_open, layer_close) {
	if (layer_open != '') {
		expandLayer(layer_open);
	}
	if (layer_close != '') {
		expandLayer(layer_close);
	}
}

function expandLayer(name) {
	var itm = null;

	if (document.getElementById) {
		itm = document.getElementById(name);
	} else if (document.all) {
		itm = document.all[name];
	} else if (document.layers) {
		itm = document.layers[name];
	}

	if (!itm) {
	// Just don't panik, it's ok
	} else if (itm.style) {
		if (itm.style.display == "none") {
			itm.style.display = "";
		} else {
			itm.style.display = "none";
		}
	} else {
		itm.visibility = "show";
	}
}


var agt = navigator.userAgent.toLowerCase();
var originalFirstChild;

function createTitle(which, string, x, y)
{
	if (typeof(originalFirstChild) == 'undefined')
	{
		originalFirstChild = document.body.firstChild;
	}

	x = document.all ? (event.clientX + document.body.scrollLeft) : x;
	y = document.all ? (event.clientY + document.body.scrollTop) : y;
	element = document.createElement('div');
	element.style.position = 'absolute';
	element.style.zIndex = 1000;
	element.style.visibility = 'hidden';
	excessWidth = 0;
	if (document.all)
	{
		excessWidth = 50;
	}
	excessHeight = 20;
	element.innerHTML = '<div class="bodyline"><table width="300" cellspacing="0" cellpadding="0" border="0"><tr><td><table width="100%"><tr><td><span class="gen">' + string + '</span></td></tr></table></td></tr></table></div>';
	renderedElement = document.body.insertBefore(element, document.body.firstChild);
	renderedWidth = renderedElement.offsetWidth;
	renderedHeight = renderedElement.offsetHeight;

	overFlowX = x + renderedWidth + excessWidth - document.body.offsetWidth;
	x = overFlowX > 0 ? x - overFlowX : x;

	overFlowY = y + renderedHeight + excessHeight - window.innerHeight - window.pageYOffset;
	y = overFlowY > 0 ? y - overFlowY : y;

	renderedElement.style.top = (y + 15) + 'px';
	renderedElement.style.left = (x + 15) + 'px';

	if (agt.indexOf('gecko') != -1 && agt.indexOf('win') != -1)
	{
		setTimeout("renderedElement.style.visibility = 'visible'", 1);
	}
	else
	{
		renderedElement.style.visibility = 'visible';
	}
}

function destroyTitle()
{
	if (document.body.firstChild != originalFirstChild)
	{
		document.body.removeChild(document.body.firstChild);
	}
}

function SiteMsn(){
var popurl="Sayfa.php?Git=SiteMsn&TurkEkip=AnaSayfa"
winpops=window.open(popurl,"","width=860,height=620,")
}
function BilgiYarismasi(){
var popurl="Sayfa.php?Git=BilgiYarismasi&Sayfa=Baslat"
winpops=window.open(popurl,"","width=650,height=500,")
}
function ResimYukle(){
var popurl="Sayfa.php?Git=HesapYonetim&op=ResimYukle"
winpops=window.open(popurl,"","width=350,height=200,")
}
function SifreDegistir(){
var popurl="Sayfa.php?Git=HesapYonetim&op=SifreDegistir"
winpops=window.open(popurl,"","width=350,height=200,")
}


function YeniPencereAc(url){
var popurl= url;
winpops=window.open(popurl,"","width=600,height=500,scrollbars=yes")
}

function TumAlanSec(select)
{
	with (document.forumadi)
	{
		var check = false;
		var i=0;

		for (i=0; i< elements.length; i++)
			if (elements[i].type == 'checkbox' && !elements[i].disabled)
				if (elements[i].name.substring(0, select.length) == select)
				{
					check = !(elements[i].checked);	break;
				}

		for (i=0; i < elements.length; i++)
			if (elements[i].type == 'checkbox' && !elements[i].disabled)
				if (elements[i].name.substring(0, select.length) == select)
					elements[i].checked = check;
	}
}