
window.onerror = null;
var bName = navigator.appName;
var bVer = parseInt(navigator.appVersion);
var bPlatform = navigator.platform;
// alert(bName + "," + bVer + "," + bPlatform);
var g_bNN6 = (bName == "Netscape" && bVer > 4);
var NS4 = (bName == "Netscape" && bVer >= 4);
var IE4 = (bName == "Microsoft Internet Explorer" && bVer >= 4);
var NS3 = (bName == "Netscape" && bVer < 4);
var IE3 = (bName == "Microsoft Internet Explorer" && bVer < 4);
// Special case for explorer 4 on the Mac - it doesn't support Layers well at all!
if (bPlatform == "MacPPC" && IE4 != "") {
 	IE4 = "";
}
var menuActive = 0;
var menuOn = 0;
var onLayer;
var timeOn = null;
var timeOff = null;
var g_sCmd = "";
var g_sImageName = "";
var bLoaded = false;
var a0, a1, b0, b1, c0, c1;
var LayerUsed = null; 
var menuWait, buttonWait;
 
if (g_bNN6)
{
	buttonWait = 2000;
	menuWait = 1000;
}
else
{
	buttonWait = 1000;
	menuWait = 400;
}



// MENU COLOR VARIABLE
var menuColor = "#DAD1C9";

//PRECACHE IMAGES HERE
function LoadImgs(){
  if (document.images || IE4) {
  menu1 = new Image(); menu1.src="images/topnav/navBullet.gif";
  menu2 = new Image(); menu2.src="images/topnav/navBulletx.gif";
  a0 = new Image(); a0.src="images/topnav/news.gif"; a1 = new Image(); a1.src="images/topnav/news_x.gif";
  b0 = new Image(); b0.src="images/topnav/careers.gif"; b1 = new Image(); b1.src="images/topnav/careers_x.gif";
  c0 = new Image(); c0.src="images/topnav/contact.gif"; c1 = new Image(); c1.src="images/topnav/contact_x.gif";
  bLoaded = true;
  }
 }

// LAYER SWITCHING CODE
if (NS4 || IE4) {
 if (navigator.appName == "Netscape") {
  layerStyleRef="layer.";
  layerRef="document.layers";
  styleSwitch="";
  }else{
  layerStyleRef="layer.style.";
  layerRef="document.all";
  styleSwitch=".style";
 }
}
  
// SHOW MENU
function showLayer(layerName){
	if (bLoaded)
	{
		if (timeOn != null) {
		clearTimeout(timeOn);
		hideLayer(onLayer);
		}
		if (document.getElementById)
		{
			document.getElementById(layerName).style.visibility = "visible";
		}
		else if (NS4 || IE4)
		{
			eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="visible"');
		}   
		onLayer = layerName;
		LayerUsed = true;
	}
}

//BUTTON ROLLOVER
function change(Name, No)
{
	var sCmd = "";
	sCmd = "document." + Name + ".src = " + Name + No + ".src";
	if (document.images && bLoaded)
	{
		eval(sCmd);
	}
	return true;
}

// HIDE MENU
function hideLayer(layerName)
{
	if (bLoaded && LayerUsed != null)
	{
		if (menuActive == 0)
		{
			if (document.getElementById)
			{
				document.getElementById(layerName).style.visibility = "hidden";
			}
			else if (NS4 || IE4)
			{
				eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="hidden"');
			}
		}
	}
}

// TIMER FOR BUTTON MOUSE OUT
function btnTimer()
{
	timeOn = setTimeout("btnOut()", buttonWait);
}

// BUTTON MOUSE OUT
function btnOut(layerName)
{
	if (bLoaded && menuActive == 0)
	{
		hideLayer(onLayer);
	}
}

// MENU MOUSE OVER  
function menuOver(itemName)
{
	if (bLoaded)
	{
		clearTimeout(timeOn)
		menuActive = 1
		if (document.getElementById)
		{
			document.getElementById(itemName).src = menu2.src;
		}
		else if (document.layers)
		{
			document[onLayer].document.images[itemName].src = menu2.src;
			//eval("document." + itemName + ".src = menu2.src");
		}
		else if (document.all)
		{
			document.all[itemName].src = menu2.src;
		}
	}
}

// MENU MOUSE OUT 
function menuOut(itemName) {
	if (bLoaded && onLayer != "")
	{
		menuActive = 0 
		if (document.getElementById)
		{
			document.getElementById(itemName).src = menu1.src;
		}
		else if (document.layers)
		{
			document[onLayer].document.images[itemName].src = menu1.src;
			//eval("document." + itemName + ".src = menu1.src");
		}
		else if (document.all)
		{
			document.all[itemName].src = menu1.src;
		}
		timeOn = setTimeout("hideLayer(onLayer);", menuWait);
	}
}

// Creates menu object
function menuLink(title, url) {
 this.title = title;
 this.url = url;
}

// Builds menu TABLE
function menuMaker(menuArray) {
 n = "";
 j = eval(menuArray + ".length") - 1;
 topTable = "<div ID='" + eval(menuArray + ".id") + "'><TABLE  BORDER='0' CELLSPACING='0' CELLPADDING='0'><TR><TD ROWSPAN=99 BGCOLOR='666666'><IMG src='/images/clr.gif' WIDTH=1 HEIGHT=1 ALT=''></TD><TD COLSPAN=3 bgcolor='" + menuColor +"'><IMG src='/images/clr.gif' WIDTH=1 HEIGHT=2 ALT=''></TD><TD ROWSPAN=99 BGCOLOR='333333'><IMG src='/images/clr.gif' WIDTH=1 HEIGHT=1 ALT=''></TD></TR>";
 endrow = "</TD><TD BGCOLOR='" + menuColor +"'><IMG src='images/clr.gif' WIDTH='5' HEIGHT='9' VSPACE='4' ALT=''></TD></TR><TR><TD COLSPAN='3' bgcolor='666666'><IMG src='/images/clr.gif' WIDTH=1 HEIGHT=1 ALT=''></TD></TR>";
 btmTable = "</TABLE></div>";
 
 n += topTable;
 for( var i = 0; i <=j; i++) {
  bgnrow = "<TR><TD bgcolor='" + menuColor +"'><IMG src='images/topnav/navBullet.gif' WIDTH='9' HEIGHT='17' HSPACE='2' ALT='' BORDER='0' name='" + eval(menuArray + ".imgname") + i + "' id='" + eval(menuArray + ".imgname") + i + "'></TD><TD bgcolor='" + menuColor +"'>";
  n += bgnrow + "<A ID='menuLink' HREF='" + eval(menuArray + "[" + i + "].url") + "' onMouseOver='menuOver(\"" + eval(menuArray + ".imgname") + i + "\")' onMouseOut='menuOut(\"" + eval(menuArray + ".imgname") + i + "\")' class='menus' TARGET='_top'>" + eval(menuArray + "[" + i + "].title") + "</a>" + endrow;
 }
 n += btmTable;
 return n;
}

//Menu Arrays
Array.prototype.id = "aMenu"
Array.prototype.imgname = "a"

aMenu = new Array(3)
aMenu.id = "aMenu"
aMenu.imgname = "a"
aMenu[0] = new menuLink("Pressemitteilungen", "pressmenu.htm")
aMenu[1] = new menuLink("Veröffentlichungen", "newsmenu.htm")
aMenu[2] = new menuLink("Events", "http://www.inforsacom-events.com")

bMenu = new Array(1)
bMenu.id = "bMenu"
bMenu.imgname = "b"
bMenu[0] = new menuLink("Karriere", "careersmenu.htm")

cMenu = new Array(1)
cMenu.id = "cMenu"
cMenu.imgname = "c"
cMenu[0] = new menuLink("Kontakt", "contact.htm")

//-->
