<!-- Begin
/* Syntaxes:
 *
 * menu[menuNumber][0] = new Menu('menu ID', left, top, width, 'mouseover colour',
 *'background colour', 'border colour');
 * Left and Top are measured on-the-fly relative to the top-left corner of its trigger.
 *
 * menu[menuNumber][itemNumber] = new Item('Text', 'URL', vertical spacing to next item, 
 *target menu number);
 * If no target menu (popout) is desired, set it to 0. All menus must trace back their
 * targets to the root menu! That is, every menu must be targeted by one item somewhere.
 * Even if you're not writing the root menu, you must still specify its settings here.
 */
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).
var defOver = '#ff8080', defBack = '#ff0000', defBorder = '#000000';
// Default height of menu items - the spacing to the next item, actually.
var defHeight = 22;
// Menu 0 is the special, 'root' menu from which everything else arises.
menu[0] = new Array();
// Pass a few different colours, as an example.
menu[0][0] = new Menu('rootMenu', 0, 0, 80, '#ff8080', '#ff0000', defBorder);
// Notice how the targets are all set to nonzero values...
menu[0][1] = new Item('Athletes', '#', defHeight, 1);
menu[0][2] = new Item('Games', '#', defHeight, 2);
menu[0][3] = new Item('About Us', '#', defHeight, 3);
menu[0][4] = new Item('Membership', '#', defHeight, 4);
menu[1] = new Array();
// The File menu is positioned 0px across and 22 down from its trigger, and is 80 wide.
menu[1][0] = new Menu('AthletesMenu', 0, 22, 70, defOver, defBack, defBorder);
menu[1][1] = new Item('Bios', 'bios.htm', defHeight, 0);
menu[1][2] = new Item('Pictures', 'pictures7.htm', defHeight, 0);
// Non-zero target means this will
menu[2] = new Array();
menu[2][0] = new Menu('gamesMenu', 0, 22, 80, defOver, defBack, defBorder);
menu[2][1] = new Item('Schedule', 'schedule.htm', defHeight, 0);
menu[2][2] = new Item('Results 2001', 'results01.htm', defHeight, 0);
menu[2][3] = new Item('Results 2002', 'results02.htm', defHeight, 0);
menu[2][4] = new Item('Results 2003', 'results03.htm', defHeight, 0);
menu[2][5] = new Item('Results 2004', 'results04.htm', defHeight, 0);
menu[2][6] = new Item('Results 2005', 'results05.htm', defHeight, 0);
menu[2][7] = new Item('Rules', 'rules.htm', defHeight, 0);
menu[2][8] = new Item('Sanctioning', 'sanctioning.htm', defHeight, 0);
menu[2][9] = new Item('Commissioners', 'commissioners.htm', defHeight, 0);
menu[3] = new Array();
menu[3][0] = new Menu('aboutMenu', 0, 22, 80, defOver, defBack, defBorder);
menu[3][1] = new Item('Background', 'aboutus.htm', defHeight, 0);
menu[3][2] = new Item('History', 'history.htm', defHeight, 0);
menu[3][3] = new Item('Links', 'links.htm', defHeight, 0);
menu[3][4] = new Item('Contacts', 'contacts.htm', defHeight, 0);
menu[3][5] = new Item('Special Events', 'special.htm', defHeight, 0);
menu[3][6] = new Item('Definitions', 'definitions.htm', defHeight, 0);
menu[4] = new Array();
menu[4][0] = new Menu('memberMenu', 0, 22, 80, defOver, defBack, defBorder);
menu[4][1] = new Item('How to join', 'joining.htm', defHeight, 0);
menu[4][2] = new Item('Benefits', 'benefits.htm', defHeight, 0);
// Now, this next bit of script will write our own custom root menu -- a horizontal
// one, as the defaults are all vertical with borders. Even if you are writing your
// own root menu, you must still specify the names, colours and targets above -- the
// positions are calculated on the fly and hence are ignored.
// Basically, you must duplicate the output of the writeMenus() function. Just work
// from this example.
// Syntax: startDL('id', x, y, width, height, 'visibility', '#background colour or null
//for transparent', '#border colour or null for no border', 'additional properties');
// It returns a string of HTML text comprising the opening tag of a div or layer.
// mouseProps(menu, item) returns the 'onMouseEvent' properties for a specific menu item,
// passed as 'additional properties' to startDL. Just cut and paste below, or allow the
// script to write its own root menu.
// endDL is a variable containing either '</div>' or '</layer>', so add it afterwards.
newRoot = startDL('rootMenu', 160, 110, '450', 19, 'hidden', '#ff0000', null, 100, '');
newRoot += startDL('rootMenu1', 20, 0, 70, 19, 'inherit', '#ff0000', null, 100, mouseProps(0, 1));
newRoot += '<span class="Item1">  Athletes</span>' + endDL;
newRoot += startDL('rootMenu2', 100, 0, 80, 19, 'inherit', '#ff0000', null, 100, mouseProps(0, 2));
newRoot += '<span class="Item1">  Our Games</span>' + endDL;
newRoot += startDL('rootMenu3', 205, 0, 80, 19, 'inherit', '#ff0000', null, 100, mouseProps(0, 3));
newRoot += '<span class="Item1">  About Us</span>' + endDL;
newRoot += startDL('rootMenu4', 300, 0, 80, 19, 'inherit', '#ff0000', null, 100, mouseProps(0, 4));
newRoot += '<span class="Item1">  Membership</span>' + endDL;
newRoot += endDL;
// Pass this two strings - the first is HTML to write a custom root menu, or null to
// generate one normally. The second is the popout indicator HTML - try an image...?
// Try writeMenus(null, '<img src="...">'); in your own script.
writeMenus(newRoot, 'null');
// 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);
}
// Show root menu command - place in an onLoad="..." type function if you want.
eval(docObj + menu[0][0].id + styObj + '.visibility = "visible"');
// This is just the moving command for the example.
function moveRoot() {
rM = eval(docObj + menu[0][0].id + styObj);
if (parseInt(rM.top) < 40) rM.top = 40;
else rM.top = 0;
}
//  End -->
