var E1Data=new Array();
E1Data["LnkStW"]=new Array();
E1Data["LnkStW"]["left"]="";
E1Data["LnkStW"]["right"]="LnkStEg";
E1Data["LnkStEg"]=new Array();
E1Data["LnkStEg"]["left"]="LnkStW";
E1Data["LnkStEg"]["right"]="";

function createE1Data()
{
	last_index="";
	if (!$("dGNavigInc")) return;
	if (!$("dGNavigInc").getElementsByTagName) return;
	var aCol = $("dGNavigInc").getElementsByTagName("a");
	if(aCol.length > 0)
	{
		for(i=0;i<aCol.length;i++)
		{
			index=aCol[i].id;
			eval('addEvent(aCol[i],"mouseover",function() { animateMouseOver("'+index+'"); } );');
			addEvent(aCol[i],"mouseout",animateBack);
			E1Data[index]=new Array();
			if(last_index!="")
			{
				E1Data[index]["left"]=last_index;
				E1Data[last_index]["right"]=index;
			}
			last_index=index;
		}
	}
}

function ShowHighLights()
{
	createLayer("Layer1");
	createLayer("Layer2");
	getDoBildImgs("");
	if (typeof(eb1) == "undefined") return;
	if (eb1 != "")
	{
        	createE1Data();
		$("Lnk"+eb1).className = "act";
	}
	if (eb2 != "")
	{
		$("Lnk"+eb2).className = "act";
	}
	if (eb3 != "")
	{
		$("Lnk"+eb3).className = "act";
	}
	if (eb4 != "")
	{
		$("Lnk"+eb4).className = "act";
	}
	if ($("EintrittID")) { if($("EintrittIDD").innerHTML == "") $("EintrittID").style.display="none"; }
	if ($("TicketID")) { if($("TicketIDD").innerHTML == "") $("TicketID").style.display="none"; }
	checkSearchParam();
	TollsTrasparent();
	addEvent(window,"resize",TollsTrasparent);
	CheckFontSize();
}

var animatedID="";
var animatedClassName="";
function animateMouseOver(index)
{
  if(E1Data[index] && E1Data[index]["right"]==("Lnk"+eb1) && document.getElementById(E1Data[index]["right"]))
  { 
    animatedID = E1Data[index]["right"];
    animatedClassName = document.getElementById(E1Data[index]["right"]).className;
    document.getElementById(E1Data[index]["right"]).className="act_left";
  }

  if(E1Data[index] && E1Data[index]["left"]==("Lnk"+eb1) && document.getElementById(E1Data[index]["left"]))
  {
    animatedID=index;
    animatedClassName=document.getElementById(index).className;
    document.getElementById(index).className="hover_right";
  }
}

function animateBack()
{
 if(animatedID!="")
  document.getElementById(animatedID).className=animatedClassName;
}

function checkSearchParam()
{
	var sstr = getParam("search_exp");
	var ofld = document.quicksearch.search_exp;
	if (sstr != null)
	{
		sstr = str_replace(sstr, String.fromCharCode(153), "™","gi");
		sstr = str_replace(sstr, String.fromCharCode(8482), "™","gi");
		sstr = str_replace(sstr, String.fromCharCode(128), "€","gi");
		sstr = str_replace(sstr, String.fromCharCode(8364), "€","gi");
		sstr = str_replace(sstr, "[\+]", " ","gi");
		ofld.value = sstr;
	}
	else
	{
		document.quicksearch.search_exp.value = "Schnellsuche";
		document.quicksearch.search_exp.style.color = "#999";
	}
	addEvent(document.quicksearch, "submit", function(e) { if (document.quicksearch.search_exp.value == "Schnellsuche" || document.quicksearch.search_exp.value == "") { alert("Bitte geben Sie Suchbegriff ein!");document.quicksearch.search_exp.focus(); cancelEvent (e); } } );
	addEvent(document.quicksearch.search_exp, "focus", function() { if (document.quicksearch.search_exp.value == "Schnellsuche") { document.quicksearch.search_exp.value = "";} document.quicksearch.search_exp.style.color = "#000";} );
	addEvent(document.quicksearch.search_exp, "blur", function() { if (document.quicksearch.search_exp.value == "") { document.quicksearch.search_exp.value = "Schnellsuche"; document.quicksearch.search_exp.style.color = "#999";} } );
	document.quicksearch.method = "GET";
}

var hc = 0, h = 0, hsb = 0, stransprt = false;
function TollsTrasparent()
{
	if (window.innerHeight) hc =  parseInt(window.innerHeight);
	else if (document.documentElement.clientHeight) hc =  parseInt(document.documentElement.clientHeight);
	else if (document.body.clientHeight) hc =  parseInt(document.body.clientHeight);
	if (document.documentElement) h = parseInt(document.documentElement.scrollHeight);
	if (document.body.scrollHeight > h) h = parseInt(document.body.scrollHeight);
	if (document.body.clientHeight > h) h = parseInt(document.body.clientHeight);
	if (hc == 0 || h == 0) return;

	if (!stransprt)
	{
		addEvent($("dBotCont"),"mouseover",function() { $("dBotCont").className = ""; });
		addEvent($("dBotCont"),"mouseout",SetTransp);
		addEvent(window,"scroll",SetTransp);
	}
	SetTransp();
}
function SetTransp()
{
	if (typeof window.pageXOffset != 'undefined') hsb = parseInt(window.pageYOffset);
	else if (typeof document.compatMode != 'undefined' && document.compatMode != 'BackCompat') hsb = document.documentElement.scrollTop;
	else if (typeof document.body != 'undefined') hsb = document.body.scrollTop;
	else hsb = h;
	if(hc+10+hsb < h) $("dBotCont").className = "opct";
	else  $("dBotCont").className = "";
}

if(typeof(window.addEvent) == "function" & typeof(window.ShowHighLights) == "function")
 addEvent(window,"load",ShowHighLights);
