// set up drop downs anywhere in the body of the page. I think the bottom of the page is better.. 
// but you can experiment with effect on loadtime.
if (TransMenu.isSupported()) {

//==================================================================================================
// create a set of dropdowns
//==================================================================================================
// the first param should always be down, as it is here
//
// The second and third param are the top and left offset positions of the menus from their actuators
// respectively. To make a menu appear a little to the left and bottom of an actuator, you could use
// something like -5, 5
//
// The last parameter can be .topLeft, .bottomLeft, .topRight, or .bottomRight to inidicate the corner
// of the actuator from which to measure the offset positions above. Here we are saying we want the 
// menu to appear directly below the bottom left corner of the actuator
//==================================================================================================
var ms = new TransMenuSet(TransMenu.direction.down, 1, 0, TransMenu.reference.bottomLeft);

//==================================================================================================
// create a dropdown menu
//==================================================================================================
// the first parameter should be the HTML element which will act actuator for the menu


//==================================================================================================
// classifieds
var menu_shop = ms.addMenu(document.getElementById("navshop"));
menu_shop.addItem("All Items","/index.cfm?fuseaction=shop.main");
menu_shop.addItem("View Cart","/index.cfm?fuseaction=shop.cart"); 
menu_shop.addItem("Check Out","/index.cfm?fuseaction=shop.cart"); 





//==================================================================================================
// classifieds
var menu_classifieds = ms.addMenu(document.getElementById("classifieds"));
menu_classifieds.addItem("All Ads","/index.cfm?fuseaction=classifieds.main");
menu_classifieds.addItem("&nbsp;&nbsp;&nbsp;&nbsp;&middot;&nbsp;Boards","/index.cfm?fuseaction=classifieds.main&fcatid=1");
menu_classifieds.addItem("&nbsp;&nbsp;&nbsp;&nbsp;&middot;&nbsp;Sails","/index.cfm?fuseaction=classifieds.main&fcatid=2"); 
menu_classifieds.addItem("&nbsp;&nbsp;&nbsp;&nbsp;&middot;&nbsp;Mast/Booms","/index.cfm?fuseaction=classifieds.main&fcatid=3"); 
menu_classifieds.addItem("&nbsp;&nbsp;&nbsp;&nbsp;&middot;&nbsp;Misc. Gear","/index.cfm?fuseaction=classifieds.main&fcatid=4"); 
menu_classifieds.addItem("&nbsp;&nbsp;&nbsp;&nbsp;&middot;&nbsp;Unrelated Gear","/index.cfm?fuseaction=classifieds.main&fcatid=5"); 
menu_classifieds.addItem("&nbsp;&nbsp;&nbsp;&nbsp;&middot;&nbsp;Complete Packages","/index.cfm?fuseaction=classifieds.main&fcatid=6"); 
menu_classifieds.addItem("&nbsp;&nbsp;&nbsp;&nbsp;&middot;&nbsp;Kiteboard Gear","/index.cfm?fuseaction=classifieds.main&fcatid=7"); 
menu_classifieds.addItem("&nbsp;&nbsp;&nbsp;&nbsp;&middot;&nbsp;Wanted","/index.cfm?fuseaction=classifieds.main&fcatid=99"); 
menu_classifieds.addItem("+ Manage Your Ads","/index.cfm?fuseaction=classifieds.manage"); 
menu_classifieds.addItem("+ Create New Ad","/index.cfm?fuseaction=classifieds.form"); 






//==================================================================================================
// events
//var menu_events = ms.addMenu(document.getElementById("events"));
//menu_events.addItem("Canada","/index.cfm?fuseaction=events.main&country=canada");
//menu_events.addItem("USA","/index.cfm?fuseaction=events.main&country=usa");
//menu_events.addItem("International","/index.cfm?fuseaction=events.main&country=international");

//var submenu_events_canada = menu_events.addMenu(menu_events.items[0]);
//submenu_events_canada.addItem("Alberta","/index.cfm?fuseaction=events.main&prov=AB");
//submenu_events_canada.addItem("British Columbia", "/index.cfm?fuseaction=events.main&prov=BC");   
//submenu_events_canada.addItem("Manitoba", "/index.cfm?fuseaction=events.main&prov=MB"); 
//submenu_events_canada.addItem("New Brunswick", "/index.cfm?fuseaction=events.main&prov=NB"); 
//submenu_events_canada.addItem("Newfoundland", "/index.cfm?fuseaction=events.main&prov=NFLD");
//submenu_events_canada.addItem("North West Territories", "/index.cfm?fuseaction=events.main&prov=NWT");
//submenu_events_canada.addItem("Nova Scotia", "/index.cfm?fuseaction=events.main&prov=NS");
//submenu_events_canada.addItem("Nunavat", "/index.cfm?fuseaction=events.main&prov=NVT");			
//submenu_events_canada.addItem("Ontario", "/index.cfm?fuseaction=events.main&prov=ON");    
//submenu_events_canada.addItem("Prince Edward Island", "/index.cfm?fuseaction=events.main&prov=PEI"); 			
//submenu_events_canada.addItem("Quebec", "/index.cfm?fuseaction=events.main&prov=QC"); 
//submenu_events_canada.addItem("Saskatchewan", "/index.cfm?fuseaction=events.main&prov=SK"); 
//submenu_events_canada.addItem("Yukon", "/index.cfm?fuseaction=events.main&prov=YK"); 

//==================================================================================================
// journals
var menu_journals = ms.addMenu(document.getElementById("journals"));
menu_journals.addItem("View All Sailor Journals","/index.cfm?fuseaction=journals.main");
menu_journals.addItem("List My Journals","/index.cfm?fuseaction=journals.manage");
menu_journals.addItem("Season At a Glance","/index.cfm?fuseaction=journals.report");

var submenu_journals_mymenu = menu_journals.addMenu(menu_journals.items[1]);
submenu_journals_mymenu.addItem("List My Journal Entries","/index.cfm?fuseaction=journals.manage");
submenu_journals_mymenu.addItem("Add New Journal Entry", "/index.cfm?fuseaction=journals.form");    

//==================================================================================================
// launches
/* var menu_launches = ms.addMenu(document.getElementById("launches"));
menu_launches.addItem("Places to Sail","/index.cfm?fuseaction=launches.main"); 
menu_launches.addItem("Add New Launch Site","/index.cfm?fuseaction=launches.add");

var submenu_launches_canada = menu_launches.addMenu(menu_launches.items[0]);
submenu_launches_canada.addItem("Alberta","/index.cfm?fuseaction=launches.main&prov=AB");
submenu_launches_canada.addItem("British Columbia", "/index.cfm?fuseaction=launches.main&prov=BC");   
submenu_launches_canada.addItem("Manitoba", "/index.cfm?fuseaction=launches.main&prov=MB"); 
submenu_launches_canada.addItem("New Brunswick", "/index.cfm?fuseaction=launches.main&prov=NB"); 
submenu_launches_canada.addItem("Newfoundland", "/index.cfm?fuseaction=launches.main&prov=NFLD");
submenu_launches_canada.addItem("North West Territories", "/index.cfm?fuseaction=launches.main&prov=NWT");
submenu_launches_canada.addItem("Nova Scotia", "/index.cfm?fuseaction=launches.main&prov=NS");
submenu_launches_canada.addItem("Nunavat", "/index.cfm?fuseaction=launches.main&prov=NVT");			
submenu_launches_canada.addItem("Ontario", "/index.cfm?fuseaction=launches.main&prov=ON");    
submenu_launches_canada.addItem("Prince Edward Island", "/index.cfm?fuseaction=launches.main&prov=PEI"); 			
submenu_launches_canada.addItem("Quebec", "/index.cfm?fuseaction=launches.main&prov=QC"); 
submenu_launches_canada.addItem("Saskatchewan", "/index.cfm?fuseaction=launches.main&prov=SK"); 
submenu_launches_canada.addItem("Yukon", "/index.cfm?fuseaction=launches.main&prov=YK"); 
*/
//==================================================================================================
// photo gallery
var menu_gallery = ms.addMenu(document.getElementById("gallery"));
menu_gallery.addItem("2006 Photo Contest","/index.cfm?fuseaction=gallery.main&selected=1.571"); 
menu_gallery.addItem("Local Sailing Scene Images","/index.cfm?fuseaction=gallery.main&selected=1.2"); 
menu_gallery.addItem("Event Images","/index.cfm?fuseaction=gallery.main&selected=1.3");
menu_gallery.addItem("Forum Images","/index.cfm?fuseaction=gallery.main&selected=1.4");
menu_gallery.addItem("Wind & Winter Images","/index.cfm?fuseaction=gallery.main&selected=1.119");
menu_gallery.addItem("Journal Images","/index.cfm?fuseaction=gallery.main&selected=1.148");
menu_gallery.addItem("Launch Site Images","/index.cfm?fuseaction=gallery.main&selected=1.243");

var menu_gallery_2 = menu_gallery.addMenu(menu_gallery.items[2]);
menu_gallery_2.addItem("General", "/index.cfm?fuseaction=gallery.main&selected=1.4.6");
menu_gallery_2.addItem("Gear For Sale", "/index.cfm?fuseaction=gallery.main&selected=1.4.7");

var menu_gallery_1 = menu_gallery.addMenu(menu_gallery.items[1]);
menu_gallery_1.addItem("Rondeau Regatta 2005", "/index.cfm?fuseaction=gallery.main&selected=1.3.191");
//==================================================================================================



//==================================================================================================
// forum
var menu_forum = ms.addMenu(document.getElementById("forum"));
menu_forum.addItem("FAQ", "/phpbb3/faq.php");
menu_forum.addItem("Search", "/phpbb3/search.php");
menu_forum.addItem("Memberlist", "/phpbb3/memberlist.php");
menu_forum.addItem("Register", "/phpbb3/ucp.php?mode=register");
menu_forum.addItem("Profile", "/phpbb3/ucp.php");
menu_forum.addItem("Log in to check your private messages", "/phpbb3/ucp.php?mode=login");
menu_forum.addItem("Log in", "/phpbb3/ucp.php?mode=login");


//==================================================================================================
// wx
var menu_wx = ms.addMenu(document.getElementById("wx"));
menu_wx.addItem("View My Forecast","/index.cfm?fuseaction=wx.main");
menu_wx.addItem("Add New Forecast","/index.cfm?fuseaction=wx.citypick"); 




// write drop downs into page
//==================================================================================================
// this method writes all the HTML for the menus into the page with document.write(). It must be
// called within the body of the HTML page.
//==================================================================================================
TransMenu.renderAll();
}
