// Detecting the type of browser (IE, N)

var br
if(navigator.appName == 'Netscape' && document.layers != null){br="N";}
else if(navigator.appName == 'Microsoft Internet Explorer' && document.all != null){br="IE";}
else{br=null}

// Detecting the browser version

ImageHover =
(((navigator.appName == "Netscape") &&
(parseInt(navigator.appVersion) >= 3 )) ||
((navigator.appName == "Microsoft Internet Explorer") &&
(parseInt(navigator.appVersion) >= 4 )));
function ImageLoader(img)
{
var a=new Image(); a.src=img; return a;
}

// Reading the picture files for hover effect

if(ImageHover)
{
aktuelles1=ImageLoader("images/aktuelles1.gif");
aktuelles2=ImageLoader("images/aktuelles2.gif");
schulinfo1=ImageLoader("images/schulinfo1.gif");
schulinfo2=ImageLoader("images/schulinfo2.gif");
projekte1=ImageLoader("images/projekte1.gif");
projekte2=ImageLoader("images/projekte2.gif");
ehemalige1=ImageLoader("images/ehemalige1.gif");
ehemalige2=ImageLoader("images/ehemalige2.gif");
links1=ImageLoader("images/links1.gif");
links2=ImageLoader("images/links2.gif");  
}

// Opens the DropDown-Menu

function showDDNav(){
    args = showDDNav.arguments;
    if(br=="N"){
        var args, theObj;
        args = showDDNav.arguments;
        theObj = eval(args[1]);
          if (theObj) if(theObj.visibility=='hide'){theObj.visibility = 'show';}
    }
    else if(br=="IE"){
        theObj=eval(args[0]);
        if (theObj) if(theObj.style.visibility=='hidden'){hideElement('SELECT');theObj.style.visibility = 'visible'}
        }
    else{return}
}


// Closes the DropDown-Menu

function hideDDNav(){
    args = hideDDNav.arguments;
    if(br=="N"){
        var args, theObj;
        args = hideDDNav.arguments;
        theObj = eval(args[1]);
        if (theObj) if(theObj.visibility=='show'){theObj.visibility = 'hide';}
    }
    else if(br=="IE"){
        theObj=eval(args[0]);
        if (theObj) if(theObj.style.visibility=='visible'){showElement('SELECT');theObj.style.visibility = 'hidden'}
        }
    else{return}
}


// Shows the active DropDown-Menu

function hideDiv(){
    args = hideDiv.arguments;
    if(br=="N"){}
    else if(br=="IE"){
        theObj=eval(args[0]);
        // calculate active size of menu
        leftDiv=theObj.offsetLeft +2
        rightDiv=theObj.offsetLeft + theObj.clientWidth -2
        topDiv=theObj.offsetTop +2
        bottomDiv=theObj.offsetTop + theObj.clientHeight -2
        if(window.event.clientY > bottomDiv || 
            window.event.clientY < topDiv || 
            window.event.clientX < leftDiv || 
            window.event.clientX > rightDiv)
            {theObj.style.visibility = 'hidden';showElement('SELECT');}                
        }
    else{return}
}


// Highlights the menu entry (IE)

function divOver(){
    args = divOver.arguments;
    if(br=="N"){}
    else if(br=="IE"){
        theObj=eval(args[0]);
        if(theObj.style.backgroundColor="12599B"){
            theObj.style.backgroundColor="000040";
        }
    }
    else{return}
}

// Disable the highlighting (IE)

function divOut(){
    args = divOut.arguments;
    if(br=="N"){}
    else if(br=="IE"){
    theObj=eval(args[0]);
        if(theObj.style.backgroundColor="000040"){
            theObj.style.backgroundColor="12599B";
        }
    }
    else{return}
}


// Highlights the menu entry (N)

function menuOver(){
    var args, theMenu;
    args = menuOver.arguments;
    theMenu = eval(args[0]);
    theMenu.bgColor="#000040" 
}


// Disable the highlighting (N)

function menuOut(){
    var args, theMenu;
    args = menuOut.arguments;
    theMenu = eval(args[0]);
    theMenu.bgColor="#12599B" 
}

// Choses the selected URL

function gotoUrl(){
    args = gotoUrl.arguments;
    location.href=args[0]
}


// Hides the selected tag

function hideElement(HTMLtag)
{
    for (i = 3; i < document.all.tags(HTMLtag).length; i++)
    {
        obj = document.all.tags(HTMLtag)[i];
        obj.style.visibility = "hidden";
    }
}


// Shows the selected tag

function showElement(HTMLtag)
{
    for (i = 1; i < document.all.tags(HTMLtag).length; i++)
    {
        obj = document.all.tags(HTMLtag)[i];
        obj.style.visibility = "visible";
    }
}


// Creating border for InternetExplorer

var tdID = 0
function doDiv(){
    args = doDiv.arguments;
    var divID = args[0];
    var x = args[1];
    var divLeft = args[2];
    var arrowPos = args[3];
    var divTop = args[4];
    
    objDiv = "<div id=\"" + divID + "\" style=\"position:absolute; left:"+ divLeft +"px; top:"+ divTop +"px; width:140px; z-index:3; background-color:000040; visibility:hidden; padding-left:2;\" onMouseover=\"showDDNav('document.all[\\'"+ divID +"\\']')\"  onMouseout=\"hideDiv('document.all[\\'" + divID + "\\']')\">"
    objDiv += "<div id=\"arrow\" style=\"position:relative; background-color:000040; width:135px;\"><img src=0g_space2.gif width=1 height=1 align="+ arrowPos +"></div>"         
    for (y = 0; y < 10; y++){
        if(menuData[x][y][0]!=null){
        objDiv += "<div id=\"line\" style=\"position:relative; background-color:#12599B; width:135px;\"><img src=0g_bar.gif width=136 height=1></div>";
        objDiv += "<div id=\"x" + tdID + "\" style=\"position:relative; background-color:12599B; width:135px;\" onMouseover=\"divOver('document.all[\\'x" + tdID + "\\']')\" onMouseout=\"divOut('document.all[\\'x" + tdID + "\\']')\"><span class=\"nav\" onClick=\"gotoUrl('"+menuData[x][y][1]+"')\">"+ menuData[x][y][0] +"&nbsp;</span></div>"
        tdID = tdID +1
        }
    }
    
    objDiv +="<div id=\"line\" style=\"position:relative; background-color:000040; width:138px; height:2px;\"><img src=0g_bar.gif width=138 height=1></div></div>"
    
    document.write(objDiv);
}


// Shows the Netscape Layers

function doLayer(){
    args = doLayer.arguments;
    var nestLayerID=0
    var layerID = args[0];
    var x = args[1];
    var layerLeft = args[2];
    var layerTop = args[4];

    if(navigator.platform.indexOf("Win") < 0){layerInc=15;layerStyle="navmenu";}
    else{layerInc=22;layerStyle="navmenu";}    
        
    objDiv = "<layer id=\""+ layerID +"\" Z-INDEX=100 BGCOLOR=\"000040\" WIDTH=130 LEFT="+ layerLeft +" TOP="+ layerTop +" VISIBILITY=HIDE onmouseover=\"showDDNav('','document.layers[\\'"+ layerID +"\\']')\" onmouseout=\"hideDDNav('','document.layers[\\'"+ layerID +"\\']')\">"
    objDiv +="<layer id=\"line\" BGCOLOR=\"12599B\" WIDTH=130 HEIGHT=1 Z-INDEX=700><center><img src=0g_bar.gif width=150 height=1></center></layer>"
    
    var nestTop=3
        for (y = 0; y < 10; y++){
            if(menuData[x][y][0]!=null){
            
    objDiv += "<layer id=\"x"+nestLayerID+"\" CLIP=\"2,0,147,22\" class=\""+ layerStyle +"\" Z-INDEX=700 BGCOLOR=\"12599B\" HEIGHT=21 WIDTH=130 TOP="+ nestTop +" onmouseover=\"menuOver('document.layers[\\'"+ layerID +"\\'].document.layers[\\'x"+nestLayerID+"\\']')\" onmouseout=\"menuOut('document.layers[\\'"+ layerID +"\\'].document.layers[\\'x"+nestLayerID+"\\']')\"><a id=navstyle href=javascript:gotoUrl('"+menuData[x][y][1]+"')><font color=#ffffff>"+ menuData[x][y][0]
    objDiv +="</font></a></layer>"        

    nestLayerID=nestLayerID+1
    nestTop=nestTop+layerInc
    objDiv +="<layer id=\"line2\" BGCOLOR=\"12599B\" WIDTH=130 HEIGHT=1 Z-INDEX=700 TOP="+ nestTop +"><center><img src=0g_bar.gif width=150 height=2></center></layer>"
    nestTop=nestTop+2
            }
        }
    objDiv +="<layer id=\"lineEnd\" BGCOLOR=\"000040\" WIDTH=130 HEIGHT=1 Z-INDEX=700 TOP="+ nestTop +"></layer></layer>"

    document.write(objDiv)
}


// Defines the huge of the menu
menuData = new Array()
for (i=0; i < 6; i++) {
    menuData[i] = new Array(40)
    for (j=0; j < 20; j++) {
        menuData[i][j] = new Array(2)}}

// Menu ONE
menuData[1][0][0]="&nbsp;Terminplan";
menuData[1][0][1]="1100.htm";
menuData[1][1][0]="&nbsp;Events";
menuData[1][1][1]="1200.htm";
menuData[1][2][0]="&nbsp;Musik";
menuData[1][2][1]="1300.htm";
menuData[1][3][0]="&nbsp;Sport";
menuData[1][3][1]="1400.htm";
menuData[1][4][0]="&nbsp;Theater";
menuData[1][4][1]="1500.htm";
menuData[1][5][0]="&nbsp;Kunst";
menuData[1][5][1]="1600.htm";
menuData[1][6][0]="&nbsp;Hegel-Info";
menuData[1][6][1]="1700.htm";

// Menu TWO
menuData[2][0][0]="&nbsp;Wer war Hegel?";
menuData[2][0][1]="2100.htm";
menuData[2][1][0]="&nbsp;Örtliche Umgebung";
menuData[2][1][1]="2200.htm";
menuData[2][2][0]="&nbsp;Der Schulleiter";
menuData[2][2][1]="2300.htm";
menuData[2][3][0]="&nbsp;Lehrkr&auml;fte";
menuData[2][3][1]="2400.htm";
menuData[2][4][0]="&nbsp;Profile";
menuData[2][4][1]="2500.htm";
menuData[2][5][0]="&nbsp;Fakten &amp; Statistik";
menuData[2][5][1]="2600.htm";
menuData[2][6][0]="&nbsp;Schulcaf&eacute;: PUB";
menuData[2][6][1]="2700.htm";
menuData[2][7][0]="&nbsp;Infos&nbsp;für&nbsp;Praktikanten";
menuData[2][7][1]="2800.htm";
menuData[2][8][0]="&nbsp;Für Hegel-Lehrer";
menuData[2][8][1]="2900.htm";
menuData[2][9][0]="&nbsp;Infos für Schüler";
menuData[2][9][1]="gfs.htm";



// Menu THREE
menuData[3][0][0]="&nbsp;Austauschprogramm";
menuData[3][0][1]="3100.htm";
menuData[3][1][0]="&nbsp;Umweltschutz";
menuData[3][1][1]="3200.htm";
menuData[3][2][0]="&nbsp;Die SMV";
menuData[3][2][1]="3300.htm";
menuData[3][3][0]="&nbsp;Die Mediatoren";
menuData[3][3][1]="3400.htm";
menuData[3][4][0]="&nbsp;Die Schulsanitäter";
menuData[3][4][1]="3400a.htm";
menuData[3][5][0]="&nbsp;Arbeitsgemeinschaften";
menuData[3][5][1]="3500.htm";


// Menu FOUR
// menuData[4][0][0]="&nbsp;E-Mail Adressen";
// menuData[4][0][1]="4100.htm";
// menuData[4][1][0]="&nbsp;Jahrgang 1966";
// menuData[4][1][1]="4200.htm";
// menuData[4][2][0]="&nbsp;Jahrgang 1973";
// menuData[4][2][1]="4300.htm";
// menuData[4][3][0]="&nbsp;Jahrgang 1984";
// menuData[4][3][1]="4400.htm";
// menuData[4][4][0]="&nbsp;Jahrgang 1991";
// menuData[4][4][1]="4500.htm";
// menuData[4][5][0]="&nbsp;Jahrgang 1992";
// menuData[4][5][1]="4600.htm";


// Menu FIVE
menuData[5][0][0]="&nbsp;Die Macher";
menuData[5][0][1]="5100.htm";
menuData[5][1][0]="&nbsp;Rechtsbelehrung";
menuData[5][1][1]="5200.htm";
menuData[5][2][0]="&nbsp;Umfrage";
menuData[5][2][1]="5300.htm";
menuData[5][3][0]="&nbsp;Downloads";
menuData[5][3][1]="5400.htm";
menuData[5][4][0]="&nbsp;Internet-Spionage";
menuData[5][4][1]="5500.htm";
menuData[5][5][0]="&nbsp;Hegel-Chat";
menuData[5][5][1]="5600.htm";
menuData[5][6][0]="&nbsp;Externe Links";
menuData[5][6][1]="5700.htm";


