<!--
function showTab(Ident) {
	document.getElementById('tabAnfrage'+Ident).style.display = 'block';
	document.getElementById('trAnfrage'+Ident).style.display  = 'block';
}
function showSub(Ident,Top) {
	document.getElementById('SubNavi'+Ident).style.display = 'block';
	document.getElementById('SubNavi'+Ident).style.top = Top+'px';
}
function hideSub(Ident) {
	document.getElementById('SubNavi'+Ident).style.display = 'none';
}


function showDiv(id){
	document.getElementById(id).className='navipunkt2';
	
	
}

function hideDiv(id){
	document.getElementById(id).className='navipunkt1';
	
	
}




function hideBody(DIV) {
	document.getElementById(DIV).style.display = 'block';
}
function hideBody2() {
	document.getElementById('divBodyHide').src = 'http://10.0.0.170/record/current.jpg?rand='+Math.floor(Math.random()*1000000);
}
function showFoto(DIV,IMG,ID,WIDTH,URL) {
	var intTop =  (document.body.parentNode.scrollTop)+200;
	//var intLeft = ((screen.availWidth-WIDTH)/2);
	var intLeft = ((980-WIDTH)/2)+140;
	document.getElementById(DIV).style.display = 'block';
	document.getElementById(DIV).style.top     = intTop+'px';
	document.getElementById(DIV).style.left    = intLeft+'px';
	document.getElementById(IMG).src = URL+ID;
}
function hideFoto(DIV,IMG) {
	document.getElementById(DIV).style.display = 'none';
	document.getElementById(IMG).src = 'images/construct/iEmpty.gif';
}
function showImage(DIV,IMG,ID,WIDTH) {
	var intTop =  document.body.parentNode.scrollTop;
	var intLeft = ((screen.availWidth-WIDTH)/2);
	document.getElementById(DIV).style.display = 'block';
	document.getElementById(DIV).style.top     = intTop+'px';
	document.getElementById(DIV).style.left    = intLeft+'px';
	document.getElementById(IMG).src = 'images/active/structurecontentbig.php?Ident='+ID;
}
function PW_btnOver(Button) { //v1.00
	document.getElementById(Button+'N').style.display = 'none';
	document.getElementById(Button+'O').style.display = 'block';
}
function PW_btnOut(Button) { //v1.00
	document.getElementById(Button+'O').style.display = 'none';
	document.getElementById(Button+'N').style.display = 'block';
}
function PW_divBlock(Ident,Show) {
	if (Show) {
		document.getElementById('divBlock'+Ident+'S').style.display = 'none';
		document.getElementById('divBlock'+Ident+'H').style.display = 'block';
	} else {
		document.getElementById('divBlock'+Ident+'S').style.display = 'block';
		document.getElementById('divBlock'+Ident+'H').style.display = 'none';
	}
}
function PW_popWindow(URL,Width,Height) { //v1.00
	var intWidth,intHeight,intLeft,intTop;
	intWidth  = Width;
	intHeight = Height;
	intLeft   = (screen.width / 2) - (intWidth / 2);
	intTop    = (screen.height / 2) - (intHeight / 2);
	window.open(URL,'newWindow','scrollbars=yes,width='+intWidth+',height='+intHeight+',left='+intLeft+',top='+intTop);
}
function PW_fldClear(Field,Standard) {
	if (document.getElementById(Field).value==Standard) {
		document.getElementById(Field).value = '';
	}
}
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_validateForm() { //v5.00
  var i,p,q,nt,test,num,min,max,errors='',args=MM_validateForm.arguments;
  for (i=0; i<(args.length-2); i+=3) {
		test=args[i+2];
		val=MM_findObj(args[i]);
    if (val) {
				nt = (args[i+1]=='' ? val.name : args[i+1]);
		if ((val=val.value)!="") {
      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
        if (p<1 || p==(val.length-1)) errors+='- '+nt+' muss eine gültige Adresse beinhalten!\n';
      } else if (test!='R') { num = parseFloat(val);
        if (isNaN(val)) errors+='- '+nt+' muss eine Zahl beinhalten!\n';
        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
          min=test.substring(8,p); max=test.substring(p+1);
          if (num<min || max<num) errors+='- '+nt+' muss eine Zahl zwischen '+min+' und '+max+' beinhalten!\n';
    } } } else if (test.charAt(0) == 'R') errors += '- '+nt+' muss angegeben werden!\n'; }
  } if (errors) alert('Folgende Fehler sind aufgetreten:\n\n'+errors);
  document.MM_returnValue = (errors == '');
}

function validateSuche()
{
	return (!document.getElementById('txtSuche').value == "");
}

function valdiateNewsletter()
{
	var boolVNError = false;
	var boolNNError = false;
	var boolMailError = false;
	var boolLetterError = false;
	var strErrMessage = "";
	
	var obj = null;
	var boolReturn = true;
	
	// Vorname validieren
	//obj = document.getElementById('Vorname');
	//boolVNError = isEmptyString(obj);
	//setElementConditions(obj, boolVNError);
	
	// Nachname validieren
	obj = document.getElementById('Nachname');
	boolNNError = isEmptyString(obj);
	setElementConditions(obj, boolNNError);
	
	// E-Mail validieren
	obj = document.getElementById('E-Mail_Adresse');
	boolMailError = isUseableMailAdress(obj);
	setElementConditions(obj, boolMailError);
	
	// Newsletter validieren
	obj = document.getElementById('Newsletter');
	boolNewsletterError = isCheckedFeld(obj);
	setElementConditions(obj, boolNewsletterError);
	
	if(boolVNError || boolNNError || boolMailError || boolNewsletterError)
	{
		// Versenden abbrechen
		boolReturn = false;
		
		// Fehlermeldungen zusammenfassen
		strErrMessage += writeErrorLog('Vorname', boolVNError);
		strErrMessage += writeErrorLog('Nachname', boolNNError);
		strErrMessage += writeErrorLog('E-Mail', boolMailError);
		strErrMessage += writeErrorLog('Newsletteranmeldung', boolNewsletterError);
		
		if(strErrMessage != "")
			alert(strErrMessage);
	}
	
	return boolReturn;
}

function validateKontakt()
{
	var boolVNError = false;
	var boolNNError = false;
	var boolMailError = false;
	var boolBetreffError = false;
	var boolNachrichtError = false;
	var strErrMessage = "";
	
	var obj = null;
	var boolReturn = true;
	
	// Vorname validieren
	obj = document.getElementById('Vorname');
	boolVNError =isEmptyString(obj);
	setElementConditions(obj, boolVNError);
	
	// Nachname validieren
	obj = document.getElementById('Nachname');
	boolNNError = isEmptyString(obj);
	setElementConditions(obj, boolNNError);
	
	// E-Mail validieren
	obj = document.getElementById('E-Mail_Adresse');
	boolMailError = isUseableMailAdress(obj);
	setElementConditions(obj, boolMailError);
	
	// Betreff validieren
	obj = document.getElementById('Betreff');
	boolBetreffError = isEmptyString(obj);
	setElementConditions(obj, boolBetreffError);
	
	// Nachricht validieren
	obj = document.getElementById('Nachricht');
	boolNachrichtError = isEmptyTextArea(obj);
	setElementConditions(obj, boolNachrichtError);
	
	if(boolVNError || boolNNError || boolMailError || boolBetreffError || boolNachrichtError)
	{
		// Versenden abbrechen
		boolReturn = false;
		
		// Fehlermeldungen zusammenfassen
		strErrMessage += writeErrorLog('Vorname', boolVNError);
		strErrMessage += writeErrorLog('Nachname', boolNNError);
		strErrMessage += writeErrorLog('E-Mail', boolMailError);
		strErrMessage += writeErrorLog('Betreff', boolBetreffError);
		strErrMessage += writeErrorLog('Nachricht', boolNachrichtError);
		
		if(strErrMessage != "")
			alert(strErrMessage);
	}
	
	return boolReturn;
}

function validateReservierung()
{
	var boolVNError = false;
	var boolNNError = false;
	var boolStrasseError = false;
	var boolPLZError = false;
	var boolOrtError = false;
	var boolMailError = false;
	var boolAnreiseError = false;
	var boolAbreiseError = false;
	var strErrMessage = "";
	
	var obj = null;
	var boolReturn = true;
	
	// Vorname validieren
	obj = document.getElementById('Vorname');
	boolVNError = isEmptyString(obj);
	setElementConditions(obj, boolVNError);
	
	// Nachname validieren
	obj = document.getElementById('Nachname');
	boolNNError = isEmptyString(obj);
	setElementConditions(obj, boolNNError);
	
	// Strasse validieren
	obj = document.getElementById('Straße');
	boolStrasseError = isEmptyString(obj);
	setElementConditions(obj, boolStrasseError);
	
	// PLZ validieren
	obj = document.getElementById('PLZ');
	boolPLZError = isEmptyString(obj);
	setElementConditions(obj, boolPLZError);
	
	// Ort validieren
	obj = document.getElementById('Ort');
	boolOrtError = isEmptyString(obj);
	setElementConditions(obj, boolOrtError);
	
	// E-Mail vailidiern
	obj = document.getElementById('E-Mail_Adresse');
	boolMailError = isUseableMailAdress(obj);
	setElementConditions(obj, boolMailError);
	
	//debugInfo("E-Mail", boolMailError);
	
	// Anreisedatum validieren
	obj = document.getElementById('AnreiseTag');
	if(isEmptyString(obj) || !isNumericValue(obj))
		boolAnreiseError = true;
	setElementConditions(obj, boolAnreiseError);
	
	obj = document.getElementById('AnreiseMonat');
	if(!boolAnreiseError)
		boolAnreisError = isEmptyString(obj);
	setElementConditions(obj, boolAnreiseError);
	
	obj = document.getElementById('AnreiseJahr');
	if(!boolAnreiseError)
	{
		if(isEmptyString(obj) || !isNumericValue(obj))
			boolAnreiseError = true;
	}
	setElementConditions(obj, boolAnreiseError);
	
	// Abreisedatum validieren
	obj = document.getElementById('AbreiseTag');
	if(isEmptyString(obj) || !isNumericValue(obj))
		boolAbreiseError = true;
	setElementConditions(obj, boolAbreiseError);
	
	obj = document.getElementById('AbreiseMonat');
	if(!boolAbreiseError)
		boolAbreiseError = isEmptyString(obj);
	setElementConditions(obj, boolAbreiseError);
	
	obj = document.getElementById('AbreiseJahr');
	if(!boolAbreiseError)
	{
		if(isEmptyString(obj) || !isNumericValue(obj))
			boolAbreiseError = true;
	}
	setElementConditions(obj, boolAbreiseError);
	
	if(boolVNError || boolNNError || boolStrasseError || boolPLZError || boolOrtError || boolMailError || boolAnreiseError || boolAbreiseError)
	{
		// Versenden abbrechen
		boolReturn = false;
		
		// Fehlermeldungen zusammenfassen
		strErrMessage += writeErrorLog('Vorname', boolVNError);
		strErrMessage += writeErrorLog('Zuname', boolNNError);
		strErrMessage += writeErrorLog('Strasse', boolStrasseError);
		strErrMessage += writeErrorLog('PLZ', boolPLZError);
		strErrMessage += writeErrorLog('Ort', boolOrtError);
		strErrMessage += writeErrorLog('E-Mail', boolMailError);
		strErrMessage += writeErrorLog('Anreisedatum', boolAnreiseError);
		strErrMessage += writeErrorLog('Abreisedatum', boolAbreiseError);
		
		if(strErrMessage != "")
			alert(strErrMessage);
	}
	
	return boolReturn;
}

function isEmptyString(obj)
{
	return (obj.value == "");
}

function isEmptyTextArea(obj)
{
	return (obj.value == "");
}

function isNumericValue(obj)
{
	return (!(isNaN(obj.value)));
}

function isCheckedFeld(obj)
{
	return !(obj.checked);
}

function isUseableMailAdress(obj)
{
	var boolError = false;
	boolError = (obj.value.length < 7);
	
	if(!boolError)
	{
		boolError = (obj.value.indexOf('@') < 0);

		if(!boolError)
		{
			var aryValue = obj.value.split('@');
			var aryAnzahl = aryValue.length;
			boolError = (aryAnzahl > 2);
			
			if(!boolError)
			{
				boolError = (aryValue[1].indexOf('.') < 0);
				
				if(!boolError)
				{
					var aryText = aryValue[1].split('.');
					var aryTextAnzahl = aryText.length;
					var x = 0;
					for(x=0; x < aryTextAnzahl; x++)
					{
						if(!boolError)
						{
							boolError = (aryText[x].length == 0);
						}
					}
					
					if(!boolError)
					{
						boolError = (aryText[aryTextAnzahl-1].length < 2);
						
						if(!boolError)
						{
							// zusätzliche Abfragen	
							
						}
					}
				}
			}
		}
	}
	
	return boolError;
}

function setElementConditions(obj, condition)
{
	if(condition)
	{
		obj.style.backgroundColor = '#ff0000';
		obj.style.color = '#ffffff';
	}
	else
	{
		obj.style.backgroundColor = '#ffffff';
		obj.style.color = '#333333';
	}
}

function writeErrorLog(Value, Error)
{
	if(Error)
		return("Bitte " + String.fromCharCode(252) + "berpr" + String.fromCharCode(252) + "fen Sie das Feld " + Value + ".\r\n");
	else
		return "";
}
//-->
