var menuId = "tarang_menu";   
	YAHOO.util.Event.onContentReady(menuId, function () {

                // "beforerender" event handler for the menu bar

                function onMenuBarBeforeRender(p_sType, p_sArgs) {

                    var oSubmenuData = {
    
                        "events": [
    
                            { text: "Calendar", url: "calendar.html" },
                            { text: "Gallery", url: "gallery.html" }          
    
                        ],
                        
                        "sponsors": [
    
                            { text: "Tarang Sponsors", url: "tarang_sponsors.html" },
                            { text: "Promote", url: "promote.html" }     
                        
                        ],
                        
                        "information": [
    
                            { text: "Incoming Students", submenu: { id: "inc", itemdata: [
        
                                    { text: "Before Arrival", url: "before_arrival.html" },
                                    { text: "After Arrival", url: "after_arrival.html" },
        
                                ] }
                            },
			    { text: "Lesson of the Week", url: "low.html" },

                            { text: "Useful Links", url: "useful_links.html" }
                        
                        ],
                        
                       "admin": [
    
                            { text: "Committee", url: "committee.html" },
                            { text: "Constitution (pdf)", url: "pdf/constitution.pdf" }
                        
                        ]
                    
                    };

                    // Add a submenu to each of the menu items in the menu bar

                    this.getItem(1).cfg.setProperty("submenu", { id: "events", itemdata: oSubmenuData["events"] });
                    this.getItem(2).cfg.setProperty("submenu", { id: "sponsors", itemdata: oSubmenuData["sponsors"] });
                    this.getItem(3).cfg.setProperty("submenu", { id: "information", itemdata: oSubmenuData["information"] });
                    this.getItem(4).cfg.setProperty("submenu", { id: "admin", itemdata: oSubmenuData["admin"] });
					var evnt = document.getElementById("eventHref");
  					var inHTML = evnt.innerHTML 
  					evnt.innerHTML =inHTML + "<img src='img/new.gif'></img>"
                }


                /*
                     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(menuId, { 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();  
                   	         
            
            });
            


 