<!--

//############################ BROWSERUNTERSCHEIDUNG ###########################################
   var DHTML=false, DOM=false, MSIE4=false, NS4=false, OP=false;

   if (document.getElementById) {
     DHTML = true;
     DOM = true;
   } else {
     if (document.all) {
       DHTML = true;
       MSIE4 = true;
     } else {
       if (document.layers) {
         DHTML = true;
         NS4 = true;
       }
     }
   }
   if (window.opera) {
     OP = true;
   }

   function getElement (Mode, Identifier, ElementNumber) {
     var Element;
     if (DOM) {
       if (Mode.toLowerCase() == "id") {
         if (typeof document.getElementById(Identifier) == "object") {
           Element = document.getElementById(Identifier);
         } else {
           Element = false;
         }
         return Element;
       }
       if (Mode.toLowerCase() == "name") {
         var ElementList = document.getElementsByName(Identifier);
         if (typeof ElementList == "object" || (OP && typeof ElementList == "function")) {
           Element = ElementList[ElementNumber];
         } else {
           Element = false;
         }
         return Element;
       }
       if (Mode.toLowerCase() == "tagname") {
         var ElementList = document.getElementsByTagName(Identifier);
         if (typeof ElementList == "object" || (OP && typeof ElementList == "function")) {
           Element = ElementList[ElementNumber];
         } else {
           Element = false;
         }
         return Element;
       }
       return null;
     }
     if (MSIE4) {
       if (Mode.toLowerCase() == "id") {
         if (typeof document.all[Identifier] == "object") {
           Element = document.all[Identifier];
         } else {
           Element = false;
         }
         return Element;
       }
       if (Mode.toLowerCase() == "tagname") {
         if (typeof document.all.tags(Identifier) == "object") {
           Element = document.all.tags(Identifier)[ElementNumber];
         } else {
           Element = false;
         }
         return Element;
       }
       if (Mode.toLowerCase() == "name") {
         if (typeof document[Identifier] == "object") {
           Element = document[Identifier];
         } else {
           Element = false;
         }
         return Element;
       }
       return false;
     }
     if (NS4) {
       if (Mode.toLowerCase() == "id" || Mode.toLowerCase() == "name") {
         if (typeof document[Identifier] == "object") {
           Element = document[Identifier];
         } else {
           Element = false;
         }
         return Element;
       }
       if (Mode.toLowerCase() == "index") {
         if (typeof document.layers[Identifier] == "object") {
           Element = document.layers[Identifier];
         } else {
           Element = false;
         }
         return Element;
       }
       return false;
     }
     return false;
   }
//##############################################################################################
  //++++++ globale variablen +++++++++++++++++++
  htmlDoc = this;
  lastElement = this;
  ebeneX = 0;



  // liefert eine variable mit x und y wert als abstand zum BODY-tag
  function getPosition(nrstr) {
    var tagname="", x=0, y=0;
    // sichtbare menupunkte sollten ein object und nicht unbestimmt sein
    while ((typeof(nrstr)=="object") && (typeof(nrstr.tagName)!="undefined")) {
      y+=nrstr.offsetTop;
      x+=nrstr.offsetLeft;
      tagname=nrstr.tagName.toUpperCase();
      if (tagname=="BODY") nrstr=0;
      if (typeof(nrstr)=="object") nrstr=nrstr.offsetParent;
    }
    position = new Object();
    position.x = x;
    position.y = y;
    //alert ("(X;Y):  ("+position.x+";"+position.y+")");
    return position;
  }

  function addSubMenu (name,exe,bild,breite,headid) {
    var subMenuLink;
    // aufruf aus document oder aus einem submenu
    if (this == htmlDoc) {
      subMenuLink = getElement("id",headid);
      subMenuLink.onmouseover = headItemMouseOver;
      subMenuLink.onmouseout = headItemMouseOut;
      subMenuLink.menuItemMouseOver = menuItemMouseOver;
      subMenuLink.menuItemMouseOut = menuItemMouseOut;
      subMenuLink.menuMouseOut = menuMouseOut;
      subMenuLink.menuMouseOver = menuMouseOver;
      subMenuLink.call = "HeadItem";
    }
    else {
      subMenuLink = this.addSubItem(name,exe,bild,breite);
    }
    newSubMenu = new SubMenu();
    subMenuLink.subm = newSubMenu;          // WICHTIG!
    subMenuLink.subm.source = subMenuLink;  // WICHTIG!
    subMenuLink.addSubItem = addSubItem;    // dem Menue kann ein Menuepunkt..
    subMenuLink.addSubMenu = addSubMenu;    // ..oder ein Untermenue hinzugefuegt werden
    return subMenuLink;
  }

  function SubMenu() {
    var block = document.createElement("div");
    block.setAttribute("id","Submenu");
    block.style.position = "absolute";
    block.style.top = "0";
    block.style.left = "0";
    block.style.visibility = "hidden";
    document.body.appendChild(block);
    block.subItems = new Array();
    block.addSubItem = addSubItem;
    block.addSubMenu = addSubMenu;
    block.onmouseover = menuMouseOver;
    block.onmouseout = menuMouseOut;
    block.call = "SubMenu";
    return block;
  }

  function addSubItem (name,exe,bild,breite) {
    if (this.subm)  // aufruf aus einem submenu (alternative document) ...
      return this.subm.addSubItem(name,exe,bild,breite);   // ...fuege item dem submenu zu
    var block = new SubItem (name,exe,bild,breite);
    block.source = this;
    this.subItems[this.subItems.length] = block;
    this.appendChild(block);
    return block;
  }

  
//############### dynamische Erzeugung von Tabellen der Untermenues #####
  function SubItem (name,exe,bild,breite) {
    var block = document.createElement("div");
    borderTab = document.createElement("table");
    borderTab.setAttribute("border","0","true");
    borderTab.setAttribute("cellpadding","0","true");
//################ Abstand zwischen den Untermenue-Zellen ###############
    borderTab.setAttribute("cellspacing","1","true");
//#######################################################################
    borderTab.setAttribute("bordercolor","#004E76","true");
    borderTab.setAttribute("style","border-collapse: collapse","true");
    borderTbody = document.createElement("tbody");
    borderRow = document.createElement("tr");
    borderCell = document.createElement("td");
//################ Rahmen um Menuepunkte (nur IE) #######################
//# borderCell.style.border = "solid 1 #07265F";                        #
//#######################################################################
    myTable = document.createElement("table");
    myTable.setAttribute("border","0","true");
    myTable.setAttribute("bgcolor",htmlDoc.itemOffColor,"true");
      myTbody = document.createElement("tbody");
        myRow = document.createElement("tr");
        myRow.setAttribute("height",htmlDoc.itemHeight);
          myCell1 = document.createElement("td");
          myCell1.style.width = breite;
          myCell1.setAttribute("align","left");
          myCell1.style.color = htmlDoc.fontOffColor;
            myText = document.createTextNode(name);
          myCell1.appendChild(myText);
          myCell2 = document.createElement("td");
          myCell2.setAttribute("valign","middle");
          if (bild) {
              myImag = document.createElement("img");
              myImag.setAttribute("src", bild.src);
              myCell2.appendChild(myImag);
          } else
              myCell2.setAttribute("width",htmlDoc.imageSpace);
        myRow.appendChild(myCell1);
        myRow.appendChild(myCell2);
      myTbody.appendChild(myRow);
    myTable.appendChild(myTbody);
    borderCell.appendChild(myTable);
    borderRow.appendChild(borderCell);
    borderTbody.appendChild(borderRow);
    borderTab.appendChild(borderTbody);
    block.appendChild(borderTab);
    block.call = "SubItem";
    if(exe) {
      block.exe = exe;
    }
    block.onmouseover = menuItemMouseOver;
    block.onmouseout = menuItemMouseOut;
    block.onmousedown = action;
    return block;
  }


  function headItemMouseOver() {
    if (ready == 1) {
      if (this.subm) {
        var a = getPosition(this);  //position vom link bestimmen
//################### abstand vom HTML-start-tag #######################
        this.subm.style.top = a.y + 18;
        this.subm.style.left = a.x - 1;
//######################################################################
        this.subm.style.visibility = "visible";
      }
      this.menuMouseOver();
      this.menuItemMouseOver();
    }
  }


  function headItemMouseOut(){
    if(ready == 1){
      this.menuItemMouseOut();
      this.menuMouseOut();
    }
  }


  // versenkt das vorherige Submenu unverzueglich,
  // wenn ein neues Submenu erscheinen soll
  function menuMouseOver(){
    //alert("menuMouseOver");
    if(htmlDoc.timeoutID != -1){  // wenn setTimeout() laeuft
      clearTimeout(htmlDoc.timeoutID);  // siehe beschreibung unten
      htmlDoc.timeoutID = -1;
    }
    // versenke alle fremden subm's
    //if(lastElement != this && lastElement.subm != this)    {
    //timeout();
  }
  // clearTimeout() - Bricht ein Timeout ab, der mit der Methode setTiemeout() gestartet wurde.
  // Erwartet als Parameter die Variable, in der der Aufruf von setTimeout() gespeichert
  // wurde.



  // fuehrt eine anwendung nach einer verzoegerungszeit aus, Parameter:
  // 1. code = JavaScript-anweisung, die verzoegert werden soll
  // 2. pause = wert in millisekunden bis zum ausfuehren
  // rueckgabewert ist unbestimmte browservariable (z.b. 34344478)
  function menuMouseOut(){
    //alert("menuMouseOut");
    htmlDoc.timeoutID = setTimeout("timeout();", 1000);
  }


  // erwartet globale variablen lastElement, htmlDoc
  // sind beide unterschiedlich wurde mindestens ein Submenu angezeigt
  // und der ausgangszustand des Gesamtmenus wieder hergestellt
  function timeout(){
    if(lastElement != htmlDoc) {
      if(lastElement.subm) {
        baumOff(lastElement.subm,htmlDoc);
      }
      else {
        baumOff(lastElement,htmlDoc);
      }
    }
    htmlDoc.timeoutID = -1; // timeout-erkennung auf startwert
  }


  // versenkt alle untermenus unterhalb des subm von overElement
  function baumOff(outElement, overElement){
    if(outElement.call != "HeadItem") {
      if(outElement.source != overElement) {
        if(outElement.call != "SubItem") {
          outElement.style.visibility = "hidden";
        }
        baumOff(outElement.source, overElement);
      }
    }
  }


  function action(){
    timeout();
    if(this.exe){
      eval(this.exe);
    }
    return false;
  }


  function menuItemMouseOver() {
    this.style.cursor='hand';
    // wandern im baum
    if(this.call == "SubItem") {
      this.firstChild.firstChild.firstChild.firstChild.firstChild.firstChild.firstChild.firstChild.style.color = htmlDoc.fontOnColor;
      this.firstChild.firstChild.firstChild.firstChild.firstChild.style.backgroundColor = htmlDoc.itemOnColor;
    }
    if(this.subm && this.call=="SubItem"){
      var a = getPosition(this);
      var w = parseInt(this.firstChild.firstChild.firstChild.firstChild.firstChild.firstChild.firstChild.firstChild.style.width);
      // menugeruest hat x-wert = source-x + menulinkweite + abstand
      this.subm.style.left =  a.x + w + htmlDoc.nextMenuX;
      // menugeruest hat y-wert = source-y + abstand
      this.subm.style.top = a.y + htmlDoc.nextMenuY;
    }
    if(lastElement != htmlDoc) {
      if(this.call == "HeadItem") {
        if(lastElement != this) {
          timeout();
        }
      }
      else if(lastElement != this.source.source) {
        if(lastElement.subm) {
          lastElement.subm.style.visibility= "hidden";
        }
        if(lastElement.source != this.source) {
          baumOff(lastElement, this.source);
        }
      }
      lastElement = this;
    }
    if(this.subm) {
      this.subm.style.visibility = "visible";
    }
  }


  function menuItemMouseOut() {
    if(this.call != "HeadItem") {
      this.firstChild.firstChild.firstChild.firstChild.firstChild.firstChild.firstChild.firstChild.style.color = htmlDoc.fontOffColor;
      this.firstChild.firstChild.firstChild.firstChild.firstChild.style.backgroundColor = htmlDoc.itemOffColor;
    }
    lastElement = this;
  }

-->