
// 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 :).

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 = '#336699', defBack = '#003366';
var defOver = '#0000FF', defBack = '#004B00';

// Default 'length' of menu items - item height if menu is vertical, width if horizontal.
var defLength = 22;

// 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, '', 5, 0, 17, '#669999', '#006666', '', 'itemText');
menu[0][0] = new Menu(false, '', 185, 135, 17, '#004B00', '#004B00', '', '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('  What Is New', '#', '', 100, 10, 1);
menu[0][2] = new Item('  What We Do', '#', '', 100, 10, 2);
menu[0][3] = new Item('  Support CB', '#', '', 100, 10, 3);
menu[0][4] = new Item('  Why Computer Banc?', '#', '', 175, 10, 4);
menu[0][5] = new Item('  About Us', '#', '', 80, 10, 5);

// What Is New menu.
menu[1] = new Array();
// The File menu is positioned 0px across and 22 down from its trigger, and is 80 wide.
// All text in this menu has the stylesheet class 'item' -- see the <style> section above.
// We've passed a 'greater-than' sign '>' as a popout indicator. Try an image...?
menu[1][0] = new Menu(true, '>', 0, 17, 100, defOver, defBack, 'itemBorder', 'crazyText');
menu[1][1] = new Item('Schedule', 'Schedule.htm', '', defLength, 0, 0);
menu[1][2] = new Item('Newsletter', 'CBNewsletter_12-05.pdf', '', defLength, 0, 0);
menu[1][3] = new Item('Events', 'events.htm', '', defLength, 0, 0);

// What We Do menu.
menu[2] = new Array();
menu[2][0] = new Menu(true, '>', 0, 17, 170, defOver, defBack, 'itemBorder', 'crazyText');
menu[2][1] = new Item('Refurbishing', 'refurbishing.htm', '', defLength, 0, 0);
menu[2][2] = new Item('Qualifying', 'Qualifying.htm', '', defLength, 0, 0);
menu[2][3] = new Item('Family Orientation', 'orientation.htm', '', defLength, 0, 0);
menu[2][4] = new Item('Volunteering', 'volunteering.htm', '', defLength, 0, 0);
menu[2][5] = new Item('Educational Software', 'downloads.htm', '', defLength, 0, 0);

// Support CB menu
menu[3] = new Array();
menu[3][0] = new Menu(true, '>', 0, 17, 100, defOver, defBack, 'itemBorder', 'crazyText');
menu[3][1] = new Item('Sponsor', 'sponsorship.htm', '', defLength, 0, 0);
menu[3][2] = new Item('Benefactors', 'Benefactors.htm', '', defLength, 0, 0);
menu[3][3] = new Item('Donation', 'makedonation.htm', '', defLength, 0, 0);

// Why Computer Banc? menu
menu[4] = new Array();
menu[4][0] = new Menu(true, '<', 0, 17, 230, defOver, defBack, 'itemBorder', 'crazyText');
menu[4][1] = new Item('Helping the Environment', 'environment.htm', '', defLength, 0, 0);
//menu[4][2] = new Item('Research Results', '', '', defLength, 0, 0);
//menu[4][3] = new Item('Illinois Educational Standards', '', '', defLength, 0, 0);
menu[4][2] = new Item('Educational Links', 'edulinks.htm', '', defLength, 0, 0);

// About Us menu
menu[5] = new Array();
menu[5][0] = new Menu(true, '<', 0, 17, 150, defOver, defBack, 'itemBorder', 'crazyText');
menu[5][1] = new Item('Mission', 'ourmission.htm', '', defLength, 0, 0);
menu[5][2] = new Item('History', 'history.htm', '', defLength, 0, 0);
menu[5][3] = new Item('Board of Directors', 'board.htm', '', defLength, 0, 0);
menu[5][4] = new Item('Goals', 'goals.htm', '', defLength, 0, 0);
menu[5][5] = new Item('Contact Us', 'contactus.htm', '', 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;

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);
}

function blockError(){return true;}
window.onerror = blockError;
//  End -->