/* Initialize and render the MenuBar when the page's DOM is ready to be scripted. */ YAHOO.util.Event.onDOMReady(function () { /* Define an array of object literals, each containing the data necessary to create the items for a MenuBar. */ var aItemData = [ { text: "   HOME", url: "/index.php" }, { text: "PRODUCTS", submenu: { id: "productsmenu", itemdata: [ [ { text: "Wireless Equipment", url: "/index.php?product_type=wireless_equipment" }, { text: "Antennas", url: "/index.php?product_type=antennas" }, { text: "Fiber Optic", url: "/index.php?product_type=fiber_optic" }, { text: "GPS Timing", url: "/index.php?product_type=gps_timing" }, { text: "Surge Protection", url: "/index.php?product_type=surge_protection" }, { text: "Security Cameras", url: "/index.php?product_type=security_cameras" } ], ] } }, { text: "SUPPORT", submenu: { id: "supportmenu", itemdata: [ [ { text: "Software Updates", url: "/index.php?support_type=software_updates" }, { text: "RMA Forms", url: "/index.php?support_type=rma_forms" }, { text: "Credit Application", url: "/index.php?support_type=credit_application" }, { text: "White Papers", url: "/index.php?support_type=white_papers" }, { text: "User Manuals", url: "/index.php?support_type=user_manuals" } ], ] } }, { text: "ABOUT US", submenu: { id: "aboutmenu", itemdata: [ [ { text: "Company History", url: "/index.php?about_type=company_history" }, { text: "News", url: "/index.php?about_type=news" }, { text: "Key Players", url: "/index.php?about_type=key_players" } // { text: "Sales Team", url: "/index.php?about_type=sales_team" }, // { text: "Support Team", url: "/index.php?about_type=support_team" } ], ] } }, { text: "CONTACT US", submenu: { id: "contactmenu", itemdata: [ [ { text: "Accounting", url: "/index.php?contact_type=accounting" }, { text: "Sales", url: "/index.php?contact_type=sales" }, { text: "Support", url: "/index.php?contact_type=support" } ], ] } } ]; /* Instantiate a MenuBar: The first argument passed to the constructor is the id of the element to be created; the second is an object literal of configuration properties. */ var oMenuBar = new YAHOO.widget.MenuBar("mymenubar", { lazyload: true, submenualignment:["tl","bl"], itemdata: aItemData }); YAHOO.util.Dom.addClass(oMenuBar.element, "yuimenubarnav"); /* Since this MenuBar instance is built completely from script, call the "render" method passing in a node reference for the DOM element that its should be appended to. */ oMenuBar.render(document.getElementById("lmg-top-menu-bar")); } )