function setCookie(c_name,value,c_path,expireinsec){
	var futdate = new Date();
	var expdate = futdate.getTime();
	expdate += expireinsec*1000;
	futdate.setTime(expdate);
	var newCookie=c_name+"="+value+"; path="+c_path+";";
	newCookie += " expires=" + futdate.toGMTString();
	window.document.cookie=newCookie;
}
function getCookie(c_name)
	{if(document.cookie.length>0)
	{c_start=document.cookie.indexOf(c_name+"=");if(c_start!=-1)
	{c_start=c_start+c_name.length+1;c_end=document.cookie.indexOf(";",c_start);if(c_end==-1)c_end=document.cookie.length;return unescape(document.cookie.substring(c_start,c_end));}}
	return"";}
function tjatirany(){
	if (window.top.location==window.self.location){
		var path=window.top.location;
		var patt=new RegExp("[a-z].html$","i");
		var azon0=patt.exec(path);
		patt=new RegExp("^[a-z]","i");
		var azon=patt.exec(azon0);
		window.top.location.replace("index"+azon+".html");
	};
}
function tatirany(){
	//~ Ellenőrzés: közvetlenül lett-e megnyitva...
	if (window.top.location==window.self.location){
		var path=window.top.location;
		var patt=new RegExp("[a-z][0-9]{6,6}\.html$","i");
		var fname=patt.exec(path);
		setCookie("turl",fname,"/",20);
		patt=new RegExp("^[a-z]","i");
		var fnameprefix=patt.exec(fname);
		var fnameprefix2=""+fnameprefix;
		window.top.location.replace("../index"+fnameprefix2.toLowerCase()+".html");
	//~ Átirányított megnyitás esetén...
	}else{
		var turlC=getCookie("turl");
		setCookie("turl","","/",20);
		if(turlC!=null && turlC!=""){
			window.top.document.getElementById("tartalom").src=("tartalom/"+turlC);
		};
	};
}
function flverdet(major,minor,rev){
	if (!(FlashDetect.installed)){
		var x=confirm("Az Ön böngészőjéhez nincs Adobe Flash Player telepítve.\nAz oktatóanyagok futtatásához mindenképpen szüksége lesz erre, tehát ajánljuk, hogy először töltse le az alábbi weboldalról, majd telepítse fel:\n\nhttp://get.adobe.com/flashplayer/\n\nvagy meglátogathatja közvetlenül is ezt az oldalt, ha az [OK] gombra kattint.");
		if (x){
			window.open("http://get.adobe.com/flashplayer/");
		};
	}else if (!(FlashDetect.versionAtLeast(major,minor,rev))){
		var x=confirm("Az Ön böngészőjéhez nincs megfelelő verziójú Adobe Flash Player telepítve.\nEhhez az oktatóanyaghoz minimálisan szükséges verzió:\n"+major+"."+minor+"."+rev+"\nAz Ön böngészőjéhez tartozó Flash Player verzió:\n"+FlashDetect.major+"."+FlashDetect.minor+"."+FlashDetect.revision+"\n\nEzért ajánljuk, hogy először töltse le és telepítse fel a legfrissebb verziót az alábbi weboldalról:\nhttp://get.adobe.com/flashplayer/\n\nvagy meglátogathatja közvetlenül is ezt az oldalt, ha az [OK] gombra kattint.");
		if (x){
			window.open("http://get.adobe.com/flashplayer/");
		};
	};
}
function tjelemmegj(){
	var path=window.self.location;
	var patt=new RegExp("[a-z][0-9]{6,6}\.html$","i");
	var fname=""+patt.exec(path);
	var x=window.top.window.frames["tartalomjegyzek"].document.getElementsByTagName("a");
	for (i=0;i<x.length;i++){
		var fnameintj=""+patt.exec(x[i].href);
		if (fnameintj==fname){
			x[i].style.fontWeight="bold";
			x[i].style.fontStyle="italic";
			x[i].style.color="white";
			x[i].style.textDecoration="underline";
			chapOpen(x[i].parentNode);
		}else{
			x[i].style.fontWeight="normal";
			x[i].style.fontStyle="normal";
			x[i].style.color="#C9ECF5";
			x[i].style.textDecoration="none";
		};
	}
}
function chapOpen(xParent){
	if(xParent.nodeName.toLowerCase()!="body"&&previousSibling(xParent.parentNode)!=false){
		xParent.parentNode.style.display="block";
		previousSibling(xParent.parentNode).style.backgroundImage="url('kepek/minus.gif')";
		chapOpen(xParent.parentNode.parentNode);
	};
};
function hTeszt(){
	var clientH=window.top.getH();
	var clientW=window.top.getW();
	if(clientH<minH&&clientW<screen.width){
		alert("Az Ön böngészőterülete kisebb, mint amit a lecke oktatóanyagai megkívánnak. Javasoljuk váltson teljes képernyős módba.\n\nTeljes képernyős módba történő átváltáshoz használja az [F11] funkcióbillentyűt.\n\n");
	};
};
var isitinMinMode=false;
function minMode(){
	var clientH=window.top.getH();
	var xH=minH+14+60;
	if(clientH<minH){
		window.top.document.getElementsByTagName("html")[0].style.overflowY="scroll";
		window.top.document.getElementsByTagName("body")[0].style.height=xH+"px";
		window.top.document.getElementById("kozepsoresz").style.height=xH+"px";
		window.top.window.scrollTo(0,(minH-10)-clientH);
		isitinMinMode=true;
		window.top.hKorr();
	};
};
function mode0(){
	if(isitinMinMode){
		window.top.document.getElementsByTagName("html")[0].style.overflowY="hidden";
		window.top.document.getElementsByTagName("body")[0].style.height="100%";
		window.top.document.getElementById("kozepsoresz").style.height="100%";
		window.top.window.scrollTo(0,0);
		isitinMinMode=false;
		window.top.hKorr();
	};
};
function getCont(keret,cimke,ssz){
	return window.top.window.frames[keret].document.getElementsByTagName(cimke)[ssz].innerHTML;
};
function empty(){
};
function nextSibling(startBrother){
	var tempObj = startBrother.nextSibling;
	if(tempObj==null){return false;};
	while(tempObj.nodeType!=1 && tempObj.nextSibling!=null){
		tempObj = tempObj.nextSibling;
	}
	return (tempObj.nodeType==1)?tempObj:false;
}
function previousSibling(startBrother){
	var tempObj = startBrother.previousSibling;
	if(tempObj==null){return false;};
	while(tempObj.nodeType!=1 && tempObj.previousSibling!=null){
		tempObj = tempObj.previousSibling;
	}
	return (tempObj.nodeType==1)?tempObj:false;
}

