﻿// JScript File

// JScript File

var CurrentLocation = "onbekend";
var GotoLocation = "1";

var SelectedMenuItem='0';
var browser=navigator.appName;

function MenuItemClick(number,redirect)
{   
  //  alert('in menu click'+number+redirect);
  var menuItemText;
    var menuItemTextSelected;
    var menuItemBar;
    var menuItemBarSelected;
    menuItemText = "td_menu_item_text";
            menuItemTextSelected="td_menu_item_text_selected";
            menuItemBar="td_menu_item_bar";
            menuItemBarSelected="td_menu_item_bar_selected";
    //alert('in MenuItemClick,  number = '+ number);
//    if (SelectedMenuItem != 0)
//    {
//        document.getElementById('menu_layer_item' + SelectedMenuItem).style.visibility="hidden";
//        document.getElementById('menu_layer_item_bg' + SelectedMenuItem).style.visibility="hidden";
//    }
   // browser!="Netscape"
    if ( document.getElementById('menu_item1'))
    {
    
    SelectedMenuItem = number;
    document.getElementById('menu_item1').style.color="green";//.className=menuItemText;
    document.getElementById('menu_item2').style.color="green";//.className=menuItemText;
    document.getElementById('menu_item3').style.color="green";//.className=menuItemText;
    document.getElementById('menu_item4').style.color="green";//.className=menuItemText;
    document.getElementById('menu_item5').style.color="green";//.className=menuItemText;
    document.getElementById('menu_item6').style.color="green";//.className=menuItemText;
    document.getElementById('menu_item' + number).style.color="#761e23";//.className=menuItemTextSelected;        
    
            
    document.getElementById('menu_itembar1').style.color="white";//.className=menuItemBar;
    document.getElementById('menu_itembar2').style.color="white";//.className=menuItemBar;
    document.getElementById('menu_itembar3').style.color="white";//.className=menuItemBar;
    document.getElementById('menu_itembar4').style.color="white";//.className=menuItemBar;
    document.getElementById('menu_itembar5').style.color="white";//.className=menuItemBar;
    document.getElementById('menu_itembar6').style.color="white";//.className=menuItemBar;
              
    document.getElementById('menu_itembar' + number).style.color="#761e23";//.className=menuItemBarSelected;     
    
    
    }
    
   
        //alert('hier1');
        switch(number)
        {
            case "1":
                if (CurrentLocation == "home")
                {
                    GotoLocation = "1";
                    getSource("home","0");
                }
                else
                {
                    GotoLocation = "1";
                    if (redirect=="true")
                    {
                    window.location = "home.aspx";
                    }
                }
                //alert('hier1');
                
                break;
            case "2":
               // alert('hier');
               if (redirect=="true")
                    {
                window.location = "webwinkel/webwinkel1.aspx";
                }
                break;
             case "3":   
                if (CurrentLocation == "home")
                {
                    getSource("watersport","0");
                }
                else
                {
                    GotoLocation = "3"; 
                    window.location = "home.aspx?site=watersport";
                }
                break;
             case "4":   
                if (CurrentLocation == "home")
                {
                    getSource("recreatie","0");
                }
                else
                {
                    window.location = "home.aspx?site=recreatie";
                }
                break;
             case "5":   
                if (CurrentLocation == "home")
                {
                    //alert('hier werkwijze');
                    getSource("werkwijze","0");
                    //alert('hier werkwijze');
                }
                else
                {
                    window.location = "home.aspx?site=werkwijze";
                }
                break;
             case "6":   
                if (CurrentLocation == "home")
                {
                    getSource("contact","0");
                }
                else
                {
                    window.location = "home.aspx?site=contact";
                }
                break;
            default:
                //alert('hier2');
                window.location = "home.aspx";
                break;
        }
    
    //document.getElementById('menu_layer_item' + number).style.visibility="visible";
    //document.getElementById('menu_layer_item_bg' + number).style.visibility="visible";
}



function MenuItemOver(number)
{
    // alert('in menu over');
    var browser=navigator.appName;
    //alert('browser = '+ browser);
    
    //alert('area ='+area);
    var menuItemText;
    var menuItemTextSelected;
    var menuItemBar;
    var menuItemBarSelected;
    menuItemText = "td_menu_item_text";
    menuItemTextSelected="td_menu_item_text_selected";
    menuItemBar="td_menu_item_bar";
    menuItemBarSelected="td_menu_item_bar_selected";
 
    
    
    
    //if (browser!="Netscape")
    //{
    //alert('in MenuItemOver,  number = '+ number);
    if (SelectedMenuItem!='1')
    {
        document.getElementById('menu_item1').style.color="green";//.className=menuItemText;
        document.getElementById('menu_itembar1').style.color="white";//.className=menuItemBar;
    }
    if (SelectedMenuItem!='2')
    {
        document.getElementById('menu_item2').style.color="green";//.className=menuItemText;
        document.getElementById('menu_itembar2').style.color="white";//.className=menuItemBar;
    }
    if (SelectedMenuItem!='3')
    {
        document.getElementById('menu_item3').style.color="green";//.className=menuItemText;
        document.getElementById('menu_itembar3').style.color="white";//.className=menuItemBar;
    }
    if (SelectedMenuItem!='4')
    {
        document.getElementById('menu_item4').style.color="green";//.className=menuItemText;
        document.getElementById('menu_itembar4').style.color="white";//.style.color="green";//.className=menuItemBar;
    }
    if (SelectedMenuItem!='5')
    {
        document.getElementById('menu_item5').style.color="green";//.className=menuItemText;
        document.getElementById('menu_itembar5').style.color="white";//.className=menuItemBar;
    }
    if (SelectedMenuItem!='6')
    {
        document.getElementById('menu_item6').style.color="green";//.className=menuItemText;
        document.getElementById('menu_itembar6').style.color="white";//.className=menuItemBar;
    }
    if (number!=0)
    {
        document.getElementById('menu_item' + number).style.color="#761e23";//.className=menuItemTextSelected;        
        document.getElementById('menu_itembar' + number).style.color="#761e23";//;      
    }
    //}
}


