// JavaScript Document
// Syntaxes: 
//
// menu[menuNumber][0] = new Menu(Vertical menu? (true/false), 'popout indicator', left, top,
// width, 'mouseover colour', 'background colour', 'border stylesheet', 'text stylesheet');
//
// Left and Top are measured on-the-fly relative to the top-left corner of its trigger, or
// for the root menu, the top-left corner of the page.
//
// menu[menuNumber][itemNumber] = new Item('Text', 'URL', 'target frame', length of menu item,
//  additional spacing to next menu item, number of target menu to popout);
//
// If no target menu (popout) is desired, set it to 0. Likewise, if your site does not use
// frames, pass an empty string as a frame target.

var menu = new Array();

// Default colours passed to most menu constructors (just passed to functions, not
// a global variable - makes things easier to change later in bulk).

var defOver = '#DFE4EB', defBack = '#ffffff';

// Default 'length' of menu items - item height if menu is vertical, width if horizontal.
var defLength = 30;
var defLengthTwo = 47;

// Menu 0 is the special, 'root' menu from which everything else arises.
menu[0] = new Array();
// A non-vertical menu with a few different colours and no popout indicator, as an example.
// *** MOVE ROOT MENU AROUND HERE ***  it's positioned at (5, 0) and is 17px high now.
menu[0][0] = new Menu(true, '', 15, 185, 135, '#D1D3D4', '#404041', 'mainBox', 'mainNav');
menu[0][1] = new Item('Home', 'index.htm', '', 27, 10, 1);
menu[0][2] = new Item('Meeting Agenda', 'meeting.html', '', 27, 10, 2);
menu[0][3] = new Item('General Information', 'information.html', '', 27, 10, 2);
menu[0][4] = new Item('Guest Speakers', 'speakers.html', '', 27, 10, 2);
menu[0][5] = new Item('USOS Executive Council', 'council.html', '', 40, 10, 3);
//menu[0][6] = new Item('USOS Newsletter', 'newsletter.html', '', 27, 10, 3);
menu[0][6] = new Item('2010 Technical Exhibit', 'exhibit.html', '', 40, 10, 3);
menu[0][7] = new Item('Letter From the President', 'letter.html', '', 40, 10, 3);
menu[0][8] = new Item('2009 Slide Show', '2009Slides.html', '', 27, 10, 3);
menu[0][9] = new Item('Sherman S. Coleman, M.D. Humanitarian Award', 'award.html', '', 55, 10, 3);
menu[0][10] = new Item('CME Information', 'cmeinfo.html', '', 27, 10, 2);

// About Us menu.
menu[1] = new Array();
menu[1][0] = new Menu(true, '>', 0, 40, 300, defOver, defBack, 'itemBorder', 'itemText');

// Adult menu.
menu[2] = new Array();
menu[2][0] = new Menu(true, '>', 0, 40, 300, defOver, defBack, 'itemBorder', 'itemText');

// Pediatric menu.
menu[3] = new Array();
menu[3][0] = new Menu(true, '>', -185, 40, 300, defOver, defBack, 'itemBorder', 'itemText');


				var popOldWidth = window.innerWidth;
				nsResizeHandler = new Function('if (popOldWidth != window.innerWidth) location.reload()');


				// This is a quick snippet that captures all clicks on the document and hides the menus
				// every time you click. Use if you want.
				
				if (isNS4) document.captureEvents(Event.CLICK);
				document.onclick = clickHandle;

				function clickHandle(evt)
					{
						if (isNS4) document.routeEvent(evt);
						hideAllBut(0);
					}


				// This is just the moving command for the example.
				function moveRoot()
					{
						with(menu[0][0].ref) left = ((parseInt(left) < 100) ? 100 : 5);
					}