/*
     Initialize and render the MenuBar when its elements are ready 
     to be scripted.
*/	
var oMenuBar;
InitMenu = function() {	
	
	if(oMenuBar != undefined){	
		oMenuBar.destroy();
	}
	
	YAHOO.util.Event.onContentReady("menu_bar", function () {		
        try {		
			/*
				 Instantiate a Menu.  The first argument passed to the
				 constructor is the id of the element in the DOM that represents
				 the Menu instance.
			*/
			oMenuBar = new YAHOO.widget.MenuBar("menu_bar", {
														autosubmenudisplay: true,
														hidedelay: 750,
														lazyload: true
			 });


			/*
				 Call the "render" method with no arguments since the markup for
				 this Menu instance already exists in the DOM.
			*/
									
			oMenuBar.render();
		}catch(e){console.log(e)}
	});
}

