function mozog(_e) {
 var e = _e || window.event;
 var x = (e.clientX + html.scrollLeft - 216);
 var y = (e.clientY + html.scrollTop - 400);
 var feliratok = {
  szabad: 'A PÁLYA SZABAD',
  foglalt: 'A PÁLYA FOGLALT',
  volt: 'ITT VOLT A VENDÉG'
 }
 repulo.style.left = x + 'px';
 repulo.style.top = y + 'px';
 
 repulo_palya.childNodes[0].nodeValue = 'PÁLYA ' + this.palya;
 repulo_ido.childNodes[0].nodeValue = this.ora + ':00 - ' + (this.ora + 1) + ':00';
 var ertek = this.childNodes[0].nodeValue;
 repulo_szabad.className = ertek;
 repulo_szabad.childNodes[0].nodeValue = feliratok[ertek];
}



var tabla, repulo, repulo_palya, repulo_ido, repulo_szabad, szulo, html;

function tabla1_inic() {
	tabla = document.getElementById('tabla');
	repulo = document.getElementById('repulo');
	repulo_palya = document.getElementById('repulo_palya');
	repulo_ido = document.getElementById('repulo_ido');
	repulo_szabad = document.getElementById('repulo_szabad');
	szulo = tabla.parentNode;

	tabla.onmouseover = function() { repulo.style.display = 'block'; };
	tabla.onmouseout = function() { repulo.style.display = 'none'; };

	var mezok = tabla.getElementsByTagName('a');
	html = document.getElementsByTagName('html')[0];
	var orakezdet = 6;
	var oszlopokszama = 5;
	for (var i = 0, l = mezok.length, ora = orakezdet, oszlop = 1; i < l; i++) {
		mezok[i].onmousemove = mozog;
		mezok[i].palya = oszlop;
		mezok[i].ora = ora;
		oszlop += 1;
		if (oszlop > oszlopokszama) {
			oszlop = 1;
			ora += 1;
		}
	}
}
