var isNav4, isIE, isNav6;
var coll = ""
var styleObj = ""

var TimerID=0;


function init() 
{
	if(NavSeminare == null)//gesetzt in Topnav
		NavSeminare	= 0;
		
	if (navigator.appName == "Netscape") 
	{
		if (parseInt(navigator.appVersion) >=5) 
			isNav6=true;
		else if (parseInt(navigator.appVersion) >=4)			
			isNav4=true;
	}
	else if(navigator.appName == "Microsoft Internet Explorer")
	{
		isIE = true;
		coll = "all.";
		styleObj = ".style";			
	}
}		


var layernames = new Array(0);
layernames[0] = "subnavSeminare";


 
function showPopup (roll_on, whichLayer) 
{ 
	if (roll_on) {
	clearTimeout(TimerID);
    hideParents(whichLayer);
    showLayer(whichLayer);
    }
else 
  	{
  	 clearTimeout(TimerID);
  	 TimerID = setTimeout('hideAll()', 1000);
   }
}        


function showLayer(thisLayer) 
{
	iww=getInsideWindowWidth()
	
	if(layernames[thisLayer] == "subnavSeminare") {
	
		//werte fuer versch. browser und abhaengig davon werte bezueglich positiv/negativ-farben
		if (isNav4) { 
			if (NavSeminare == 0) {
				move(layernames[thisLayer],iww-353,90);
				}
			else {
				move(layernames[thisLayer],iww-360,90);
			}
		}	
		else if (isIE) {
			if (NavSeminare == 0) {
				move(layernames[thisLayer],iww-358,90);
				}
			else {
				move(layernames[thisLayer],iww-362,90);
			}
		}
		
		
		else if (isNav6) {
			if (NavSeminare == 0) {
				move(layernames[thisLayer],iww-373,90);
				}
			else {
				move(layernames[thisLayer],iww-377,90);
			}
		}
	}
	
	
	

	if (isNav4) 
	{
		document.layers[(layernames[thisLayer])].visibility = "show";
	}	
    else if (isIE)
	{

		if(layernames[thisLayer] != null && document.all[(layernames[thisLayer])] != null && document.all[(layernames[thisLayer])].style != null)
			 document.all[(layernames[thisLayer])].style.visibility = "visible";
	} 
    else if (isNav6) document.getElementById(layernames[thisLayer]).style.visibility = "visible";

}



function hideLayer(thisLayer) {

	if (isNav4) document.layers[(layernames[thisLayer])].visibility = "hide";
    else if (isIE) 
	{
		if(layernames[thisLayer] != null && document.all[(layernames[thisLayer])] != null && document.all[(layernames[thisLayer])].style != null)
			document.all[(layernames[thisLayer])].style.visibility = "hidden";
	}	
    else if (isNav6) document.getElementById(layernames[thisLayer]).style.visibility = "hidden";
 }




function hideParents(exceptThis) {

	for (var i=0; i< 0; i++) {
		if (exceptThis != i) {
			hideLayer(i);
			}
	}
}


function hideAll() {
	for (var i=0; i<=0; i++) {
		hideLayer(i);
	}
}



function subnavroll(mouse_on)
{
  if (mouse_on==1)
  {
    clearTimeout(TimerID); 
  }
  else
  {
    clearTimeout(TimerID);
    TimerID = setTimeout('hideAll()', 1000);
  }
}




function win2erticket(url) { 
neuesfenster=window.open(url,"","width=690,height=480,menubar=0,toolbar=0,statusbar=0,scrollbars=yes,resizable=yes,screenX=10,screenY=10");
neuesfenster.focus();
}
    

function winFotouebersicht(url) { 
neuesfenster=window.open(url,"","scrollbars=yes,resizable=yes,width=550,height=400,screenX=10,screenY=10");
	
neuesfenster.focus();
}


function winFotogross(url) { 
neuesfenster=window.open(url,"","scrollbars=yes,resizable=yes,width=840,height=630,screenX=10,screenY=10");
	
neuesfenster.focus();
}



function rollBild(thisBild,onOff) {
		if (document.images){
			if (onOff=="on") document[thisBild].src = eval(thisBild + "_on.src");

			else document[thisBild].src = eval(thisBild + "_off.src");
		}
	}

			
function getInsideWindowWidth()
{
	if (isNav4 || isNav6)
		return window.innerWidth
	else if(isIE == true)
		return document.body.clientWidth
}

function getobject(Object)
{
	var myObject=null;
	if(typeof Object == "string")
	{		
		myObject=eval("document."+coll+Object+styleObj);
	}
	else 
		myObject=Object;
		
	return 	myObject;
}


function move(oString,x,y)
{
	if(isNav6)
	{
		document.getElementById(oString).style.left = x;
		document.getElementById(oString).style.top = y;	
	}
	else
	{
		
		var o=getobject(oString)

		if(o != null)
		{
			if(isNav4 || isNav6)
				o.moveTo(x,y)
			else if(isIE == true)
			{
				o.pixelLeft=x;	
				o.pixelTop=y;				
			}	
		}
	}	
}

