var dom = document.getElementById?1:0;
var ns4 = document.layers?1:0;
var ww, hh;
var onResizeLayout = 'undefined';

function meldeDich(meldung){
	alert(meldung);
}

function showMenu(ebene,layer,item) {
(window.innerWidth) ? ww=window.innerWidth:ww=document.all.mixframe.offsetWidth;
(window.innerHeight) ? hh=window.innerHeight:hh=document.all.mixframe.offsetHeight;

var anzahl2 = 8;
var anzahl3 = 8;

 var anzahl = 0;
 if(ebene == 2){
  anzahl = 8;
 }
 else if(ebene == 3){
  anzahl = 8
 }

 for (count = 1; count <= anzahl; count++) {
 var content = "Menu" + ebene + count;
 var active = "Menu" + ebene + layer;
  
  if(dom) {
   if(content == active) {
    document.getElementById(active).style.visibility = 'visible';
   }
   else {
    document.getElementById(content).style.visibility = 'hidden';
   }
   
   
  }
  else if(ns4) {
   if(content == active) {
    document[active].visibility = 'show';
   }
   else {
    document[content].visibility = 'hide';
   }
  }
 }
 
// Menues der Ebene 3 verbergen
if(ebene == 2){
	for(i = 1; i <= anzahl3; i++) {
		var menue = "Menu3" + i;
		hide(menue);
	}
// Fett-Darstellung im Untermenue zuruecksetzen
for(i=1;i<=anzahl;i++){
var menuitem = "Item" + (ebene) + "1" + i;
makenormal(menuitem);
	}
  }
  
// Aktives Menue-Item fett darstellen
for(i=1;i<=anzahl;i++){
var menuitem = "Item" + (ebene-1) + "1" + i;
makenormal(menuitem);
/*alert(menuitem);*/
}
var menuitem = "Item" + (ebene-1) + item;
makebold(menuitem);
}


// Set the font-weight of an object to bold
function makebold(obj) {
    var theObj = getObject(obj);
    if (theObj) {
        theObj.fontWeight = "bold";
    }
}

// Set the font-weight of an object to normal
function makenormal(obj) {
    var theObj = getObject(obj);
    if (theObj) {
        theObj.fontWeight = "normal";
    }
}


function setShut() { 
timer = setTimeout("shut(first,sec)", 120000);
}


function clearShut() {
if(window.timer)
clearTimeout(timer);
}


function shut(first,sec) {

 var active = first + sec;

 if(dom)
 document.getElementById(active).style.visibility = 'hidden';
 else if(ns4)
 document[active].visibility = 'hide';
}



/*
function versicherung() {
parent.newwin=window.open('http://www.ticketonline.de/unternehmen/ticketversicherung.html','versicherung','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,copyhistory=0,width=420,height=500,top=30,left=200');
parent.winOpen = true;
}


function versicherungpartner() {
parent.newwin=window.open('http://www.ticketonline.de/partnerprogramm/ticketversicherung.html','versicherungpartner','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,copyhistory=0,width=420,height=500,top=30,left=200');
parent.winOpen = true;
}


function partner_agb() {
parent.newwin=window.open('http://www.ticketonline.de/partnerprogramm/partner-agb.html','partner_agb','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,copyhistory=0,width=420,height=500,top=30,left=200');
parent.winOpen = true;
}


function Verisign() {
sealWin=window.open('https://digitalid.verisign.com/as2/51417a11033723136f3bf1bd16ea1ab7',"win",'toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=0,width=720,height=550');
self.name = "mainWin"; 
}


function game() {
self.newwin=window.open('http://content.ticketonline.de/production/de/de/services/game/game.html','game','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,copyhistory=0,width=400,height=546,top=30,left=200');
self.winOpen = true;
if (document.all) if (self.winOpen) self.newwin.blur();
self.focus();
}


function gamenav() {
parent.newwin=window.open('http://content.ticketonline.de/production/de/de/services/game/game.html','game','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,copyhistory=0,width=400,height=546,top=30,left=200');
parent.winOpen = true;
if (document.all) if (parent.winOpen) parent.newwin.focus();
}


function info3d() {
parent.newwin=window.open('/3dinfo.html','info3d','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1,copyhistory=0,width=380,height=460,top=30,left=200');
parent.winOpen = true;
}


function kinospot() {
parent.newwin=window.open('http://www.ticketonline.de/media/index.html','kinospot','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,copyhistory=0,width=594,height=544,top=30,left=200');
parent.winOpen = true;
}


function zanox() {
parent.newwin=window.open('http://ui.zanox-affiliate.de/?1001100210030&0C0&12901_112_341','zanox','toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1,copyhistory=1,width=600,height=600,top=30,left=30');
parent.winOpen = true;
}

function zanoxpl() {
parent.newwin=window.open('https://ui.zanox-affiliate.de/bin/z_in_frm.dll?1001100240050&0C0&121160_1193_341_54172','zanox','toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1,copyhistory=1,width=600,height=600,top=30,left=30');
parent.winOpen = true;
}

function UpdateTV() {
 document.Formular.action='/trans/evcheck';
 document.Formular.submit();
 return true;
}


function UpdateVC() {
 if (document.Formular.OAVC1.value.length>0) {
 	document.Formular.action='/trans/evcheck';
		document.Formular.submit();
		return true;
	} 
	else {
		alert('Bitte Gutscheinnummer angeben.');
		return undefined;
	}
}


function checkAVB() {
 if (document.Formular.OATVAVB.checked) {
	 document.Formular.submit();
 	return true;
	}
	else {
	 alert('Bitte bestätigen Sie die Annahme der \nAllgemeinen Versicherungsbedingungen (AVB) \nder ELVIA Reiseversicherungen \ndurch ankreuzen.');
	}
}


function UpdateRV(n) {
 document.Formular.submit();
 return true;
}


function chips(status) {

	initDHTMLAPI();

	var w, x, y;
	
	w = getInsideWindowWidth();
	if (w < 780) {
		w = 780;
	}
	
	x = (w / 2) + 244;
	y = 1;

	if (status == "show") {
		shiftTo("chips", x, y);
		show("chips");
	} else {
		hide("chips");
	}

}


function payback5years(status) {

	initDHTMLAPI();

	var w, x, y;
	
	w = getInsideWindowWidth();
	if (w < 780) {
		w = 780;
	}

	var x = (w / 2) + 348;
	var y = 110;

	if (status == "show") {
		shiftTo("payback5years", x, y);
		show("payback5years");
	} else {
		hide("payback5years");
	}

}


function gameteaser(status) {

	initDHTMLAPI();

	var w, x, y;
	
	w = getInsideWindowWidth();
	if (w < 780) {
		w = 780;
	}

	var x = (w / 2) + 254;
	var y = 0;

	if (status == "show") {
		shiftTo("gameteaser", x, y);
		show("gameteaser");
	} else {
		hide("gameteaser");
	}

}


function hotline(status) {

	initDHTMLAPI();

	var w, x, y;
	
	w = getInsideWindowWidth();
	if (w < 780) {
		w = 780;
	}

	var x = (w / 2) + 140;
	var y = 106;

	if (status == "show") {
		shiftTo("hotline", x, y);
		show("hotline");
	} else {
		hide("hotline");
	}

}


function onResizeDo() {

	onResizeLayout = 'threecolumn';
	
	//chips('show');
	//payback5years('show');
	gameteaser('show');

}


function onResizePlanDo() {

	onResizeLayout = 'twocolumn';
	
	//chips('show');
	//payback5years('hide');
	gameteaser('show');

}


function tocountry(){
    if (document.selecter.select1.options[document.selecter.select1.selectedIndex].value != "none") {
        seltocountry = document.selecter.select1.options[document.selecter.select1.selectedIndex].value;
        window.open(seltocountry, '_blank');
    }                       
}
*/
