
// Initialize and render the menu bar when it is available in the DOM

YAHOO.util.Event.onContentReady("mainmenu", function () {

        // Instantiate and render the menu bar

        var oMenuBar = new YAHOO.widget.MenuBar("mainmenu", { autosubmenudisplay: true,lazyload: true });

        /*
           Call the "render" method with no arguments since the markup for 
           this menu already exists in the DOM.
         */

        oMenuBar.render();

        });
