	var imgn="";
	var imgo="";
	
	
	//kepek betoltes fuggvenye
	function preload(imgSrc) {
	eval(imgSrc+'_off = new Image()')
	eval(imgSrc+'_off.src = "images/"+imgSrc+".jpg"')
	eval(imgSrc+'_on = new Image()')
	eval(imgSrc+'_on.src = "images/"+imgSrc+"_sel.jpg"')
	}
	
	//kep cserelgetes fomenuben fuggveny
	function chimg(imgName,imgObj) {
	    document.images[imgName].src = eval(imgObj+".src");
		imgn=imgName;
		imgo=imgObj;
	}
	
	//kepek betoltese
	
	menuitems=new Array('fooldal','hirek','beszamolok','esemeny','galeria','forum','chat','aprohirdetes','taglista','autob','webshop','letoltes','szabalyzat');
	
	for (i=0;i<menuitems.length;i++) {
		preload('layLeftMenu_'+menuitems[i])
		}
	

	//fomenuhoz tartozo fuggvenyeket indit
	function act(TI) {
		deact();chimg('layLM_'+TI,'layLeftMenu_'+TI+'_on');
	}

	//minden valtoztatast visszaallit ami a fomenuhoz tartozik
	function deact() {
			imgoend=imgo.substr(imgo.length-2,imgo.length);
			imgo=imgo.substr(0,imgo.length-3);
			if (imgoend=="on") {
			chimg(imgn,imgo+'_off');
			}
			imgo="";
			imgn="";
	}

	function createpopup(url, width, height)
	 {
	   popupz = window.open(url, "", "width=" + width + ", height=" + height + ", resizable=yes, menubar=no, toolbar=no, scrollbars=yes, location=no, status=no");
	   popupz.moveTo(10,10);
	 }

	//layer megjelenito
	function show_layer(layerName) {
	  document.getElementById(layerName).style.display='block';
	}

	//linkátirányító
	function gourl(url,linkid) {
	  document.getElementById(linkid).href=url;
	}


function popImage(src) {
	popup = open("","image","status=no, width=60, height=40, scrollbars=no");

	popup.document.open();

	popup.document.write("<html><head><title></title>");
	popup.document.write("<link rel='stylesheet' type='text/css' href='css/layout_clubseat.css'></link>");
	popup.document.write("</head>");
	popup.document.write("<body onload='self.resizeTo(document.imgItemPic.width+70,document.imgItemPic.height+110);' class='layPopupPic'>");
	popup.document.write("<div class='layPopupPicBox '>");
	popup.document.write("<div class='layCentPicLT'>");
	popup.document.write("<div class='layCentPicRT'>");
	popup.document.write("<div class='layCentPicLB'>");
	popup.document.write("<div class='layCentPicRB'>");
		popup.document.write("<div class='layCentPic'>");
	popup.document.write("<a href='javascript:;' OnCLick='javascript:window.close();'>");
	popup.document.write("<img name='imgItemPic' src='"+src+"' border='0'/>");
	popup.document.write("</a>");
	popup.document.write("</div>");
	popup.document.write("</div>");
	popup.document.write("</div>");
	popup.document.write("</div>");
	popup.document.write("</div>");
	popup.document.write("</body>");
	popup.document.write("</html>");

	popup.document.close();
	
}

//calendar layerek
/*
var cal_day_layerid='';
var cal_day_timeout=0;

function cal_day_show(divID) {
	clearTimeout(cal_day_timeout);
	cal_day_layerid=divID;
	document.getElementById(cal_day_layerid).style.display='';
}

function cal_day_hide(divID) {
	document.getElementById(divID).style.display='none';
}
*/
EventTimer = function() {

	var instance = this;
	var day_array = null;
	var prefix = "";

	this.init = function(item_count, prefix) {

		this.day_array = new Array();
		for(var i = 1; i < item_count; i++) {
			this.day_array[i] = 0;
		}
		this.prefix = prefix;
	}

	this.startTimer = function(number) {

		this.clearTimer(number);
		var func = function() {
			instance.showEvent(number, instance.prefix);
		}
		this.day_array[number] = window.setTimeout(func, 1000);
	}

	this.stopTimer = function(number) {

		this.clearTimer(number);
	}

	this.showEvent = function(number, prefix) {

		var event_div = document.getElementById(prefix + number);
		if (event_div) {
			event_div.style.display = "";
		}
	}

	this.clearTimer = function(number) {

		window.clearTimeout(this.day_array[number]);
		this.day_array[number] = 0;
	}
}

