var Menue = new Array(
 "top","Glaube","#",
       "down","Gesundheit","gesundheit.html",
     "down","Theologie","theologie.html",

       "top","Buchtext","#",
 "down","Moses","moses.html",
 "down","David","david.html",
 "down","Esra","esra.html",
 "down","Judas Makkabäus","judas.html",
 "down","Jesus","jesus.html",
 "down","Paulus","paulus.html",
 "down","Hitler","hitler.html",
 "down","Zeuge Z.","zeugez.html",
 "down","Plädoyers","plaedoyers.html",


       "top","Erklärungen","#",
       "down","Anlass","kommentar.html",
 "down","Gründe","gruende.html",
  "down","Geschichtlichkeit","histor.html",

  "top","Rechtliches","#",
 "down","Haftungsausschluss","haftung.html",
 "down","Impressum","impressum.html",

  "top","Suchen","#",
 "down","Cham / Stichwörter","inhalt.html",
 "down","Sitemap","sitemap.html"


 );
var MenueDivs = new Array();

var TopStartLinks = 180;
var TopStartOben = 10;
var TopBreite = 130;
var DownBreite = 140;
var DownLinksrand = 25;
var TopHoehe = 25;
var DownHoehe = 22;
var MenueHintergrundfarbe = "#dee4ec";
var TopMenueHintergrundfarbe = "#b6c4d4";
var MenueText = "verdana, arial, helvetica, sans-serif;";
var MenueTextfarbe = "#000000";
var MenueTextgewicht = "normal";
var MenueTextgroesse = "14px";
var MenueInnenabstand = "0px";
var MouseoverHintergrundfarbe = "#b6c4d4";
var TopMouseoverHintergrundfarbe = "#FFC891";
var MouseoverTextfarbe = "#000099";
var Rechtsversatz =0;
var Untenversatz = 0;



function Init() {
 if(document.getElementById)
  Menue_erzeugen();
 else
  if(! parent.Daten)
   window.location.href = "sitemap.htm";
}

function Menue_erzeugen() {
 var j = 0;
 for(var i = 0; i < Menue.length; i += 3) {
  MenueDivs[j] = document.createElement("div");
  MenueDivs[j].style.position = "absolute";
  MenueDivs[j].style.borderLeft = "solid #b6c4d4 2px";
  MenueDivs[j].style.borderRadius = "0px";
  MenueDivs[j].style.fontFamily = MenueText;
  MenueDivs[j].style.fontSize = MenueTextgroesse;
  MenueDivs[j].style.color = MenueTextfarbe;
  MenueDivs[j].style.fontWeight = MenueTextgewicht;
  MenueDivs[j].style.backgroundColor = MenueHintergrundfarbe;
  MenueDivs[j].style.padding = MenueInnenabstand;
  MenueDivs[j].style.zIndex = "4";
  if(Menue[i] == "top") {
   MenueDivs[j].innerHTML = "<a class=\"nav\" href=\""+ Menue[i+2] + "\" onMouseover=\"MouseoverTopMenue(" + j + ")\" onMouseout=\"MouseoutTopMenue(" + j + ")\">" + Menue[i+1] + "</a>";
   Untenversatz = 0;
   if(i > 0) Rechtsversatz += TopBreite;
   MenueDivs[j].style.top = TopStartOben + "px";
   MenueDivs[j].style.left = TopStartLinks + Rechtsversatz + "px";
   MenueDivs[j].style.width = TopBreite + "px";
   MenueDivs[j].style.height = TopHoehe + "px";
   MenueDivs[j].style.backgroundColor = TopMenueHintergrundfarbe;
   Untenversatz += TopHoehe;
  }
  else if(Menue[i] == "down") {
   MenueDivs[j].innerHTML = "<a class=\"nav\" href=\""+ Menue[i+2] + "\" onMouseover=\"MouseoverDownMenue(" + j + ")\" onMouseout=\"MouseoutDownMenue(" + j + ")\">" + Menue[i+1] + "</a>";
   MenueDivs[j].style.top = TopStartOben + Untenversatz + "px";
   MenueDivs[j].style.left = TopStartLinks + Rechtsversatz + "px";
   MenueDivs[j].style.width = DownBreite + "px";
   MenueDivs[j].style.height = DownHoehe + "px";
   MenueDivs[j].style.paddingLeft = DownLinksrand + "px";
   MenueDivs[j].style.visibility = "hidden";
   Untenversatz += DownHoehe;
  }
  document.getElementsByTagName("body")[0].appendChild(MenueDivs[j]);
  j += 1;
 }
}

function MouseoverTopMenue(n) {
  MenueDivs[n].style.backgroundColor = TopMouseoverHintergrundfarbe;
  Menue_zuruecksetzen();
  for(var i = 0; i < Menue.length; i += 3)
   if(Menue[i] == "down")
    if(parseInt(MenueDivs[parseInt(i/3)].style.left) == parseInt(MenueDivs[n].style.left))
     MenueDivs[parseInt(i/3)].style.visibility = "visible";

}
 function MouseoutTopMenue(n) {
  MenueDivs[n].style.backgroundColor = TopMenueHintergrundfarbe;
}
function MouseoverDownMenue(n) {
  MenueDivs[n].style.backgroundColor = MouseoverHintergrundfarbe;
  MenueDivs[n].style.borderLeft = "solid #FFC891 2px";
}

function MouseoutDownMenue(n) {
  MenueDivs[n].style.backgroundColor = MenueHintergrundfarbe;
  MenueDivs[n].style.borderLeft = "solid #b6c4d4 2px";
 }

function Menue_zuruecksetzen() {
  for(var i = 0; i < Menue.length; i += 3)
   if(Menue[i] == "down")
    MenueDivs[parseInt(i/3)].style.visibility = "hidden";
}
