function MM_preloadImages() {
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

if (document.images) {
index_B1_off = new Image(); index_B1_off.src = "./img/menu_szalloda.png"
index_B1_over = new Image(); index_B1_over.src = "./img/menu_szalloda_over.png"
index_B2_off = new Image(); index_B2_off.src = "./img/menu_szolgaltatasaink.png"
index_B2_over = new Image(); index_B2_over.src = "./img/menu_szolgaltatasaink_over.png"
index_B3_off = new Image(); index_B3_off.src = "./img/menu_konferencia.png"
index_B3_over = new Image(); index_B3_over.src = "./img/menu_konferencia_over.png"
index_B4_off = new Image(); index_B4_off.src = "./img/menu_szabadido.png"
index_B4_over = new Image(); index_B4_over.src = "./img/menu_szabadido_over.png"
index_B5_off = new Image(); index_B5_off.src = "./img/menu_gasztronomia.png"
index_B5_over = new Image(); index_B5_over.src = "./img/menu_gasztronomia_over.png"
index_B6_off = new Image(); index_B6_off.src = "./img/menu_elerhetosegek.png"
index_B6_over = new Image(); index_B6_over.src = "./img/menu_elerhetosegek_over.png"
index_B7_off = new Image(); index_B7_off.src = "./img/menu_onlineszobafoglalas.png"
index_B7_over = new Image(); index_B7_over.src = "./img/menu_onlineszobafoglalas_over.png"
index_B8_off = new Image(); index_B8_off.src = "./img/menu_onlineajanlatkeresrendezvenyre.png"
index_B8_over = new Image(); index_B8_over.src = "./img/menu_onlineajanlatkeresrendezvenyre_over.png"
}
function turn_off(Imagename) {
	if (document.images != null) {
		document[Imagename].src = eval(Imagename + "_off.src");
	}
}
function turn_over(Imagename) {
	if (document.images != null) {
		document[Imagename].src = eval(Imagename + "_over.src");
	}
}

function nospam(name, domain) {
  document.location = "mailto:" + name + "@" + domain;
}

function checkData_mail(){
	if (document.urlapmail.nev.value == "") {
	alert("Kérem, adja meg a nevét.")
	document.urlapmail.nev.focus()
	return false}
	if (document.urlapmail.email.value == "") {
	alert("Kérem, adja meg e-mailcímét.")
	document.urlapmail.email.focus()
	return false}
	if (document.urlapmail.email.value.indexOf('@') == -1) {
	alert("Az e-mailcím nem megfelelő formátumú...")
	document.urlapmail.email.focus();
	return false}
	if (document.urlapmail.email.value.indexOf('.') == -1) {
	alert("Az e-mailcím nem megfelelő formátumú...")
	document.urlapmail.email.focus()
	return false}
	if (document.urlapmail.uzenet.value == "") {
	alert("Kérem, írja le üzenetét.")
	document.urlapmail.uzenet.focus()
	return false}
	}

function checkData_foglalas(){
                      ma = new Date();
                      var ev = ma.getYear();
                      var honap = (ma.getMonth() + 1);
                      var nap = ma.getDate();

                                if (document.urlapfoglalas.nev.value == "") {
                                        alert("Kérem, adja meg a nevét.");
                                        document.urlapfoglalas.nev.focus();
                                        return false}
                                if (document.urlapfoglalas.telefon.value == "") {
                                        alert("Kérem, adja meg a telefonszámát.");
                                        document.urlapfoglalas.telefon.focus();
                                        return false}
                                var telchkZ = 1;
                                  for(i=0;i<document.urlapfoglalas.telefon.value.length;++i)
                                  if(document.urlapfoglalas.telefon.value.charAt(i) < "0"
                                  || document.urlapfoglalas.telefon.value.charAt(i) > "9")
                                  telchkZ = -1;
                                  if (telchkZ == -1){
                                        alert("A telefonszám nem megfelelő formátumú.\nCsak számokat lehet - szóközök nélkül - megadni...");
                                        document.urlapfoglalas.telefon.focus();
                                        return false}
                                if (document.urlapfoglalas.email.value == "") {
                                        alert("Kérem, adja meg e-mailcímét.");
                                        document.urlapfoglalas.email.focus();
                                        return false}
                                if (document.urlapfoglalas.email.value.indexOf('@') == -1) {
                                        alert("Az e-mailcím nem megfelelő formátumú...");
                                        document.urlapfoglalas.email.focus();
                                        return false}
                                if (document.urlapfoglalas.email.value.indexOf('.') == -1) {
                                        alert("Az e-mailcím nem megfelelő formátumú...");
                                        document.urlapfoglalas.email.focus();
                                        return false}
                                if (document.urlapfoglalas.erkezes_ev.value == "") {
                                        alert("Kérem, adja meg a rendezvény évét.");
                                        document.urlapfoglalas.erkezes_ev.focus();
                                        return false}
                                if (document.urlapfoglalas.erkezes_honap.value == "") {
                                        alert("Kérem, adja meg a rendezvény hónapját.");
                                        document.urlapfoglalas.erkezes_honap.focus();
                                        return false}
                                if (document.urlapfoglalas.erkezes_nap.value == "") {
                                        alert("Kérem, adja meg a rendezvény napját.");
                                        document.urlapfoglalas.erkezes_nap.focus();
                                        return false}
                                if ((document.urlapfoglalas.erkezes_ev.value == ev) && (document.urlapfoglalas.erkezes_honap.value < honap)) {
                                        alert("Kérem, pontosítsa a rendezvény hónapját.\nA megadott időpont már elmúlt...");
                                        document.urlapfoglalas.erkezes_honap.focus();
                                        return false}
                                if ((document.urlapfoglalas.erkezes_ev.value == "2010") && (document.urlapfoglalas.erkezes_honap.value == "2")                                         &&  (document.urlapfoglalas.erkezes_nap.value == "29")) {
                                        alert("Kérem, pontosítsa a rendezvény napját.\nIlyen nap nem létezik...");
                                        document.urlapfoglalas.erkezes_nap.focus();
                                        return false}
                                if ((document.urlapfoglalas.erkezes_ev.value == ev) && (document.urlapfoglalas.erkezes_honap.value == honap) &&                                    (document.urlapfoglalas.erkezes_nap.value < nap)) {
                                        alert("Kérem, pontosítsa a rendezvény napját.\nA megadott időpont már elmúlt...");
                                        document.urlapfoglalas.erkezes_nap.focus();
                                        return false}
                                if ((document.urlapfoglalas.erkezes_honap.value == "2") && (document.urlapfoglalas.erkezes_nap.value == "30")) {
                                        alert("Kérem, pontosítsa a rendezvény napját.\nIlyen nap nem létezik...");
                                        document.urlapfoglalas.erkezes_nap.focus();
                                        return false}
                                if ((document.urlapfoglalas.erkezes_honap.value == "2") && (document.urlapfoglalas.erkezes_nap.value == "31")) {
                                        alert("Kérem, pontosítsa a rendezvény napját.\nIlyen nap nem létezik...");
                                        document.urlapfoglalas.erkezes_nap.focus();
                                        return false}
                                if ((document.urlapfoglalas.erkezes_honap.value == "4") && (document.urlapfoglalas.erkezes_nap.value == "31")) {
                                        alert("Kérem, pontosítsa a rendezvény napját.\nIlyen nap nem létezik...");
                                        document.urlapfoglalas.erkezes_nap.focus();
                                        return false}
                                if ((document.urlapfoglalas.erkezes_honap.value == "6") && (document.urlapfoglalas.erkezes_nap.value == "31")) {
                                        alert("Kérem, pontosítsa a rendezvény napját.\nIlyen nap nem létezik...");
                                        document.urlapfoglalas.erkezes_nap.focus();
                                        return false}
                                if ((document.urlapfoglalas.erkezes_honap.value == "9") && (document.urlapfoglalas.erkezes_nap.value == "31")) {
                                        alert("Kérem, pontosítsa a rendezvény napját.\nIlyen nap nem létezik...");
                                        document.urlapfoglalas.erkezes_nap.focus();
                                        return false}
                                if ((document.urlapfoglalas.erkezes_honap.value == "11") && (document.urlapfoglalas.erkezes_nap.value == "31")) {
                                        alert("Kérem, pontosítsa a rendezvény napját.\nIlyen nap nem létezik...");
                                        document.urlapfoglalas.erkezes_nap.focus();
                                        return false}
                                if (document.urlapfoglalas.letszam.value == "") {
                                        alert("Kérem, adja meg a létszámot.");
                                        document.urlapfoglalas.letszam.focus();
                                        return false}
                                var letszamchkZ = 1;
                                  for(i=0;i<document.urlapfoglalas.letszam.value.length;++i)
                                  if(document.urlapfoglalas.letszam.value.charAt(i) < "0"
                                  || document.urlapfoglalas.letszam.value.charAt(i) > "9")
                                  letszamchkZ = -1;
                                  if (letszamchkZ == -1){
                                        alert("A létszám nem megfelelő formátumú.\nCsak számokat lehet - szóközök nélkül - megadni...");
                                        document.urlapfoglalas.letszam.focus();
                                        return false}
                                var rendletszam = eval(document.urlapfoglalas.letszam.value);
                                if (rendletszam < 1) {
                                        alert("Kérem, adja meg a létszámot.");
                                        document.urlapfoglalas.letszam.focus();
                                        return false}
                               if (document.urlapfoglalas.egyebigenyek.value == "") {
                                        alert("Kérem, írja le elképzeléseit, kívánságait...");
                                        document.urlapfoglalas.egyebigenyek.focus();
                                        return false;}
}

function openwindow(image,windowwidth,windowheight,title) {
xpos = (window.screen.width-windowwidth)/2;
ypos = ((window.screen.height-windowheight)/2-20);
imagewindow=open('','_blank','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,width='+windowwidth+',height='+windowheight+',left='+xpos+',top='+ypos+',resizable=0');
imagewindow.document.write('<html>');
imagewindow.document.write('<title>'+title+'</title>');
imagewindow.document.write('<body topmargin="0" leftmargin="0" marginheight="0" marginwidth="0" ');
imagewindow.document.write('bottommargin="0" rightmargin="0" style="background-image: url(wait.gif); background-repeat: no-repeat; background-position: center center;">');
imagewindow.document.write('<a href="javascript:window.close()"><img src="'+image+'" border="0" alt="Kattintson a bezáráshoz."></a>');
imagewindow.document.write('</body>');
imagewindow.document.write('</html>');
}
