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];}
}

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

function MM_changeProp(objName,x,theProp,theValue) { //v6.0
  var obj = MM_findObj(objName);
  if (obj && (theProp.indexOf("style.")==-1 || obj.style)){
	if (theValue == true || theValue == false)
	  eval("obj."+theProp+"="+theValue);
	else eval("obj."+theProp+"='"+theValue+"'");
  }
}

function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}

//popup
var popupWin = null;

function popdown() {
  if (popupWin && !popupWin.closed) popupWin.close();
}

function popup(obj,w,h) {
  var url = (obj.getAttribute) ? obj.getAttribute('href') : obj.href;
  if (!url) return true;
  w = (w) ? w += 20 : 825; 
  h = (h) ? h += 25 : 600;
  var args = 'width='+w+',height='+h+',scrollbars,resizable,status';
  popdown();
  popupWin = window.open(url,'popup',args);
  if(popupWin)
  	popupWin.focus();
  return (popupWin) ? false : true;
}

function popunder(theURL, theName, features, ispopunder) {
	if (!theURL || !theName)
		return;
	if (!features)
		features = '';
	var win=window.open(theURL, theName, features)
	if(ispopunder) {
		win.blur()
		window.focus()
	}
}

//window.onunload = popdown;
//window.onfocus = popdown;

//image viewer
function changeImage(filename, imagename)
{
	eval("document."+imagename+".src = filename");
}

//NEWSLETTER NORM
function GP_AdvOpenWindow(theURL,winName,features,popWidth,popHeight,winAlign,ignorelink,alwaysOnTop,autoCloseTime,borderless) { //v2.0
  var leftPos=0,topPos=0,autoCloseTimeoutHandle, ontopIntervalHandle, w = 480, h = 340;  
  if (popWidth > 0) features += (features.length > 0 ? ',' : '') + 'width=' + popWidth;
  if (popHeight > 0) features += (features.length > 0 ? ',' : '') + 'height=' + popHeight;
  if (winAlign && winAlign != "" && popWidth > 0 && popHeight > 0) {
    if (document.all || document.layers || document.getElementById) {w = screen.availWidth; h = screen.availHeight;}
        if (winAlign.indexOf("center") != -1) {topPos = (h-popHeight)/2;leftPos = (w-popWidth)/2;}
        if (winAlign.indexOf("bottom") != -1) topPos = h-popHeight; if (winAlign.indexOf("right") != -1) leftPos = w-popWidth; 
        if (winAlign.indexOf("left") != -1) leftPos = 0; if (winAlign.indexOf("top") != -1) topPos = 0;                         
    features += (features.length > 0 ? ',' : '') + 'top=' + topPos+',left='+leftPos;}
  if (document.all && borderless && borderless != "" && features.indexOf("fullscreen") != -1) features+=",fullscreen=1";
  if (window["popupWindow"] == null) window["popupWindow"] = new Array();
  var wp = popupWindow.length;
  theURL += "?";
  theURL += "errorPage=/public/error.jsp&";
  theURL += "action=remoteBox&";
  theURL += "gid=40017261&";
  theURL += "mps=1wpdazy7iksazrxymm7jf54mlg1synwgn2h77yh9eyjpzanu4iugbjh8ntc&";
  theURL += "alt_page_1=/public/remotebox.jsp&";
  theURL += "uemail="+document.newsletter.uemail.value+"&";
  theURL += "action_type=subscribe";
  popupWindow[wp] = window.open(theURL,winName,features);
  if (popupWindow[wp].opener == null) popupWindow[wp].opener = self;  
  if (document.all || document.layers || document.getElementById) {
    if (borderless && borderless != "") {popupWindow[wp].resizeTo(popWidth,popHeight); popupWindow[wp].moveTo(leftPos, topPos);}
    if (alwaysOnTop && alwaysOnTop != "") {
        ontopIntervalHandle = popupWindow[wp].setInterval("window.focus();", 50);
        popupWindow[wp].document.body.onload = function() {window.setInterval("window.focus();", 50);}; }
    if (autoCloseTime && autoCloseTime > 0) {
        popupWindow[wp].document.body.onbeforeunload = function() {
            if (autoCloseTimeoutHandle) window.clearInterval(autoCloseTimeoutHandle);
            window.onbeforeunload = null;   }  
        autoCloseTimeoutHandle = window.setTimeout("popupWindow["+wp+"].close()", autoCloseTime * 1000); }
    window.onbeforeunload = function() {for (var i=0;i<popupWindow.length;i++) popupWindow[i].close();}; }   
  document.MM_returnValue = (ignorelink && ignorelink != "") ? false : true;
}

//NEWSLETTER IBE STARTSEITEN
function GP_AdvOpenWindow2(theURL,winName,features,popWidth,popHeight,winAlign,ignorelink,alwaysOnTop,autoCloseTime,borderless) { //v2.0
  var leftPos=0,topPos=0,autoCloseTimeoutHandle, ontopIntervalHandle, w = 480, h = 340;  
  if (popWidth > 0) features += (features.length > 0 ? ',' : '') + 'width=' + popWidth;
  if (popHeight > 0) features += (features.length > 0 ? ',' : '') + 'height=' + popHeight;
  if (winAlign && winAlign != "" && popWidth > 0 && popHeight > 0) {
    if (document.all || document.layers || document.getElementById) {w = screen.availWidth; h = screen.availHeight;}
        if (winAlign.indexOf("center") != -1) {topPos = (h-popHeight)/2;leftPos = (w-popWidth)/2;}
        if (winAlign.indexOf("bottom") != -1) topPos = h-popHeight; if (winAlign.indexOf("right") != -1) leftPos = w-popWidth; 
        if (winAlign.indexOf("left") != -1) leftPos = 0; if (winAlign.indexOf("top") != -1) topPos = 0;                         
    features += (features.length > 0 ? ',' : '') + 'top=' + topPos+',left='+leftPos;}
  if (document.all && borderless && borderless != "" && features.indexOf("fullscreen") != -1) features+=",fullscreen=1";
  if (window["popupWindow"] == null) window["popupWindow"] = new Array();
  var wp = popupWindow.length;
  theURL += "?";
  theURL += "errorPage=/public/error.jsp&";
  theURL += "action=remoteBox&";
  theURL += "gid=40017261&";
  theURL += "mps=1wpdazy7iksazrxymm7jf54mlg1synwgn2h77yh9eyjpzanu4iugbjh8ntc&";
  theURL += "alt_page_1=/public/remotebox.jsp&";
  theURL += "uemail="+document.form1.uemail.value+"&";
  theURL += "action_type=subscribe";
  popupWindow[wp] = window.open(theURL,winName,features);
  if (popupWindow[wp].opener == null) popupWindow[wp].opener = self;  
  if (document.all || document.layers || document.getElementById) {
    if (borderless && borderless != "") {popupWindow[wp].resizeTo(popWidth,popHeight); popupWindow[wp].moveTo(leftPos, topPos);}
    if (alwaysOnTop && alwaysOnTop != "") {
        ontopIntervalHandle = popupWindow[wp].setInterval("window.focus();", 50);
        popupWindow[wp].document.body.onload = function() {window.setInterval("window.focus();", 50);}; }
    if (autoCloseTime && autoCloseTime > 0) {
        popupWindow[wp].document.body.onbeforeunload = function() {
            if (autoCloseTimeoutHandle) window.clearInterval(autoCloseTimeoutHandle);
            window.onbeforeunload = null;   }  
        autoCloseTimeoutHandle = window.setTimeout("popupWindow["+wp+"].close()", autoCloseTime * 1000); }
    window.onbeforeunload = function() {for (var i=0;i<popupWindow.length;i++) popupWindow[i].close();}; }   
  document.MM_returnValue = (ignorelink && ignorelink != "") ? false : true;
}

//NEWSLETTER ABMELDEN
function GP_AdvOpenWindow3(theURL,winName,features,popWidth,popHeight,winAlign,ignorelink,alwaysOnTop,autoCloseTime,borderless) { //v2.0
  var leftPos=0,topPos=0,autoCloseTimeoutHandle, ontopIntervalHandle, w = 480, h = 340;  
  if (popWidth > 0) features += (features.length > 0 ? ',' : '') + 'width=' + popWidth;
  if (popHeight > 0) features += (features.length > 0 ? ',' : '') + 'height=' + popHeight;
  if (winAlign && winAlign != "" && popWidth > 0 && popHeight > 0) {
    if (document.all || document.layers || document.getElementById) {w = screen.availWidth; h = screen.availHeight;}
        if (winAlign.indexOf("center") != -1) {topPos = (h-popHeight)/2;leftPos = (w-popWidth)/2;}
        if (winAlign.indexOf("bottom") != -1) topPos = h-popHeight; if (winAlign.indexOf("right") != -1) leftPos = w-popWidth; 
        if (winAlign.indexOf("left") != -1) leftPos = 0; if (winAlign.indexOf("top") != -1) topPos = 0;                         
    features += (features.length > 0 ? ',' : '') + 'top=' + topPos+',left='+leftPos;}
  if (document.all && borderless && borderless != "" && features.indexOf("fullscreen") != -1) features+=",fullscreen=1";
  if (window["popupWindow"] == null) window["popupWindow"] = new Array();
  var wp = popupWindow.length;
  theURL += "?";
  theURL += "errorPage=/public/error.jsp&";
  theURL += "action=remoteBox&";
  theURL += "gid=40017261&";
  theURL += "mps=1wpdazy7iksazrxymm7jf54mlg1synwgn2h77yh9eyjpzanu4iugbjh8ntc&";
  theURL += "alt_page_1=/public/remotebox.jsp&";
  theURL += "uemail="+document.nlabmelden.uemail.value+"&";
  theURL += "action_type=unsubscribe";
  popupWindow[wp] = window.open(theURL,winName,features);
  if (popupWindow[wp].opener == null) popupWindow[wp].opener = self;  
  if (document.all || document.layers || document.getElementById) {
    if (borderless && borderless != "") {popupWindow[wp].resizeTo(popWidth,popHeight); popupWindow[wp].moveTo(leftPos, topPos);}
    if (alwaysOnTop && alwaysOnTop != "") {
        ontopIntervalHandle = popupWindow[wp].setInterval("window.focus();", 50);
        popupWindow[wp].document.body.onload = function() {window.setInterval("window.focus();", 50);}; }
    if (autoCloseTime && autoCloseTime > 0) {
        popupWindow[wp].document.body.onbeforeunload = function() {
            if (autoCloseTimeoutHandle) window.clearInterval(autoCloseTimeoutHandle);
            window.onbeforeunload = null;   }  
        autoCloseTimeoutHandle = window.setTimeout("popupWindow["+wp+"].close()", autoCloseTime * 1000); }
    window.onbeforeunload = function() {for (var i=0;i<popupWindow.length;i++) popupWindow[i].close();}; }   
  document.MM_returnValue = (ignorelink && ignorelink != "") ? false : true;
}


	function setElememtHTML(value, targetElement) {
		//if IE 4+
		if (document.all) {
			eval(targetElement+'.innerHTML = value;');
		//else if NS 4
		} else if (document.layers) {
			eval('document.'+targetElement+'.document.write(value);');
			eval('document.'+targetElement+'.document.close();');
		}
		//else if NS 6 (supports new DOM)
		else if (document.getElementById) {
			rng = document.createRange();
			el = document.getElementById(targetElement);
			rng.setStartBefore(el);
			htmlFrag = rng.createContextualFragment(value);
			while (el.hasChildNodes())
				el.removeChild(el.lastChild);
			el.appendChild(htmlFrag);
		}
	}
	function display_children(obj) {
		var val = document.form1.children_travelers.options[document.form1.children_travelers.selectedIndex].value;
		if(val > 0) {
			MM_changeProp('children_handler','','style.display','block','DIV');
			for(i=0;i<val;i++) {
				MM_changeProp('child'+(i+1),'','style.display','block','DIV');
			}
			for(i=1;i<=3;i++) {
				if(i>val) MM_changeProp('child'+i,'','style.display','none','DIV');
			}
		} else {
			MM_changeProp('children_handler','','style.display','none','DIV');
			for(i=1;i<=3;i++) {
				MM_changeProp('child'+i,'','style.display','none','DIV');
			}
		}
	}
	
	var popUpWin=0;
	function popUpWindow(URLStr, left, top, width, height)
	{  if(popUpWin)  {    
	if(!popUpWin.closed) popUpWin.close();  
	}  
	popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menub ar=no,scrollbar=no,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
	}
	
	function getBrowser(){
		/*  Autor, Entwicklung 8/2002 Kristof Lipfert Duesseldorf    */
		/*  Version 2005-12-09                                  */
		if(document.ids)browserName='nc4';
		else if( document.all && !document.getElementById )browserName='ie4';
		else if( window.opera && !document.createElement )browserName='op5';
		else if( window.opera && window.getComputedStyle )  {
				  if(document.createRange)browserName='op8';
					else if(window.navigate)browserName='op7.5';
									 else browserName='op7.2';}
		else if( window.opera && document.compatMode )browserName='op7';
		else if( window.opera && document.releaseEvents )browserName='op6';
		else if( document.contains && !window.opera )browserName='kq3';
		else if(window.pkcs11&&window.XML)browserName='f15';
		else if( window.getSelection && window.atob )browserName='nn7';
		else if( window.getSelection && !document.compatMode )browserName='nn6';
		else if( window.clipboardData && document.compatMode )
		  browserName=window.XMLHttpRequest? 'IE7' : 'IE6';
		else if( window.clipboardData ){browserName='ie5';
			 if( !document.createDocumentFragment ) browserName+='.5';
			 if( document.doctype && !window.print ) browserName+='m';}
		else if( document.getElementById && !document.all ) browserName='op4';
		else if( document.images && !document.all ) browserName='nn3';
		else if(document.clientWidth&&!window.RegEbrowserNamep)browserName='kq2';
		else browserName='NoName';
	
	return browserName;		
	}	

	//-----------------------------------------------------------------------------------------------------------------------//
	// AJAX FUNCTIONS //
	//-----------------------------------------------------------------------------------------------------------------------//
	
	var xmlHttp 		= null;
	
    // A-X-send function //POST
	function writeAjaxContent(fileElement, requestUri, writeFunc){
		if (window.ActiveXObject){
			// Internet Explorer
			try {
				xmlHttp = new ActiveXObject("Msxm12.XMLHTTP");
			}
			catch (e){
				
				try {
					xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
				}
				catch (e) {}
			}
		}
		else if (window.XMLHttpRequest){
			// Opera, Firefox
			try {
				xmlHttp = new XMLHttpRequest();
			}
			catch (e) {}
		}
		
		if (xmlHttp){
			xmlHttp.open("POST", fileElement, true);
			xmlHttp.onreadystatechange = function(evt) { 
				if (xmlHttp.readyState == 4){
					response = xmlHttp.responseText;
					if(writeFunc!='') setTimeout(writeFunc+"("+response+")", 0);
				}
			};
			xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); 
			xmlHttp.send(requestUri);
		}
		else {
			setTimeout("writeAjaxContent('"+fileElement+"', '"+requestUri+"')",500);
		}
	}
	
	function isXmlHttpReadyFunc(){}