/*
    - checking client and operating system to write a class into <body>-tag
    - no CSS-hacking will be nesaccary... :-)
    - script-reference has to be done after (!) opening <body>-tag
*/
    var CLIENT = navigator.userAgent;
    var OS = navigator.platform;
    
    if (CLIENT.indexOf("Firefox/3") != -1) {
        CLIENT = 'F3';
    } else if (CLIENT.indexOf("MSIE 6.0") != -1) {
        CLIENT = 'I6';
    } else if (CLIENT.indexOf("MSIE 8.0") != -1) {
        CLIENT = 'I8';
    } else if (CLIENT.indexOf("MSIE 7.0") != -1) {
        CLIENT = 'I7';
    } else if (CLIENT.indexOf("Opera") != -1) {
        CLIENT = 'OP';
    } else if (CLIENT.indexOf("Chrome") != -1) {
        CLIENT = 'CH';
    } else if (CLIENT.indexOf("Safari") != -1) {
        CLIENT = 'SA';
    }
    
    if (OS.indexOf("Win32") != -1) {
        OS = 'WIN';
    } else if (OS.indexOf("Mac") != -1) {
        OS = 'MAC';
    } else if (OS.indexOf("Linux") != -1) {
        OS = 'UNIX';
    }
    
    CLIENT_OS = CLIENT + ' ' + OS;
    document.getElementsByTagName('body')[0].className = CLIENT_OS;
    
    
/*
    Script that handles the functionality of the main-navigation...
*/
var menuids=["NAVI"]
function buildsubmenus() {
    for (var i=0; i<menuids.length; i++) {
        var ultags=document.getElementById(menuids[i]).getElementsByTagName("ul")
        for (var t=0; t<ultags.length; t++) {
            ultags[t].parentNode.onmouseover=function() {
                this.getElementsByTagName("ul")[0].style.display="block"
            }
            ultags[t].parentNode.onmouseout=function() {
                this.getElementsByTagName("ul")[0].style.display="none"
            }
        }
        for (var t=ultags.length-1; t>-1; t--) {
            ultags[t].style.visibility="visible"
            ultags[t].style.display="none"
        }
    }
}
if (window.addEventListener) {
    window.addEventListener("load", buildsubmenus, false)
} else if (window.attachEvent) {
    window.attachEvent("onload", buildsubmenus)
}