// To change the main menu or add new drop-down menus, you need to modify the dropdown menu list in borders.dwt

	  var submenus = new Array(
	    //---------------------------- TEAM ------------------------------------------------------  
	    { mainmenu: "index.htm", items: new Array(
	      {text: "ROAD TO KONA",                              href:"RoadToKona09.htm"},            
	      {text: "TEAM VIDEOS",                               href:"Team%20Video.htm"},            
	      {text: "CONTACT INFO",                              href:"Contact.htm"}            
	      )},
	    //---------------------------- COACHES ------------------------------------------------------  
	    { mainmenu: "Coaches.htm", items: new Array(
	      {text: "KAINOA PAUOLE-ROTH",						  href:"CoachKainoa.htm"},
	      {text: "JAKE BARTHOLOMY",							  href:"CoachJake.htm"},
	      {text: "LOREE BOLIN",								  href:"CoachLoree.htm"},
	      {text: "AARON BURBY",								  href:"CoachAaron.htm"},
   	      {text: "JON PAUOLE",								  href:"CoachJon.htm"},
   	      {text: "MISSION STATEMENT",						  href:"Mission.htm"}
	      )},
	      
	    //---------------------------- SERVICES ------------------------------------------------------  
	    { mainmenu: "services.htm", items: new Array(
	      {text: "SERVICES",                                  href:"Services.htm"},            
	      {text: "PROGRAMS & PRICES",                         href:"Programs&Prices.htm"},            
	      {text: "ADDITIONAL SERVICES",                 	  href:"Additional Services.htm"},            
	      {text: "GROUP COACHING",            		 		  href:"GroupCoaching.htm"},
	      {text: "RUN PROGRAMS",                              href:"Running.htm"},            
	      {text: "CAMPS & CLINICS",                           href:"CampsClinics.htm"},            
	      {text: "GIFT CERTIFICATES",                         href:"GiftCertificate.htm"}            
	      )},
	    { mainmenu: "services.htm", dropdown: "mnu_Services", items: new Array(
	      {text: "PROGRAMS & PRICES",                         href:"Programs&Prices.htm"},            
	      {text: "ADDITIONAL SERVICES",                       href:"Additional Services.htm"},
	      {text: "GROUP COACHING",            		  		  href:"GroupCoaching.htm"},
	      {text: "MARATHON & HALF MAR. TRAINING PROGRAM",     href:"Running.htm"},            
	      {text: "CAMPS & CLINICS",                           href:"CampsClinics.htm"},            
	      {text: "GIFT CERTIFICATES",                         href:"GiftCertificate.htm"}            
	      )},
	    //---------------------------- ATHLETES ------------------------------------------------------  
	    { mainmenu: "Athletes.htm", items: new Array(                           
	      {text: "ATHLETES",                                  href:"Athletes.htm"},           
	      {text: "PAUOLE SPORT GEAR",                         href:"Gear.htm"  },           
	      {text: "ROAD TO KONA 2009",                         href:"RoadToKona09.htm"},           
	      {text: "RACE RESULTS 2010",                         href:"RaceResults10.htm"},           
	      {text: "RACE RESULTS 2009",                         href:"RaceResults09.htm"},           
	      {text: "TESTIMONIALS",                              href:"Testimonials.htm"}           
	      )},
	    { mainmenu: "Athletes.htm", dropdown: "mnu_Athletes", items: new Array(                           
	      {text: "RACE RESULTS",                              href:"RaceResults10.htm"},           
	      {text: "PAUOLE SPORT GEAR",                         href:"Gear.htm"  },           
	      {text: "ROAD TO KONA",                              href:"RoadToKona09.htm"},           
	      {text: "TESTIMONIALS",                              href:"Testimonials.htm"}           
	      )},
	    //---------------------------- TEAM ------------------------------------------------------  
	    { mainmenu: "Team.htm", items: new Array(         
	      {text: "TEAM",                                      href:"Team.htm"},           
	      {text: "TEAM CALENDAR",                             href:"TeamCalendar.htm"},           
	      {text: "TEAM APPLICATION",                          href:"Forms/TextFile/TeamApplication.aspx"},           
	      {text: "SPONSORS",                                  href:"Sponsors.htm"},           
	      {text: "2010 RACE SCHEDULE",                        href:"2010Schedule.htm"},           
	      {text: "MAPS",                                      href:"Ride%20and%20Run%20maps.htm"}
	      )},
	    { mainmenu: "Team.htm", dropdown: "mnu_Team", items: new Array(         
	      {text: "TEAM CALENDAR",                             href:"TeamCalendar.htm"},           
	      {text: "TEAM APPLICATION",                          href:"Forms/TextFile/TeamApplication.aspx"},           
	      {text: "SPONSORS",                                  href:"Sponsors.htm"},           
	      {text: "2010 RACE SCHEDULE",                        href:"2010Schedule.htm"},           
	      {text: "MAPS",                                      href:"Ride%20and%20Run%20maps.htm"}
	      )},
	      
	    //---------------------------- PICTURES ------------------------------------------------------  
	    { mainmenu: "PicturesTitlePage.htm", items: new Array(                           
	      {text: "GROUP PIX",                                 href:"Pictures.htm"},           
	      {text: "IRONMAN ARIZONA",                           href:"IMArizona.htm"},           
	      {text: "IRONMAN BRAZIL",                            href:"IMBrazil.htm"},           
	      {text: "IRONMAN CANADA",                            href:"IMCanada.htm"},           
	      {text: "IM COEUR D'ALENE",                          href:"IMCDA.htm" },           
	      {text: "IRONMAN HAWAII",                            href:"IMHawaii.htm"},           
	      {text: "IRONMAN 70.3",                              href:"Ironman703.htm"}           
	      )},
	
	    { mainmenu: "PicturesTitlePage.htm", dropdown: "mnu_Pictures", items: new Array(                           
	      {text: "PAUOLE SPORT PIX",                          href:"PicturesTitlePage.htm"},           
	      {text: "GROUP PIX",                                 href:"Pictures.htm"},           
	      {text: "IRONMAN ARIZONA",                           href:"IMArizona.htm"},           
	      {text: "IRONMAN BRAZIL",                            href:"IMBrazil.htm"},           
	      {text: "IRONMAN CANADA",                            href:"IMCanada.htm"},           
	      {text: "IM COEUR D'ALENE",                          href:"IMCDA.htm" },           
	      {text: "IRONMAN HAWAII",                            href:"IMHawaii.htm"},           
	      {text: "IRONMAN 70.3",                              href:"Ironman703.htm"}           
	      )},
	
	    //---------------------------- COACHES CORNER --------------------------------------------------  
	    {mainmenu: "CoachesCorner.htm", items: new Array(                           
	      {text: "COACHES CORNER",                            href:"CoachesCorner.htm"},           
	      {text: "COACHES CORNER '09",                        href:"CoachesCorner2009.htm"}
	      )}
	  );
	
	  //-------------------------------------------------------
	  // CreateDropdowns - setup the dropdown menu's
	  function CreateDropdowns()
	  {
	    for (var idef = 0; idef < submenus.length; ++idef)
	      if (submenus[idef].dropdown != null)
	      {
	        var submenu = submenus[idef];
	        var menu = document.getElementById(submenu.dropdown);
	        AddMenuItems(menu,submenu);
	      }
	  }
	  
	  //-------------------------------------------------------
	  // AddMenuItems - add the list of menu items to the specified menu
		//      <a href="Coaches.htm">COACHES</a> per item
	  function AddMenuItems(menu, submenu)
	  {
	    var menuitems = submenu.items;
	    for (var iitem = 0; iitem < menuitems.length; ++iitem)
	    {
	      var e = document.createElement("a");
	      e.href = rootpath + menuitems[iitem].href;
	      e.innerText = menuitems[iitem].text;
	      e.textContent = menuitems[iitem].text;
	      //e.setAttribute("nowrap"," ");
	      menu.appendChild(e);
	    }
	  }
	  //-------------------------------------------------------
	  // FindSubMenu
	  //    given either an href or menu item title, find the submenu it belongs to.
	  //    this also searches all the submenu items.
	  function FindSubMenu(pghref)
	  {
	    for (var imenu = 0; imenu < submenus.length; ++imenu)
	    {
	      var submenu = submenus[imenu];
	      if (submenu.mainmenu.toLowerCase() == pghref)
	        return(submenu);
	      for (var iitem = 0; iitem < submenu.items.length; ++iitem)
	        if ((submenu.items[iitem].href.toLowerCase() == pghref) ||
	            (submenu.items[iitem].text.toLowerCase() == pghref))
	          return(submenu);
	    }
	    return(null);
	  }
	  //-------------------------------------------------------
	  //SetPage
	  //  pghref == null, current page based on url
	  //  pghref == url, select pages with href==url
	  //  pghref == title, select pages with menu text==title
	  function SetPage(pghref)
	  {
	    //figure out the ph ref - could be either the page file or the submenu item text
	    if (pghref == null)
	      pghref = cssdropdown.normalizedPageName(document.URL);
	  	if (pghref == "")
	  		pghref = "index.htm";    
	    
	    //setup the dropdown menu's
	    CreateDropdowns(); 
	    
	    //now setup the left bar menu
	    var submenu = FindSubMenu(pghref);
	    if (submenu != null)
	      AddMenuItems(vmenu,submenu);
	      
	    //finish initializing the menu's
	    cssdropdown.startchrome("chromemenu","vmenu")
	    cssdropdown.selectpage(pghref)
	  }
