            YAHOO.util.Event.onContentReady("productsandservices", function () {

                var oMenuBar = new YAHOO.widget.MenuBar("productsandservices", { 
                                                            autosubmenudisplay: true, 
                                                            hidedelay: 750, 
                                                            lazyload: true });

                var aSubmenuData = [
                
                    {
				id: "home", itemdata: [ null ],
                        id: "tracking", 
                        itemdata: [ 
                            { text: "Live tracking", url: "http://www.findonamap.com/members/liveTracking.php" },
                            { text: "Past tracking", url: "http://www.findonamap.com/members/pastTracking.php" },
                        ]
                    },

                    {
                        id: "devices", 
                        itemdata: [
                            { text: "Groups management", url: "http://www.findonamap.com/members/groupsManagement.php" },
                            { text: "Devices management", url: "http://www.findonamap.com/members/devicesManagement.php" }                 
                        ]    
                    },
                    

                ];


                /*
                     Subscribe to the "beforerender" event, adding a submenu 
                     to each of the items in the MenuBar instance.
                */

                oMenuBar.subscribe("beforeRender", function () {

                    if (this.getRoot() == this) {
                        this.getItem(0).cfg.setProperty("submenu", aSubmenuData[0]);
                        this.getItem(1).cfg.setProperty("submenu", aSubmenuData[1]);

                    }

                });

                oMenuBar.render();         
            
            });
