function drawMenu()
{
    document.write('<table cellpadding=0 cellspacing=0 border=0 width="100%">');
    document.write('<tr valign=bottom>');
    document.write('<td align=center width=280><a href="/"><img src="/images/logo.gif" border=0></a></td>');
    document.write("<td align=center nowrap><a class='menu' id='001' href='/event/index.html'>Event</a></td>");
    document.write("<td align=center nowrap><a class='menu' id='002' href='/participate/index.html'>Participate</a></td>");
    document.write("<td align=center nowrap><a class='menu' id='004' href='/media/index.html'>Media</a></td>");
    document.write("<td align=center nowrap><a class='menu' id='003' href='/results/index.html'>Results</a></td>");
    document.write("<td align=center nowrap><a class='menu' id='005' href='/about/index.html'>About</a></td>");
    document.write('</tr>');
    document.write('</table>');

if (TransMenu.isSupported())
{
    var ms = new TransMenuSet(TransMenu.direction.down, 0, 4, TransMenu.reference.bottomLeft);
    
    var menu1 = ms.addMenu(document.getElementById("001"));
    menu1.addItem("title sponsor: The Freshwater Trust", "/sponsors/title_ft.html");
    menu1.addItem("timeline", "/event/timeline.html");
    menu1.addItem("latest news", "/event/news2010.html");
    //menu1.addItem("pre-race", "/event/pre.html");
    menu1.addItem("sustainability", "/event/sustainable.html");
    menu1.addItem("living finish line", "/event/arch.html");
    //menu1.addItem("bamboo race shirts", "/event/bamboo.html");
    menu1.addItem("USAT Regional Championship", "/event/reg_champs.html");
    menu1.addItem("Best of the U.S. Qualifier", "/event/best_of_us.html");
    //menu1.addItem("RiverFest!", "/participate/riverfest.html");
    //menu1.addItem("expo", "/event/expo.html");
    menu1.addItem("post-race", "/event/post.html");
    menu1.addItem("awards", "/event/awards.html");
    menu1.addItem("sponsors", "/sponsors/featured.html");
    menu1.addItem("supporters", "/sponsors/supporters.html");
    menu1.addItem("FAQs", "/participate/faq.html");
    
    var menu2 = ms.addMenu(document.getElementById("002"));
    menu2.addItem("register", "/participate/register.html");
    menu2.addItem("volunteer", "/participate/volunteer.html");
    menu2.addItem("Run for the River", "/participate/run4theriver.html");
    // menu2.addItem("Pain in the Park", "/participate/pain_in_the_park.html");
    // menu2.addItem("Thursday swims", "/participate/thursday_swims.html");
    menu2.addItem("course description", "/event/courses.html");
    menu2.addItem("course map", "/event/gmap.php");
    menu2.addItem("relay finder", "/participate/relayfinder.html");
    menu2.addItem("medical team", "/sponsors/medical.html");
    menu2.addItem("participant lists", "/participate/lists.html");

    menu2.addItem("participant maps", "javascript:;");
    var mapmenu = menu2.addMenu(menu2.items[8]);
    mapmenu.addItem("2010", "http://www.onemillionrevolutions.org/reg/map.jsp?eventID=158");
    mapmenu.addItem("2009", "http://www.onemillionrevolutions.org/static/ptri_participants_2009.html");
    mapmenu.addItem("2008", "http://www.onemillionrevolutions.org/static/ptri_participants_2008.html");
    mapmenu.addItem("2007", "http://www.onemillionrevolutions.org/static/ptri_participants_2007.html");

    var menu3 = ms.addMenu(document.getElementById("003"));
    menu3.addItem("2010 results and pictures", "/results/2010/index.html");
    menu3.addItem("2009 results and pictures", "/results/2009/index.html");
    menu3.addItem("2008 results and pictures", "/results/2008/index.html");
    menu3.addItem("2007 results and pictures", "/results/2007/index.html");

    var menu4 = ms.addMenu(document.getElementById("004"));
    menu4.addItem("press releases", "/media/releases.html");
    menu4.addItem("in the news", "/media/in_the_news.html");
    menu4.addItem("Slowtwitch chronicles", "/media/slowtwitch.html");

    var menu5 = ms.addMenu(document.getElementById("005"));
    menu5.addItem("mission", "/about/mission.html");
    menu5.addItem("committee", "/about/committee.html");
    menu5.addItem("accommodations", "/region/accommodations.html");
    menu5.addItem("Portland", "/region/portland.html");
    menu5.addItem("Willamette River", "/region/willamette.html");
    menu5.addItem("sister tri: Musselman", "/about/musselman.html");
    menu5.addItem("sister du: Fly by Night", "http://www.flybynightdu.com");
    menu5.addItem("directions", "/region/directions.html");
    menu5.addItem("contact us", "/about/contact.html");

    //var menu6 = ms.addMenu(document.getElementById("006"));
    //menu6.addItem("Aqua Zone Portland Mile", "http://www.portlandmile.com");
    //menu6.addItem("title sponsor: Aqua Zone", "http://www.portlandmile.com/title.html");
    //menu6.addItem("presenting sponsors", "http://www.portlandmile.com/presenting.html");
    //menu6.addItem("course map", "http://www.portlandmile.com/swim_map.php");
    //menu6.addItem("$25,000 purse", "http://www.portlandmile.com/purse.html");
    //menu6.addItem("world-class start list", "http://www.portlandmile.com/start_list.html");
    //menu6.addItem("register", "http://www.portlandmile.com/register.html");
    //menu6.addItem("participants", "http://www.onemillionrevolutions.org/reg/all_athletes.jsp?eventID=118");
    
    TransMenu.renderAll();
  }
}

function createMenu()
{
  if (TransMenu.isSupported())
  {
	TransMenu.initialize();
  }
}

function popup(url, x, y)
{
    window.open(url,'closeup','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=' + y + ',height=' + x);
}
