// jquery ajax get-request
	function jquery_ajax_get(URL, container){
		$.get(URL, function(text){
			$(container).fadeOut('fast',function(){
				$(container).html(text).fadeIn('normal');
			});
		});
	}

//Preloader
function overlayLoading() {
	elem = document.getElementById("prepage");
	 elem.style.visibility="hidden";
	elem = document.getElementById("page");
	 elem.style.visibility="visible";
}

//Center POPUP
// <a href="http://www.site.net" onclick="NewWindow(this.href,'name','500','500','yes');return false">
var win = null;
function NewWindow(mypage,myname,w,h,scroll){
	LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
	TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
	settings =
	'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
	win = window.open(mypage,myname,settings)
}

//

// bei enter formular abschicken
function onEnter_submitForm(form){
	if ((event.which && event.which == 13) || (event.keyCode && event.keyCode == 13)) {
		document.form.submit();
		return false;
	} else {
		return true;
	}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

// --------------------------------------------------------------------------------------

// Show Hide Layer
	var isIE = false;
	var isOther = false;
	var isNS4 = false;
	var isNS6 = false;
	if(document.getElementById){
		if(!document.all){
			isNS6=true;
		}
		if(document.all){
			isIE=true;
		}
	}else{
		if(document.layers){
			isNS4=true;
		}else{
			isOther=true;
		}
	}
	function aLs(layerID){
		var returnLayer;
		if(isIE){
			returnLayer = eval("document.all." + layerID + ".style");
		}
		if(isNS6){
			returnLayer = eval("document.getElementById('" + layerID + "').style");
		}
		if(isNS4){
			returnLayer = eval("document." + layerID);
		}
		if(isOther){
			returnLayer = "null";
			alert("-[Error]-\nDue to your browser you will probably not\nbe able to view all of the following page\nas it was designed to be viewed. We regret\nthis error sincerely.");
		}
		return returnLayer;
	}
	function HideShow(ID, action){
		/*
		if((aLs(ID).visibility == "visible") || (aLs(ID).visibility == "")){
			aLs(ID).visibility = "hidden";
			aLs(ID).position = "absolute";
			SetCookie(ID,'closed',null,'/');
		}else if(aLs(ID).visibility == "hidden"){
			aLs(ID).visibility = "visible";
			aLs(ID).position = "relative";
			SetCookie(ID,'opened',null,'/');
		}
		*/
		if((aLs(ID).display == "block") || (aLs(ID).display == "")){
			aLs(ID).display = "none";
			SetCookie(ID,'closed',null,'/');
		}else if(aLs(ID).display == "none"){
			aLs(ID).display = "block";
			SetCookie(ID,'opened',null,'/');
		}
	}
	function Show(ID){
		aLs(ID).display = "block";
		SetCookie(ID,'opened',null,'/');
	}
	function Hide(ID){
		aLs(ID).display = "none";
		SetCookie(ID,'closed',null,'/');
	}
//------------------------------------------------------------------------------------------

// wechselnder tr-hintergrund bei mouseover und mouseout
function setTrBg(element, action, outColor){

	var backColor = new Array(); // don't change this
	//overColor = '#ADC8E8';
	var overColor = '#f7e6e2';
	//var outColor = '#FFFFFF';

	if(action == "over"){
		document.getElementById(element).style.backgroundColor = overColor;
	}else if(action == "out"){
		document.getElementById(element).style.backgroundColor = outColor;
	}
	
}
//
function MM_setTextOfTextfield(objName,x,newText) { //v3.0
  var obj = MM_findObj(objName); if (obj) obj.value = newText;
}
//

<!-- Anmeldung
function checkForm_anmeldung() {
	var error = false;
	var error_message = "Bitte ergänzen Sie folgende Angaben:\n\n";
                      
	
	if (document.form.vorname.value == '') {
		error = true;
		error_message += "- Vorname\n";
	}
	if (document.form.nachname.value == '') {
		error = true;
		error_message += "- Nachname\n";
	}
	if (document.form.gebtag.value == '') {
		error = true;
		error_message += "- Geburtstag-Tag\n";
	}
	if (document.form.gebmonat.value == '') {
		error = true;
		error_message += "- Geburtstag-Monat\n";
	}
	if (document.form.gebjahr.value == '') {
		error = true;
		error_message += "- Geburtstag-Jahr\n";
	}
	if (document.form.nation.value == '') {
		error = true;
		error_message += "- Nation\n";
	}
	
	if (document.form.strasse.value == '') {
		error = true;
		error_message += "- Straße\n";
	}
	if (document.form.plz.value == '') {
		error = true;
		error_message += "- PLZ\n";
	}
	if (document.form.ort.value == '') {
		error = true;
		error_message += "- Ort\n";
	}
	if (document.form.email.value == '') {
		error = true;
		error_message += "- E-Mail\n";
	}else{
		if (document.form.email.value.indexOf('@') == -1){
				error = true;
				error_message += "- ungültige E-Mail Adresse\n";
		}
	}
	
	if (document.form.telefon.value == '') {
		error = true;
		error_message += "- Telefonnummer\n";
	}
	if (document.form.teilnahmebedingunen.checked == '') {
		error = true;
		error_message += "- Teilnahmebedingungen\n";
	}
	
	/* Ist irgendwo ein Fehler aufgetreten ? */
	if (error) {
		error_message += "";
			alert(error_message);
		return false; //Formular wird nicht abgeschickt.
		} else {
		return true;  //Formular wird abgeschickt.
		}
}
//-->

<!-- Jump Menü Zimmerauswahl -->
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

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_jumpMenuGo(selName,targ,restore){ //v3.0
  var selObj = MM_findObj(selName); if (selObj) MM_jumpMenu(targ,selObj,restore);
}
//-->


<!-- Rollover Image
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  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];}}
}

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_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->

	// Cookie Funktionen
	function getCookieVal (offset) { 
		var endstr = document.cookie.indexOf (";", offset); 
		if (endstr == -1) 
		endstr = document.cookie.length; 
		return unescape(document.cookie.substring(offset, endstr));
	}
	function GetCookie (name) { 
		var arg = name + "="; 
		var alen = arg.length; 
		var clen = document.cookie.length; 
		var i = 0; 
		while (i < clen) { 
		var j = i + alen; 
		if (document.cookie.substring(i, j) == arg) 
		return getCookieVal (j); 
		i = document.cookie.indexOf(" ", i) + 1; 
		if (i == 0) break; 
		} 
		return null;
	}
	function SetCookie (name, value) { 
		var argv = SetCookie.arguments; 
		var argc = SetCookie.arguments.length; 
		var expires = (argc > 2) ? argv[2] : null; 
		var path = (argc > 3) ? argv[3] : null; 
		var domain = (argc > 4) ? argv[4] : null; 
		var secure = (argc > 5) ? argv[5] : false; 
		document.cookie = name + "=" + escape (value) + 
		((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + 
		((path == null) ? "" : ("; path=" + path)) + 
		((domain == null) ? "" : ("; domain=" + domain)) + 
		((secure == true) ? "; secure" : "");
	}
	function DeleteCookie (name) { 
		var exp = new Date(); 
		exp.setTime (exp.getTime() - 1); 
		var cval = GetCookie (name); 
		document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();
	}
//------------------------------------------------------------------------------------------


-->