


     window.onerror = null;
 var bName = navigator.appName;
 var bVer = parseInt(navigator.appVersion);
 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);
 var menuActive = 0
 var menuOn = 0
 var onLayer
 var timeOn = null
 var menu1 = new Image(); menu1.src = "images/pfgr.gif";
 var menu2 = new Image(); menu2.src = "images/pfrot.gif";
 var x = 0
 
// LAYER SWITCHING CODE
if (NS4 || IE4) {
 if (bName == "Netscape") {
  layerStyleRef="layer.";
  layerRef="document.layers";
  styleSwitch="";
  }else{
  layerStyleRef="layer.style.";
  layerRef="document.all";
  styleSwitch=".style";
 }
}

  
// SHOW MENU
function showLayer(layerName){
if (NS4 || IE4) {
 if (timeOn != null) {
  menuActive = 0
  scroll(0,0);
  clearTimeout(timeOn)
  if ((onLayer) && ( onLayer != layerName )) {
  	hideLayer(onLayer)
  }
 }
 if (NS4 || IE4) {
  eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="visible"');
 }   
 onLayer = layerName
 }
}

// HIDE MENU
function hideLayer(layerName){
 if (menuActive == 0) {
  if (NS4 || IE4) {
   eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="hidden"');
  }
 }
}

// TIMER FOR BUTTON MOUSE OUT
function btnTimer() {
 timeOn = setTimeout("btnOut()",2000)
}

// BUTTON MOUSE OUT
function btnOut(layerName) {
 if (menuActive == 0) {
  hideLayer(onLayer)
  }
}

// MENU MOUSE OVER  
function menuOver(itemName) {
 clearTimeout(timeOn)
 menuActive = 1
 if (NS4 || IE4) {
  if (NS4) {
    document[onLayer].document.images[itemName].src = menu2.src
 } else {
     document.all[itemName].src = menu2.src
 }
 }
}

// MENU MOUSE OUT 
function menuOut(itemName) {
 menuActive = 0 
  if (NS4 || IE4) {
  if (NS4) {
    document[onLayer].document.images[itemName].src = menu1.src
  } else {
     document.all[itemName].src = menu1.src
  }
  }
  timeOn = setTimeout("hideLayer(onLayer)", 400)
 }

// 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 bgcolor=\"#ffffff\"><tr><td bgcolor=\"#da4d22\" colspan=3><img src=\"images/l.gif\" width=1 height=2></td><td colspan=2 rowspan=2><img src=\"images/ecko.gif\" width=7 height=7></td></tr><tr><td bgcolor=\"#da4d22\" rowspan=3><img src=\"images/l.gif\" width=2></td><td bgcolor=\"#ffffff\" colspan=2><img src=\"images/l.gif\" height=5></td></tr><tr><td><img src=\"images/l.gif\" width=5 height=1></td><td><table cellspacing=3 cellpadding=0 border=0>"
 endrow = "</td></tr>"
 btmTable = "</table></td><td bgcolor=\"#ffffff\"><img src=\"images/l.gif\" width=5 height=1></td><td bgcolor=\"#da4d22\"><img src=\"images/l.gif\" width=2 height=1></td></tr><tr><td colspan=2 bgcolor=\"#ffffff\"><img src=\"images/l.gif\" width=1 height=5></td><td colspan=2 rowspan=2><img src=\"images/ecku.gif\" width=7 height=7></td></tr><tr><td bgcolor=\"#da4d22\" colspan=3><img src=\"images/l.gif\" width=1 height=2></td></tr></table></div>"
 
 n += topTable
 for( var i = 0; i <=j; i++) {
  bgnrow = "<tr><td align=\"center\"><img src=\"images/pfgr.gif\" width=4 height=7 alt=\"\" border=\"0\" name=\"" + eval(menuArray + ".imgname") + i + "\"></td><td>";
  n += bgnrow + "<a href=\"" + eval(menuArray + "[" + i + "].url") + "\" onMouseOver=\"menuOver('" + eval(menuArray + ".imgname") + i + "')\" onMouseOut=\"menuOut('" + eval(menuArray + ".imgname") + i + "')\" target=\"_top\"><font class=\"menyer\">" + eval(menuArray + "[" + i + "].title") + "</font></a>" + endrow
 }
 n += btmTable
 return n
}

//Menu Arrays
Array.prototype.id = "ProdukteMenu"
Array.prototype.imgname = "pr"

prMenu = new Array(0)
//prMenu[0] = new menuLink("Immobilienfonds Inland", "http://intranet.dg-immobilien.de/dga-ex1/default_inland.html")



maMenu = new Array(4)
maMenu.id = "ProfilMenu"
maMenu.imgname = "ma"
maMenu[0] = new menuLink("Unternehmensprofil", "profil/index-up01.html")
maMenu[1] = new menuLink("Disclaimer", "disclaimer/index-disclaimer.html")
maMenu[2] = new menuLink("Impressum", "impressum/index-impressum.html")
maMenu[3] = new menuLink("Jobbörse", "job/index-job.html")


toMenu = new Array(5)
toMenu.id = "ServiceMenu"
toMenu.imgname = "to"
toMenu[0] = new menuLink("Formulare", "formulare/index1.html")
toMenu[1] = new menuLink("Lageplan", "lageplan/index1.html")
toMenu[2] = new menuLink("Links", "links/index-links.html")
toMenu[3] = new menuLink("Newsletter", "index-nl.html")
toMenu[4] = new menuLink("Zweitmarkt", "zm/index1.html")
//toMenu[0] = new menuLink("Downloads", "dl/index1.html")


//anMenu = new Array(1)
//anMenu.id = "HomeMenu"
//anMenu.imgname = "an"
//anMenu[0] = new menuLink("Homepage", "default.htm")



