
// Syntaxes: *** START EDITING HERE, READ THIS SECTION CAREFULLY! ***
//
// 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.
//
// Something that needs explaining - the Vertical Menu setup. You can see most menus below
// are 'true', that is they are vertical, except for the first root menu. The 'length' and
// 'width' of an item depends on its orientation -- length is how long the item runs for in
// the direction of the menu, and width is the lateral dimension of the menu. Just look at
// the examples and tweak the numbers, they'll make sense eventually :).

// 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(false, '', 95, 154, 17, defOver, defBack, '', 'itemText');
// Notice how the targets are all set to nonzero values...
// The 'length' of each of these items is 40, and there is spacing of 10 to the next item.
// Most of the links are set to '#' hashes, make sure you change them to actual files.
menu[0][1] = new Item('Home', '/index.php', '', 55, 28, 0);
menu[0][2] = new Item('Magazine', '/magazine/index.html', '', 75, 28, 0);
menu[0][3] = new Item('About Us', '#', '', 80, 28, 1);
menu[0][4] = new Item('Meetings', '/news/conference.php', '', 75, 28, 0);
menu[0][5] = new Item('Members', '#', '', 75, 28, 2);
menu[0][6] = new Item('Centres', '/centres/applications.php', '', 60, 28, 0);
menu[0][7] = new Item('Scholarships', '/news/scholarships.php', '', 100, 28, 0);
menu[0][8] = new Item('Adverts', '/news/adverts.php', '', 65, 28, 0);
menu[0][9] = new Item('Contact', '/society/contact.php', '', 70, 5, 0);

// About Us menu
menu[1] = new Array();
menu[1][0] = new Menu(true, '>', 0, 22, 110, defOver, defBack, 'itemBorder', 'itemText');
menu[1][1] = new Item('History', '/society/history.php', '', defLength, 0, 0);
menu[1][2] = new Item('Officials', '/society/officials.php', '', defLength, 0, 0);
menu[1][3] = new Item('Who we are', '/society/policies.php', '', defLength, 0, 0);
menu[1][4] = new Item('Benefits', '/society/benefits.php', '', defLength, 0, 0);
menu[1][5] = new Item('Forms', '/society/forms.php', '', defLength, 0, 0);

// Members menu
menu[2] = new Array();
menu[2][0] = new Menu(true, '>', 0, 22, 155, defOver, defBack, 'itemBorder', 'itemText');
menu[2][1] = new Item('Applications', '/members/applications.php', '', defLength, 0, 0);
menu[2][2] = new Item('Find a teacher', '/members/filter1_eng.php', '', defLength, 0, 0);
menu[2][3] = new Item('Vind \'n onderwyser', '/members/filter1_afr.php', '', defLength, 0, 0);
menu[2][4] = new Item('Statistics', '/members/stat1_eng.php', '', defLength, 0, 0);
menu[2][5] = new Item('Statistiek', '/members/stat1_afr.php', '', defLength, 0, 0);


// *** OPTIONAL CODE FROM HERE DOWN ***

// These two lines handle the window resize bug in NS4. See <body onResize="...">.
// I recommend you leave this here as otherwise when you resize NS4's width menus are hidden.

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;


