// Initialize and render the menu bar when it is available in the DOM

            YAHOO.util.Event.onContentReady("navrow", function () {

                // "beforerender" event handler for the menu bar

                function onMenuBarBeforeRender(p_sType, p_sArgs) {


                     //See js/menuinit.js for JSON menu
                   
                    // Add a submenu to each of the menu items in the menu bar
                    this.getItem(0).cfg.setProperty("submenu", { id: "home", itemdata: oSubmenuData["home"] });
                    this.getItem(1).cfg.setProperty("submenu", {  id: "about_chesva", itemdata: oSubmenuData["about_chesva"] });
					this.getItem(2).cfg.setProperty("submenu", {  id: "business_services", itemdata: oSubmenuData["business_services"] });
					this.getItem(3).cfg.setProperty("submenu", {  id: "realestate", itemdata: oSubmenuData["realestate"] });
					this.getItem(4).cfg.setProperty("submenu", {  id: "resources", itemdata: oSubmenuData["resources"] });					
					this.getItem(5).cfg.setProperty("submenu", {  id: "contact", itemdata: oSubmenuData["contact"] });
					this.getItem(6).cfg.setProperty("submenu", {  id: "sitemap", itemdata: oSubmenuData["sitemap"] });

                }


                /*
                     Instantiate the menubar.  The first argument passed to the 
                     constructor is the id of the element in the DOM that 
                     represents the menubar; the second is an object literal 
                     representing a set of configuration properties for 
                     the menubar.
                */

                var oMenuBar = new YAHOO.widget.MenuBar("navrow", {  autosubmenudisplay: true, showdelay: 250, hidedelay:  750, lazyload: true });


                // Subscribe to the "beforerender" event

                oMenuBar.beforeRenderEvent.subscribe(onMenuBarBeforeRender);


                /*
                     Call the "render" method with no arguments since the markup for 
                     this menu already exists in the DOM.
                */

                oMenuBar.render();            

            });
