
//Break out of frames
    if (top.frames.length!=0)
    	top.location=self.document.location;
	
//Plattform-Check fuer Style-Sheet

		if (navigator.userAgent.indexOf('MSIE') != -1) 
			{
			document.write('<link rel="stylesheet" type="text/css" href="/styles_ie.css">');
			}
		else
			{
			document.write('<link rel="stylesheet" type="text/css" href="/styles_nn.css">');
			}
		

// preloading images

num = new Array (20);
for (i=0;i<=19;i++)
{ num[i] = new Image(); }
num[0].src="/images/nav_zimmer_on.gif";
num[1].src="/images/nav_zimmer.gif";
num[3].src="/images/nav_agb_on.gif";
num[2].src="/images/nav_agb.gif";
num[4].src="/images/nav_aktuelles_on.gif";
num[5].src="/images/nav_aktuelles.gif";
num[6].src="/images/nav_gastro_on.gif";
num[7].src="/images/nav_gastro.gif";
num[8].src="/images/nav_goettingen_on.gif";
num[9].src="/images/nav_goettingen.gif";
num[10].src="/images/nav_lage_on.gif";
num[11].src="/images/nav_lage.gif";
num[12].src="/images/nav_kontakt_on.gif";
num[13].src="/images/nav_kontakt_off.gif";
num[14].src="/images/nav_impressum_on.gif";
num[15].src="/images/nav_impressum_off.gif";
num[16].src="/images/nav_reservieren_on.gif";
num[17].src="/images/nav_reservieren.gif";
num[18].src="/images/nav_home_on.gif";
num[19].src="/images/nav_home.gif";

// image wechsel

function highlight(bild){
	document.images[bild].src = '/images/' + bild + '_on.gif';
	}
function darken(bild){
	document.images[bild].src = '/images/' + bild + '.gif';
	}
	
	
		//Formularcheck

function checkForm(xxx)
{
	var zahlen = /[0123456789]/;
	if(xxx.vname.value == '' || zahlen.exec(xxx.vname.value) != null)
	{
		errorMess('aaa');
		xxx.vname.focus();
		return false;
	}
	if(xxx.nname.value == '' || zahlen.exec(xxx.nname.value) != null)
	{
		errorMess('bbb');
		xxx.nname.focus();
		return false;
	}
	if(xxx.mail.value == '' || xxx.mail.value.indexOf('@') == -1 || xxx.mail.value.indexOf('.') == -1)
	{
		errorMess('ccc');
		xxx.mail.focus();
		return false;
	}
	if(xxx.message.value == '')
	{
		errorMess('ddd');
		xxx.message.focus();
		return false;
	}
	return true;
}
function errorMess(welches)
	{
		var eins = '';
		var zwei = '';
		var drei = '';
		var vier = '';
		if(welches == 'aaa')eins = 'Vorname';
		if(welches == 'bbb')zwei = 'Nachname';
		if(welches == 'ccc')drei = 'eMail';
		if(welches == 'ddd')vier = 'Nachricht';
	alert("Wir bitten Sie das Formular vollst\u00E4ndig und korrekt auszuf\u00FCllen\u0021"+'\nDas Feld: \n----- '+eins +''+ zwei +''+ drei +''+ vier+' -----\n'+"ist noch nicht korrekt ausgef\u00FCllt worden\u0021");
	}
	
	
function checkResForm(xxx)
{
	var zahlen = /[0123456789]/;
	var buchst = /[A-Za-z]/;
	if(xxx.anzahlNaechte.value == '' || buchst.exec(xxx.anzahlNaechte.value) != null)
	{
		errorResMess('hee');
		xxx.anzahlNaechte.focus();
		return false;
	}
	if(xxx.vname.value == '' || zahlen.exec(xxx.vname.value) != null)
	{
		errorResMess('aaa');
		xxx.vname.focus();
		return false;
	}
	if(xxx.nname.value == '' || zahlen.exec(xxx.nname.value) != null)
	{
		errorResMess('bbb');
		xxx.nname.focus();
		return false;
	}
	if(xxx.strasse.value == '' || zahlen.exec(xxx.strasse.value) != null)
	{
		errorResMess('ccc');
		xxx.strasse.focus();
		return false;
	}
	if(xxx.nr.value == '')
	{
		errorResMess('ddd');
		xxx.nr.focus();
		return false;
	}
	if(xxx.plz.value == '' || buchst.exec(xxx.plz.value) != null || !(xxx.plz.value > 1000 && xxx.plz.value <= 99998) )
	{
		errorResMess('eee');
		xxx.plz.focus();
		return false;
	}
	if(xxx.ort.value == '' || zahlen.exec(xxx.ort.value) != null)
	{
		errorResMess('fff');
		xxx.ort.focus();
		return false;
	}
	if(xxx.tel.value == '' || buchst.exec(xxx.tel.value) != null)
	{
		errorResMess('ggg');
		xxx.tel.focus();
		return false;
	}
	if(xxx.mail.value == '' || xxx.mail.value.indexOf('@') == -1 || xxx.mail.value.indexOf('.') == -1)
	{
		errorResMess('hhh');
		xxx.mail.focus();
		return false;
	}
	return true;
}
function errorResMess(welches)
	{
		var ui = '';
		var eins = '';
		var zwei = '';
		var drei = '';
		var vier = '';
		var fuenf = '';
		var sechs = '';
		var sieben = '';
		var acht = '';
		if(welches == 'hee')ui = 'Anzahl der N\u00E4chte';
		if(welches == 'aaa')eins = 'Vorname';
		if(welches == 'bbb')zwei = 'Nachname';
		if(welches == 'ccc')vier = 'Strasse';
		if(welches == 'ddd')fuenf = 'Hausnummer';
		if(welches == 'eee')sechs = 'PLZ';
		if(welches == 'fff')sieben = 'Ort';
		if(welches == 'ggg')acht = 'Telefon';
		if(welches == 'hhh')drei = 'eMail';
	alert("Wir bitten Sie\u002C die folgenden Angaben zu \u00FCberpr\u00FCfen bzw. zu erg\u00E4nzen!"+'\nDas Feld: \n----- '+ui +''+ eins +''+ zwei +''+ drei +''+ vier +''+ fuenf +''+ sechs +''+ sieben +''+ acht+' -----\n'+"ist noch nicht korrekt ausgef\u00FCllt worden\u0021");
	}
	
	
// Popup Fenster
var bildpfad = '';
function openWin(pfad,breite,hoehe)	
{	
	var abstand = 400 - hoehe - 50;
	bildpfad = pfad;
	var fensti = window.open('','zoom','width=540,height=550');
	with (fensti)
	{
		document.open();
		document.write('<html><head><title>ZoomImage</title></head><body background="/images/bg_content.jpg" leftmargin=0 topmargin=25 marginwidth="0" marginheight="25" bgcolor="#ffcc33">'
		+'<table border="0" cellspacing="0" cellpadding="0" align="center" width="100%">'
		+'	<tr>'
		+'		<td align="center"><a href="javascript:self.close();"><img src=' + bildpfad + ' width=' + breite + ' height=' + hoehe + ' alt=\"Fenster schlie&szlig;en\" border=\"0\"></a></td>'
		+'	</tr>'
		+'	<tr>'
		+'		<td><img src="images/trans.gif" width="1" height=' + abstand + ' border="0"></td>'
		+'	</tr>'	
		+'	<tr>'
		+'		<td align="right"><a href="javascript:self.close();" style="font-family:verdana;font-size:12px;font-weight:bold;color:#234468;">Fenster schlie&szlig;en</a>&nbsp;&nbsp;&nbsp;</td>'
		+'	</tr>'
		+'</table>'
		+'</body></html>');
		document.close();
	}
	fensti.focus();
}

// -----------------BACKOFFICE------------------------------------------------------------------------
	
	function BO_openWin(url,width,height,scrollbars)
	{
		var posx = screen.width/2 - width/2;  
		var posy = screen.height/2 - height/2;
		var propsZ=(document.all)?('top=' + posy + ',left=' + posx):('screenX=' + posx + ',screenY=' + posy);
		var props = 'width=' + width + ',height=' + height + ',scrollbars=' +scrollbars + ',' + propsZ;
		window.open(url, "can", props);
	}	
	
	function BO_deleter(url)
	{
		var sicher = confirm("Sicher löschen?");
		if(sicher)self.location.href = url;
	}