﻿// JScript File

function setupSaintMichaelsMenu() { 

    /*
         Instantiate a Menu.  The first argument passed to the 
         constructor is the id of the element in the DOM that represents 
         the Menu instance.
    */
    
    var oMenuBar = new YAHOO.widget.MenuBar("menubar");
    
    var aItemData = [

        { text: "Home", url: "/Default.aspx", submenu: {} },
        
        { text: "About", submenu: { id: "aboutmenu", itemdata: [
                [ 
                    { text: "Staff", url: "/About/Staff.aspx" },
                    { text: "Missions", url: "/About/Missions.aspx"}
                ],
            ] }
        },
        
        { text: "Contact Us", url: "/ContactUs.aspx" },
        
        { text: "Events", url: "/Events.aspx" },
        
        { text: "News", url: "/News/Default.aspx" }

    ];
    
    oMenuBar.addItems(aItemData);    
   
    oMenuBar.cfg.setProperty("position", "dynamic");
    oMenuBar.cfg.setProperty("clicktohide", true);
    oMenuBar.cfg.setProperty("autosubmenudisplay", true);
    oMenuBar.cfg.setProperty("hidedelay", 400);

    /*
         Call the "render" method with no arguments since the markup for 
         this Menu instance already exists in the DOM.
    */
    oMenuBar.render("menuBox");
    
    // Show the Menu instance
    oMenuBar.show();
            
    /* YAHOO.util.Dom.addClass(oMenu.element, "yuimenubarnav");  */
}




