function open_window(url,weite,hoehe){ // zum Fenster öffnen
	win2 = window.open(url,'','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width='+ weite + ',height=' + hoehe);
}
function open_window_zoom(url){ // zum Fenster öffnen
	win2 = window.open(url,'','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=500,height=400');
}
function open_galerie(){ // zum Fenster öffnen
	win2 = window.open('galerie.php','','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=780,height=600');
}
var UseFlash = 0;
if (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"] ) {
// Check for Flash version 5 or greater in Netscape
	var plugin = navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin;
	if (plugin && parseInt(plugin.description.substring(plugin.description.indexOf(".")-1))>=5)
		UseFlash = 1;
}
else if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && 
		navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
		// Assume any Windows IE except for Windows 3.1 supports the OBJECT tag
		UseFlash = 1;
}
			
function flasher(){
	if ( UseFlash ) {
	// Use Flash player  // hier bitte farben etc noch anpassen
		document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
		document.write(' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"');
		document.write(' ID=std_header WIDTH=538 HEIGHT=126>');
		document.write('<PARAM NAME=movie VALUE="herberts.swf"><PARAM NAME=quality VALUE=high><PARAM NAME=bgcolor VALUE=#990000>');
		document.write('<EMBED src="herberts.swf" quality=high bgcolor=#990000 ');
		document.write(' swLiveConnect=FALSE WIDTH=538 HEIGHT=126');
		document.write(' TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">');
		document.write('</EMBED>');
		document.write('</OBJECT>');
	} else if (!(navigator.appName && navigator.appName.indexOf("Netscape")>=0 && navigator.appVersion.indexOf("2.")>=0)) {
		// Netscape 2 will display the IMG tag below so don't write an extra one
		document.write('<IMG SRC="images/header.jpg" BORDER=0>');
	}
}
function wechsel(nummer){
	if (nummer == 0){document.karte.src = "images/detail_karte.gif";}
	if (nummer == 1){document.karte.src = "images/karte.gif";}
}
function checkform()
	{
	var theForm=eval("document.register");
	var strAlert="";
// name:
	if (strAlert=="" && (typeof theForm.name.value == "undefined" || theForm.name.value =="" || theForm.name.length<1))
		strAlert="name";
// E-Mail:
	if (strAlert=="" && (typeof theForm.kontakt_email.value == "undefined" || theForm.kontakt_email.value =="" || theForm.kontakt_email.length<3))
		strAlert="email";		
// Anliegen:
	if (strAlert=="" && (typeof theForm.anliegen.value == "undefined" || theForm.anliegen.value =="" || theForm.anliegen.length<2))
		strAlert="anliegen";
// info:
	if (strAlert=="" && (typeof theForm.info.value == "undefined" || theForm.info.value =="" || theForm.info.length<1))
		strAlert="info";
	// Jetzt Fehlerausgabe:
	if (strAlert != "")
		{
		switch (strAlert)
			{			
			case "name":
				alert("Bitte geben Sie Ihren Namen ein!");
				theForm.name.focus();
				break;
			case "email":
				alert("Bitte geben Sie Ihre E-Mail Adresse an!"); 				
				theForm.kontakt_email.focus();
				break;	
			case "anliegen":
				alert("Bitte geben Sie Ihr Anliegen ein!");
				theForm.anliegen.focus();
				break;				
			case "info":
				alert("Bitte geben Sie uns noch die Zusatzinfo,\nwoher Sie unsere Seite kennen!");
				theForm.info.focus();
				break;
			}
		return false;
		}
	else
		return true;
	}

function checkform_anfrage(){
	var theForm=eval("document.register");
	if (theForm.tag.value == ""){
		alert("Geben Sie einen Wert in das Feld \"Tag der Reservierung\" ein.");
		theForm.tag.focus();
		return (false);
	}

  	if (theForm.uhrzeit.value == "")  {
		alert("Geben Sie einen Wert in das Feld \"Uhrzeit\" ein.");
		theForm.uhrzeit.focus();
		return (false);
  	}

  	if (theForm.etage.value == "")  {
		alert("Wählen Sie einen Wert unter \"Wo möchten Sie reservieren\" aus.");
		theForm.etage.focus();
		return (false);
  	}

	if (theForm.anlass.value == "")  {
		alert("Wählen Sie einen Wert unter \"Anlaß\" aus.");
		theForm.anlass.focus();
		return (false);
  	}

  	if (theForm.Personenanzahl.value == ""){
		alert("Geben Sie einen Wert in das Feld \"Anzahl der Personen\" ein.");
		theForm.Personenanzahl.focus();
		return (false);
  	}

  	if (theForm.Name.value == "")  {
		alert("Geben Sie einen Wert in das Feld \"Name\" ein.");
		theForm.Name.focus();
		return (false);
  	}

  	if (theForm.Strasse.value == ""){
		alert("Geben Sie einen Wert in das Feld \"Straße\" ein.");
		theForm.Strasse.focus();
		return (false);
  	}

 	 if (theForm.PLZ.value == ""){
		alert("Geben Sie einen Wert in das Feld \"PLZ\" ein.");
		theForm.PLZ.focus();
		return (false);
  	}

  	if (theForm.Ort.value == ""){
		alert("Geben Sie einen Wert in das Feld \"Ort\" ein.");
		theForm.Ort.focus();
		return (false);
  	}

  	if (theForm.Telefon.value == ""){
		alert("Geben Sie einen Wert in das Feld \"Telefon\" ein.");
		theForm.Telefon.focus();
		return (false);
  	}

  	return (true);
}
