function setheight() {
	fejresz_top = document.getElementById("fejresz").offsetTop;
	fejresz_magassag = document.getElementById("fejresz").offsetHeight;
	tartalomalja_alja = document.getElementById("tartalomalja").offsetTop;
	tartalomalja_magassag = document.getElementById("tartalomalja").offsetHeight;
	jobbsavalja_alja = document.getElementById("jobbsavalja").offsetTop;
	jobbsavalja_magassag = document.getElementById("jobbsavalja").offsetHeight;
	
	if (tartalomalja_alja>=jobbsavalja_alja)
	{	szamitott_magassag = tartalomalja_alja + tartalomalja_magassag - fejresz_top - fejresz_magassag; }
	else 
	{ szamitott_magassag = jobbsavalja_alja + jobbsavalja_magassag - fejresz_top - fejresz_magassag; }

	
	document.getElementById("kozep").style.height = szamitott_magassag;
	document.getElementById("tartalom").style.height = szamitott_magassag;
	document.getElementById("balsav").style.height = szamitott_magassag;
	document.getElementById("jobbsav").style.height = szamitott_magassag;

	document.getElementById("all").style.height = document.getElementById("fejresz").offsetHeight + szamitott_magassag + document.getElementById("lablec").offsetHeight;
}

function setpos() {
	var base_x = document.getElementById("kozep").clientLeft;
	document.getElementById("balsav").style.left = base_x;
	document.getElementById("tartalom").style.left = base_x + 100;
	document.getElementById("jobbsav").style.left = base_x + 500;
}

function ujablak(forras) {
	newwin=window.open(forras,'','toolbar=no,directories=no,menubar=no,scrollbars=no,resizeable=no,status=no,width=400,height=400');
	//window.blur();
	newwin.focus();
}

function printit() {
	forras=window.location.href + "?print";
	newwin=window.open(forras,'','toolbar=no,directories=no,menubar=no,scrollbars=yes,resizeable=no,status=no,width=500,height=400');
	//window.blur();
	newwin.focus();
}

function setActiveStyleSheet(title) {
   var i, a, main;
   for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
     if(a.getAttribute("rel").indexOf("style") != -1
        && a.getAttribute("title")) {
       a.disabled = true;
       if(a.getAttribute("title") == title) a.disabled = false;
     }
   }
}

function checkprint() {
	url = window.location.search;
	if (url.indexOf("print")!=-1)	{setActiveStyleSheet("prnt");}
}
