// Hilfsskript für Suckerfish-Navigation nach http://www.htmldog.com/
// bei Internet Explorer
startList = function() {
    if (document.all&&document.getElementById) {
        navRoot = document.getElementById('menuliste');
        for (i=0; i<navRoot.childNodes.length; i++) {
            node = navRoot.childNodes[i];
            if (node.nodeName.toLowerCase()=='li') {
                node.onmouseover=function() {
                    this.className+=' over';
                }
                node.onmouseout=function() {
                    this.className=this.className.replace(' over', '');
                }
            }
        }
    }
}

// Navigator-Bug: bei Ausklappmenü über Bereich mit overflow:auto wird
// mouseout-Event ausgelöst.
fixMenu = function() {
    if (!document.all) {
        navRoot = document.getElementById('menuliste');
        for (i=0; i<navRoot.childNodes.length; i++) {
            node = navRoot.childNodes[i];
            if (node.nodeName.toLowerCase()=='li') {
                node.onmouseover=function() {
                    scrolldiv = document.getElementById('text');
                    if (scrolldiv != null) {
                        scrolldiv.style.setProperty('overflow','hidden','important');
                    }
                }
                node.onmouseout=function() {
                    scrolldiv = document.getElementById('text');
                    if (scrolldiv != null) {
                        scrolldiv.style.setProperty('overflow','auto','important');
                    }
                }
            }
        }
    }
}

myInit = function() {
    startList();
    fixMenu();
}

// Fehler abfangen
myError = function() {
    return true;
}
window.onerror=myError;
window.onload=myInit;
