function MM_reloadPage(init) {  
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function right(e) {
if (navigator.appName == 'Netscape' &&
(e.which == 3 || e.which == 2)) {
alert("© Parkgaststätte Laucha\nFon 03622-67547");
return false;}
else if (navigator.appName == 'Microsoft Internet Explorer' &&
(event.button == 2 || event.button == 3)) {
alert("© Parkgaststätte Laucha\nFon 03622-67547");
return false;
}
return true;
}
document.onmousedown=right;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
window.onmousedown=right;

if (navigator.appVersion.indexOf("2.") != -1){
         check = false;
         }
 if ((navigator.appVersion.indexOf("3.") != -1) && (navigator.appName.indexOf("Explorer") != -1)){
         check = false;
         }
 else {
         check = true;
         }
 if (check == true){

         image1 = new Image();
         image1.src = "bild/chronik.gif";
         image1on = new Image();
         image1on.src = "bild/chronik1.gif";
         image1stay = new Image();
         image1stay.src = "bild/chronik1.gif";

         image2 = new Image();
         image2.src = "bild/gasthaus.gif";
         image2on = new Image();
         image2on.src = "bild/gasthaus1.gif";
         image2stay = new Image();
         image2stay.src = "bild/gasthaus1.gif";

         image3 = new Image();
         image3.src = "bild/pension.gif";
         image3on = new Image();
         image3on.src = "bild/pension1.gif";
         image3stay = new Image();
         image3stay.src = "bild/pension1.gif";

         image4 = new Image();
         image4.src = "bild/kontakt.gif";
         image4on = new Image();
         image4on.src = "bild/kontakt1.gif";
         image4stay = new Image();
         image4stay.src = "bild/kontakt1.gif";

         image5 = new Image();
         image5.src = "bild/buchung.gif";
         image5on = new Image();
         image5on.src = "bild/buchung1.gif";
         image5stay = new Image();
         image5stay.src = "bild/buchung1.gif";

         image6 = new Image();
         image6.src = "bild/anfahrt.gif";
         image6on = new Image();
         image6on.src = "bild/anfahrt1.gif";
         image6stay = new Image();
         image6stay.src = "bild/anfahrt1.gif";
 }

 imageStay = ""

 function imageon(name){
         if (imageStay != name){
                 document[name].src = eval(name + "on.src");
         }
 }
 function imageoff(name){
         if (imageStay != name){
                 document[name].src = eval(name + ".src");
         }
 }

 function on(name){
         if (check == true){
         imageon(name);
         }
 }
 function off(name){
         if (check == true){
         imageoff(name);
         }
 }

 function stay(name){
         if (check == true){
         document[name].src = eval(name + "stay.src");
         if (imageStay != name){
                 if (imageStay != ""){
                         document[imageStay].src = eval(imageStay + ".src");
                 }
         }
         imageStay = name
         }
 }
 
 
function fieldcheck() {

var str = document.laucha.nn.value;
if (str == "") {
	alert("\nDas Feld NAME ist leer.\n\nBitte geben Sie Ihren Namen ein.")
	document.laucha.nn.focus();
	return false;
	}
for (var i = 0; i < str.length; i++) {
	var ch = str.substring(i, i + 1);
	if (((ch < "a" || "z" < ch) && (ch < "A" || "Z" < ch)) && ch != '-' && ch != 'ß' && ch != ' ' && ch != 'ä' && ch != 'ö' && ch != 'ü' && ch != 'Ä' && ch != 'Ö' && ch != 'Ü') {
		alert("\nDas NAME-Feld akzeptiert nur Buchstaben und Leerzeichen.\n\nBitte geben Sie Ihren Namen nochmal ein.");
		document.laucha.nn.select();
		document.laucha.nn.focus();
		return false;
		}
	}
	
var str = document.laucha.vn.value;
if (str == "") {
	alert("\nDas Feld Vorname ist leer.\n\nBitte geben Sie Ihren Vornamen ein.")
	document.laucha.vn.focus();
	return false;
	}
	
for (var i = 0; i < str.length; i++) {
	var ch = str.substring(i, i + 1);
	if (((ch < "a" || "z" < ch) && (ch < "A" || "Z" < ch)) && ch != '-' && ch != 'ß' && ch != ' ' && ch != 'ä' && ch != 'ö' && ch != 'ü' && ch != 'Ä' && ch != 'Ö' && ch != 'Ü') {
		alert("\nDas Vorname-Feld akzeptiert nur Buchstaben und Leerzeichen.\n\nBitte geben Sie Ihren Vornamen nochmal ein.");
		document.laucha.vn.select();
		document.laucha.vn.focus();
		return false;
		}
	}

var str = document.laucha.street.value;
if (str == "") {
	alert("\nDas Feld Straße und Hausnummer ist leer.\n\nBitte geben Sie Straße und Hausnummer ein.")
	document.laucha.street.focus();
	return false;
	}

var str = document.laucha.plz.value;
if (str == "") {
	alert("\nDas Feld PLZ ist leer.\n\nBitte geben Sie Ihre PLZ ein.")
	document.laucha.plz.focus();
	return false;
	}	
for (var i = 0; i < str.length; i++) {
	var Zahl1 = str.substring(i, i + 1);
	if (Zahl1 < "0" || "9" < Zahl1)  {
		alert("\nDas Feld PLZ akzeptiert nur Zahlen.\n\nBitte geben Sie eine Zahl ein.");
		document.laucha.plz.select();
		document.laucha.plz.focus();
		return false;
		}
 	}
	
var str = document.laucha.ort.value;
if (str == "") {
	alert("\nDas Feld Ort ist leer.\n\nBitte geben Sie Ihren Ort ein.")
	document.laucha.ort.focus();
	return false;
	}	

var str = document.laucha.fon.value;
if (str == "") {
	alert("\nDas Feld Telefon ist leer.\n\nBitte geben Sie Ihre Telefonnummer in folgendem Format ein:\n\nVorwahl Bindestrich Nummer (036259-50226)")
	document.laucha.fon.focus();
	return false;
	}
for (var i = 0; i < str.length; i++) {
	var Zahl1 = str.substring(i, i + 1);
	if ((Zahl1 < "0" || "9" < Zahl1) && Zahl1 != '-')  {
		alert("\nDas Feld Telefon akzeptiert nur Zahlen.\n\nBitte geben Sie eine Zahl ein.");
		document.laucha.fon.select();
		document.laucha.fon.focus();
		return false;
		}
 	}
var str = document.laucha.parent.value;
if (str == "") {
	alert("\nDas Feld Erwachsene ist leer.\n\nBitte geben Sie eine Zahl ein.\n\nWenn keine, dann 0!")
	document.laucha.parent.focus();
	return false;
	}
for (var i = 0; i < str.length; i++) {
	var Zahl1 = str.substring(i, i + 1);
	if (Zahl1 < "0" || "9" < Zahl1)  {
		alert("\nDas Feld Erwachsene akzeptiert nur Zahlen.\n\nBitte geben Sie eine Zahl ein.");
		document.laucha.parent.select();
		document.laucha.parent.focus();
		return false;
		}
 	}
	
var str = document.laucha.child.value;
if (str == "") {
	alert("\nDas Feld Kinder ist leer.\n\nBitte geben Sie eine Zahl ein.\n\nWenn keine, dann 0!")
	document.laucha.child.focus();
	return false;
	}
for (var i = 0; i < str.length; i++) {
	var Zahl1 = str.substring(i, i + 1);
	if (Zahl1 < "0" || "9" < Zahl1)  {
		alert("\nDas Feld Kinder akzeptiert nur Zahlen.\n\nBitte geben Sie eine Zahl ein.");
		document.laucha.child.select();
		document.laucha.child.focus();
		return false;
		}
 	}
	
var str = document.laucha.an.value;
if (str == "") {
	alert("\nDas Feld Anreisetag ist leer.\n\nBitte geben Sie ein Datum ein.")
	document.laucha.an.focus();
	return false;
	}

var str = document.laucha.ab.value;
if (str == "") {
	alert("\nDas Feld Abreisetag ist leer.\n\nBitte geben Sie ein Datum ein.")
	document.laucha.ab.focus();
	return false;
	}

}