
// 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';

// Default 'length' of menu items - item height if menu is vertical, width if horizontal.
var defLength = 22;
var defLength2 = 35;
var topItemHeight = 30;

// 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, topItemHeight, '#669999', '#006666', '', '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.htm', '', 40, 10, 0);
menu[0][2] = new Item('A-Lex English Dictionary', '#', '', 100, 10, 2);
menu[0][3] = new Item('Yinghan English - Chinese Dictionary', '#', '', 160, 10, 3);
menu[0][4] = new Item('Purchase', '/purchase.htm', '', 55, 10, 0);
menu[0][5] = new Item('Contact', '/contact.htm', '', 40, 10, 0);

// File 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, topItemHeight, 80, defOver, defBack, 'itemBorder', 'itemText');
// -- menu[1][1] = new Item('Open', '#', '', defLength, 0, 0);
// -- menu[1][2] = new Item('Save', '#', '', defLength, 0, 0);
// Non-zero target means this will trigger a popout -- menu[4] which is the 'Reopen' menu.
// -- menu[1][3] = new Item('Reopen', '#', '', defLength, 0, 4);
/// -- menu[1][4] = new Item('Exit', '#', '', defLength, 0, 0);

// Edit menu.
menu[2] = new Array();
menu[2][0] = new Menu(true, '>>', 0, topItemHeight, 120, defOver, defBack, 'itemBorder', 'itemText');
menu[2][1] = new Item('Palm OS Version', '/alexpalm.htm', '', defLength, 0, 4);
menu[2][2] = new Item('Windows Mobile 5', '/ALex/yyppc.htm', '', defLength2, 0, 5);

// Help menu
menu[3] = new Array();
menu[3][0] = new Menu(true, '>>', 0, topItemHeight, 120, defOver, defBack, 'itemBorder', 'itemText');
menu[3][1] = new Item('Palm OS Version', '/yinghan.htm', '', defLength, 0, 6);
menu[3][2] = new Item('Windows Mobile 5', '/Yinghan/ppc/yhppc.htm', '', defLength2, 0, 7);

// A-Lex Palm
menu[4] = new Array();
menu[4][0] = new Menu(true, '>>', 120, 0, 110, '#333366', '#666699', 'crazyBorder', 'crazyText');
menu[4][1] = new Item('Download', '/alexpalm.htm#ALexDownload', '', defLength, 1, 0);
menu[4][2] = new Item('Instant Lookup - Desk Accesory', '/alexpalm.htm#ALexDA', '', defLength2, 1, 0);
menu[4][3] = new Item('Update History', '/yyupdate.htm', '', defLength, 1, 0);
menu[4][4] = new Item('Register', '/alexpalm.htm#Registration', '', defLength, 1, 0);

// A-Lex PPC
menu[5] = new Array();
menu[5][0] = new Menu(true, '', 120, 0, 80, '#333366', '#666699', 'crazyBorder', 'crazyText');
menu[5][1] = new Item('Download', '/ALex/yyppc.htm#download', '', defLength, 1, 0);
menu[5][2] = new Item('Register', '/ALex/ppc_reg.htm', '', defLength, 1, 0);

// YH Palm
menu[6] = new Array();
menu[6][0] = new Menu(true, '>>', 120, 0, 130, '#333366', '#666699', 'crazyBorder', 'crazyText');
menu[6][1] = new Item('Download', '/yinghan.htm#YinghanDownload', '', defLength, 1, 0);
menu[6][2] = new Item('Chinese OS', '/yinghan.htm#ChineseOS', '', defLength, 1, 0);
menu[6][3] = new Item('Simplified Chinese', '/yinghan.htm#YinghanGB', '', defLength, 1, 0);
menu[6][4] = new Item('Update History', '/yhupdate.htm', '', defLength, 1, 0);

// YH PPC
menu[7] = new Array();
// Leftwards popout with a negative x and y relative to its trigger.
menu[7][0] = new Menu(true, '', 120, 0, 80, '#333366', '#666699', 'crazyBorder', 'crazyText');
menu[7][1] = new Item('Download', '/Yinghan/ppc/yhppc.htm#download', '', defLength, 1, 0);
menu[7][2] = new Item('Install', '/Yinghan/ppc/yhppc.htm#install', '', defLength, 1, 0);
menu[7][3] = new Item('Register', '/Yinghan/ppc/yh_reg.htm', '', defLength, 1, 0);

