function listItem(node,i) {
      this.node = node;
      this.i = i;
      this.state = 0;
      this.doState = function(givenState) {
        if (this.state==givenState && this.state%2) {
          /*peinlich, peinlich Firefox 3.0.15 ...*/
          this.node.className=this.node.className.replace(" js_hover", "");
          this.node.className=this.node.className.replace("js_hover", "");
          this.node.className=this.node.className.replace(" js_nohover", "");
          this.node.className=this.node.className.replace("js_nohover", "");
          this.node.className+=" js_hover";
        }
        else if (this.state==givenState && !(this.state%2)) {
          this.node.className=this.node.className.replace(" js_hover", "");
          this.node.className=this.node.className.replace("js_hover", "");
          this.node.className=this.node.className.replace(" js_nohover", "");
          this.node.className=this.node.className.replace("js_nohover", "");
          this.node.className=this.node.className.replace(" ","");
          this.node.className+=" js_nohover";
        }
      }
      this.open = function() {
        this.state += (1+this.state)%2;
        if (document.all) {
          this.ie_hover();
        }
        setTimeout("listItems["+this.i+"].doState("+this.state+");",400);
        //this.doState();
      }
      this.close = function() {
        this.state += this.state%2;
        if (document.all) {
          this.ie_nohover();
        }
        setTimeout("listItems["+this.i+"].doState("+this.state+");",400);
        //listItems[this.i].doState();
      }
      this.directOpen = function() {
        this.state += (1+this.state)%2;
        this.doState(this.state);
      }
      this.ie_hover = function() {
        this.node.className=this.node.className.replace(" ie_hover", "");
        this.node.className+=" ie_hover";
      }
      this.ie_nohover = function() {
        this.node.className=this.node.className.replace(" ie_hover", "");
      }
    }
    function callOpen() {
      listItems[this.i].open();
    }
    function callClose() {
      listItems[this.i].close();
    }
    function callDoState() {
      listItems[this.i].directOpen();
    }
    listItems = new Array();
    function js_hover() {
        if (document.getElementById) {
          //navRoot = document.getElementById("main_navi");
          navRoots = document.getElementsByTagName("ul");
          globali = 0;
          for (j=0; j<navRoots.length; j++) {
            if (navRoots[j].className=="navi")
              navRoot = navRoots[j];
            else
              continue;
            for (i=0; i<navRoot.childNodes.length; i++) {
                node = navRoot.childNodes[i];
                if (node.nodeName=="LI") {
                    listItems[globali] = new listItem(node,globali);
                    node.i = globali;
                    node.className+=" js_nohover";
                    node.onmouseover=callOpen;
                    node.onmouseout=callClose;
                    node.onclick=callDoState;
                }
              globali++;
            }
          }
        }
    }
