document.write('<link rel="stylesheet" href="'+(screen.width>800?1024:800)+'.css">');

function frameset(file, id, theURL) {
	if (!theURL) theURL=location.href+"?"+(new Date()).getTime();
	document.write('<script src="http://www.google-analytics.com/ga.js"></script>');
	document.write('<script>');
	document.write('  window.setTimeout(function() {');
	document.write('    var pageTracker = _gat._getTracker("UA-2477136-1");');
	document.write('    pageTracker._trackPageview();');
	document.write('  }, 0);');
	document.write('</script>');
	document.write('<frameset id="frameset1" name="frameset1" onmouseup="setTimeout(\'restrictResize()\',0)" cols="35%,*" border="5" bordercolor="#00B000" style="cursor:e-resize">');
	document.write('  <frameset rows="30,*" border="0" framespacing="0">');
	document.write('    <frame name="c" id="c" src="/closetree.htm" marginwidth="0" marginheight="0" scrolling="no" border="0" frameborder="0">');
	document.write('    <frame name="b" id="b" src="/menu'+(file!=0?file:"")+'.htm?'+id+'" marginwidth="5" marginheight="5" scrolling="auto" border="0">');
	document.write('  </frameset>');
	document.write('  <frameset rows="30,*" border="0" framespacing="0">');
	document.write('    <frame name="f" id="f" src="/quickmenu.htm" marginwidth="0" marginheight="0" scrolling="no" border="0" frameborder="0">');
	document.write('    <frame name="j" id="j" src="',theURL,'" marginwidth="10" marginheight="10" scrolling="auto" border="0" style="border: none">');
	document.write('  </frameset>');
	document.write('</frameset>');
}

function restrictResize() {
	fs=document.getElementById("frameset1");
	var ratio = document.getElementById("b").offsetWidth /
	            document.getElementById("j").offsetWidth;
	if (ratio<0.18) fs.cols="18%,*";
	if (ratio>0.6) fs.cols="60%,*";
}

function openmenu(file, id) {
	if (!top.frames.j.location.search) {
		var pageTracker = _gat._getTracker("UA-2477136-1");
		pageTracker._trackPageview();
	}
	r = /menu(\d*)\.htm/;
	m = r.exec(top.frames.b.location.href);
	currentmenu = m ? m[1] : "";
	if (file!=currentmenu)
		top.frames.b.location.href="/menu"+(file!=0?file:"")+".htm?"+id;
	else
		openitem(id);
}

function n(obj, open) {
	id = obj.id.substring(1);
	doc = window==top ? document : top.frames.b.document;
	table = doc.getElementById("t"+id);
	if (table==null) return;
	for (next=table.nextSibling; next!=null && next.tagName==undefined; next=next.nextSibling) ;
	if (open==null) open = document.images["f"+id].src.indexOf("d.gif")==-1;
	doc.images["f"+id].src = open?"d.gif":"c.gif";
	doc.images["n"+id].src = next ? (open?"g.gif":"j.gif") : (open?"f.gif":"i.gif");
	table.style.display = open?"block":"none";
}

function cf(file) {
	location.href="menu"+file+".htm?0";
}

function openitem(id) {
	doc = window==top ? document : top.frames.b.document;
	tables = doc.getElementsByTagName("table");
	if (id!=0)
		for (t in tables)
			if (tables[t].id && tables[t].id!="t0" && tables[t].id.substring(0,1)=="t")
				n(tables[t], false);
	table = doc.getElementById("t"+id);
	if (!table) return;
	while (table.tagName.toLowerCase() != "body") {
		if (table.tagName.toLowerCase() == "table" &&
			table.parentNode.tagName.toLowerCase() == "td") n(table,true);
		table=table.parentNode;
	}
}

var sc_project=1035827;
var sc_invisible=1;
var sc_partition=9;
var sc_security="0e47159d";

function follow(file, id) {
	if (window==top) frameset(file, id);
	else {
		top.document.title = document.title + " \u2013 Kulturális Enciklopédia";
		document.write('<script src="http://www.statcounter.com/counter/frames.js"></script>');
		document.write('<script src="http://www.google-analytics.com/ga.js"></script>');
	}
}

function insertad() {
	google_ad_client = "pub-2836746733433222";
	google_ad_width = 468;
	google_ad_height = 60;
	google_ad_format = "468x60_as";
	google_ad_type = "text_image";
	google_ad_channel = "";
	google_color_border = "99C9FF";
	google_color_bg = "DCE4F0";
	google_color_link = "0000FF";
	google_color_text = "000000";
	google_color_url = "008000";
	document.write('<br><script src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>');
}

function insertffad() {
}
