       /*
            Initialize and render the MenuBar when its elements are ready 
            to be scripted.
       */
       YAHOO.util.Event.onContentReady("rsi_topmenu", function () {
           /*
                Instantiate a MenuBar:  The first argument passed to the 
                constructor is the id of the element in the page 
                representing the MenuBar; the second is an object literal 
                of configuration properties.
           */
           var oMenuBar = new YAHOO.widget.MenuBar("rsi_topmenu", { 
                                                       autosubmenudisplay: true, 
                                                       hidedelay: 750, 
                                                       lazyload: true });

           /*
                Define an array of object literals, each containing 
                the data necessary to create a submenu.
           */
           var aSubmenuData = [
           
               {
                   id: "auto", 
                   itemdata: [ 
                       { text: "Auto Insurance Quote", url: "./auto_quote.htm" }
                   ]
               },
			   
               {
                   id: "homeowners", 
                   itemdata: [
                       { text: "Homeowners Insurance Quote", url: "./homeowner_quote.htm" },
					   { text: "Condo Insurance Quote", url: "./condo_quote.htm" }
                   ]    
               },
               
               {
                   id: "business", 
                   itemdata: [
                       { text: "Business Insurance Quote", url: "./business_quote.htm" },
					   { text: "Commercial Auto Quote", url: "./commercial_auto_quote.htm" },
					   { text: "Rental Property Insurance Quote", url: "./rental_quote.htm" }
                   ] 
               },
               
               {
                   id: "customer_area",
                   itemdata: [
					   { text: "Downloads", url: "./downloads.php" },
					   { text: "Questions", url: "./questions.htm" },
					   { text: "Reporting Claims After Hours", url: "./claims.htm" },
					   { text: "Request a Certificate of Liability", url: "./liability.htm" },
                       { text: "Request a Condo Certificate", url: "./condo.htm" },
                       { text: "Request an Insurance Binder", url: "./binder.htm" }
                   ]
               },
               {
                   id: "about_us",
                   itemdata: [
                       { text: "Our Insurance Carriers", url: "./carriers.htm"}
                   ]
               }                    
           ];

           /*
                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]);
                   this.getItem(2).cfg.setProperty("submenu", aSubmenuData[2]);
                   this.getItem(3).cfg.setProperty("submenu", aSubmenuData[3]);
                   this.getItem(4).cfg.setProperty("submenu", aSubmenuData[4]);
              //     this.getItem(5).cfg.setProperty("submenu", aSubmenuData[5]);
                //   aSubmenuData[3].cfg.setProperty("context", ["nav","tr","tl"]);

               }

           });

           /*
                Call the "render" method with no arguments since the 
                markup for this MenuBar instance is already exists in 
                the page.
           */
           oMenuBar.render();         
       
       });
