// XSS Path
if(window.location.host == 'www.go-wuppertal.de') 
{
	var xss = "/projekte/" + window.location.pathname.substr(10, 3) + "/html/XSSenabler.html"; // prüfe ob das Skript vom Host-Server ausgeführt wird
} else {
	var xss = "/html/XSSenabler.html"; // gebe den normalen Pfad aus
}
// versteckte Inhaltsbereiche
function BookingHide() {
	jQuery(document).ready(function($){$(".bildergalerie, .inhalt_table").css("display","none"); // verstecke Inhaltsbereiche
		$("#content h1").html(headline);
		Cufon.replace('#content h1', { hover: true });
	});
}
		
Content = new Array("inhalt_table"); 
	
// Lade Buchungsmaschiene in dem Bereich
function lademaske(hotelid,xss){
	var url = 'http://www.tv-booking.com/2.0/front/booking/index_simple.php?hotel='+hotelid+'&xss='+escape(xss)+'&host='+zy()+'&w='+f()+'&h='+j()+'&a='+document.quickbuchung.anreise.value+'&b='+ document.quickbuchung.abreise.value +'&z='+document.quickbuchung.zimmer.value+'&lang='+lang+'&pID='+partner;
	jQuery(document).ready(function($){ 
		var iFrame = $('#mainIframe');iFrame.css('display','block');iFrame.attr('src',url); 
		BookingHide();
	});
	return false;
}

// Buchungsmaske per Action
if(action == "buchung") { 
	var url	   = 'http://www.tv-booking.com/2.0/front/booking/index_simple.php?hotel='+hotelid+'&xss='+escape(xss)+'&host='+zy()+'&w='+f()+'&h='+j()+'&lang='+lang+'&pID='+partner;
	jQuery(document).ready(function($){ 
		var iFrame = $('#mainIframe');iFrame.css('display','block');iFrame.attr('src',url); 
		BookingHide();
	});
}

// Buchungsmaske per Arrangement
if(arrangement > 0) {
	var url	   = 'http://www.tv-booking.com/2.0/front/booking/index.php?hotel='+hotelid+'&arrangement='+arrangement+'&xss='+escape(xss)+'&host='+zy()+'&w='+f()+'&h='+j()+'&lang='+lang+'&pID='+partner;
	jQuery(document).ready(function($){ 
		var iFrame = $('#mainIframe');iFrame.css('display','block');iFrame.attr('src',url); 
		BookingHide();
	});
}

// Booking Config
function zy(){var loc=document.location.href.replace("http://",""); if(loc.indexOf("/") != false){return loc.substring(0,loc.indexOf("/"));}else{return loc}}
function j(){var D=document;return Math.max(Math.max(D.body.scrollHeight,D.documentElement.scrollHeight),Math.max(D.body.offsetHeight,D.documentElement.offsetHeight),Math.max(D.body.clientHeight,D.documentElement.clientHeight));}
function f(){var D=document;return Math.max(Math.max(D.body.scrollHeight,D.documentElement.scrollWidth),Math.max(D.body.offsetHeight,D.documentElement.offsetWidth),Math.max(D.body.clientHeight,D.documentElement.clientWidth));}
function g(name){var agent=navigator.userAgent.toLowerCase();if(agent.indexOf(name.toLowerCase())> -1){return true;}return false;}
function l(){if(window.innerWidth){w=window.innerWidth;}else if(document.body){w=document.body.clientWidth;if(document.body.offsetWidth==w&&document.documentElement&&document.documentElement.clientWidth){w=document.documentElement.clientWidth;}}return w;}
function k(){if(window.innerWidth){h=window.innerHeight;}else if(document.body){h=document.body.clientHeight;if(document.body.offsetHeight==h&&document.documentElement&&document.documentElement.clientHeight){h=document.documentElement.clientHeight;}}return h;}
var m=true;
function update_height(h,s){var i=document.getElementById('mainIframe');if(s==0){i.style.height=parseInt(h)+parseInt(10)+'px';}else{i.style.height=h+'px';}}
function overlay(){var i=document.getElementById('mainIframe');var width=l();var height=k();var x=i.offsetLeft;var y=i.offsetTop;var w=i.offsetWidth;var h=i.offsetHeight;if(g('msie')){var scroll=document.documentElement.scrollTop;}else{var scroll=window.pageYOffset;}if(g('firefox')){w=w*2}i.style.position="fixed";i.style.zIndex=100000;i.style.left="0px";i.style.top="0px";i.style.height=j()+"px";i.style.width=f()+"px";try{var d=document.getElementById("f3");var c=d.contentDocument;if(c==undefined||c==null)c=d.contentWindow.document;c.body.innerHTML='<form name="form0" id="form0" method="post" target="f2" action="http://www.tv-booking.com/2.0/front/booking/iframe.php"><input type="hidden" name="methode" value="load"><input type="hidden" name="width" value="'+w+'"><input type="hidden" name="left" value="'+x+'"><input type="hidden" name="top" value="'+y+'"><input type="hidden" name="h" value="'+h+'"><input type="hidden" name="sw" value="'+width+'"><input type="hidden" name="scroll" value="'+scroll+'"><input type="hidden" name="sh" value="'+height+'"><input type="submit" name="submitfield" value="Submit"></form>';c.getElementById("form0").submit();}catch(e){alert(e);}}
function hide_overlay(){try{var i=document.getElementById('mainIframe');i.style.display="none";i.style.width="532px";i.style.height="auto";i.style.position="relative";i.style.display="block";}catch(e){alert(e);}}
