function over(id)
{
	var tr = document.getElementById(id);
	for (var i = 0; i < tr.childNodes.length; i++)
	{
		if (tr.childNodes[i].nodeName == "TD")
		{
			tr.childNodes[i].firstChild.src = "images/" + id + "_a.jpg";
			break;
		}
	}

	tr.style.backgroundColor = "#fff581";
}

function out(id)
{
	var tr = document.getElementById(id);
	for (var i = 0; i < tr.childNodes.length; i++)
	{
		if (tr.childNodes[i].nodeName == "TD")
		{
			tr.childNodes[i].firstChild.src = "images/" + id + "_in.jpg";
			break;
		}
	}

	tr.style.backgroundColor = "transparent";
}

function show_varjon(type)
{
	var varjon;

	if (type == 1)
		varjon = parent.document.getElementById("varjon");
	else
		varjon = document.getElementById("varjon");
	varjon.style.visibility = "visible";
	/*
	var div = document.createElement("div");
	div.setAttribute("id", "varjon");
	var img = document.createElement("img");
	img.src = "images/varjon.gif";
	img.title = "kérem várjon";
	div.appendChild(img);
	window.document.body.appendChild(div);
	alert(div);
	*/
}

function clickel(id)
{
	switch(id)
	{
		case "ugyfelkapu":
			show_varjon(0);
			if (navigator.userAgent.indexOf("Gecko") == -1)
				window.location = "https://mikroweb.hu:444/index.php?width=" + (document.body.clientWidth-4) +
				"&height=" + (document.body.clientHeight-1);
			else
				window.location = "https://mikroweb.hu:444/index.php?width=" +
				window.innerWidth + "&height=" + (window.innerHeight+5);
			break;
		case "demougyfelkapu":
			show_varjon(1);
			if (navigator.userAgent.indexOf("Gecko") == -1)
				parent.location = "https://mikroweb.hu:444/index.php?width=" + 
				(parent.document.body.clientWidth - 21) + "&height=" + (parent.document.body.clientHeight-1);
			else
				parent.location = "https://mikroweb.hu:444/index.php?width=" + 
				parent.innerWidth + "&height=" + (parent.innerHeight+5);
			break;
		default:
			var table = document.getElementById("tartalom_table");
			var iframe = document.getElementById("tartalom");

			iframe.src = id + ".php";
			iframe.width = "100%";
			iframe.height = "100%";
			table.style.visibility = "visible";
			break;
	}
}

function bezar()
{
	document.getElementById("tartalom_table").style.visibility = "hidden";
}

