// KP - Key People Menu Bar
// 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).336699
var defOver = '#0000FF', defBack = '#000080';

// 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. #669999 
// *** MOVE ROOT MENU AROUND HERE ***  it's positioned at (5, 0) and is 17px high now.
menu[0][0] = new Menu(false, '', 5, 35, 17, '#0000FF', '#000080', '', '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.
// the 3rd parameter could contain _New if you want it to open a new window
menu[0][1] = new Item('  Home', 'http://www.RiverApes.com', '', 40, 10, 1);
menu[0][2] = new Item('  Latest', 'http://www.RiverApes.com/Latest/index.htm', '', 40, 10, 2);
menu[0][3] = new Item('  Orthodoxy', 'http://www.RiverApes.com/HEvol/index.htm', '', 58, 10, 9);
menu[0][4] = new Item('  AAH', 'http://www.RiverApes.com/AAH/index.htm', '', 35, 10, 3);
menu[0][5] = new Item('  AHAH', 'http://www.RiverApes.com/AHAH/index.htm', '', 40, 10, 7);
menu[0][6] = new Item('  River Apes Stories', '../Stories/index.htm', '', 110, 10, 8);
menu[0][7] = new Item('  About This Web Site', 'http://www.RiverApes.com/Me/index.htm', '', 118, 10, 11);

// Home.
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, 22, 80, defOver, defBack, 'itemBorder', 'itemText');
menu[1][1] = new Item('Search', 'http://www.RiverApes.com/search.htm', '', defLength , 0, 0);

// Latest menu.
menu[2] = new Array();
menu[2][0] = new Menu(true, '>', 0, 22, 150, defOver, defBack, 'itemBorder', 'itemText');
menu[2][1] = new Item('Paper against Wading Origins?', 'http://www.RiverApes.com/Latest/Maka.htm', '', defLength, 0, 0);
menu[2][2] = new Item('Elaine Morgan Page', 'http://www.RiverApes.com/AAH/Morgan/Morgan.htm', '', defLength, 0, 0);
menu[2][3] = new Item('Wallaby Hybrids', 'http://www.RiverApes.com/Latest/Wallabies.htm', '', defLength , 0, 0);
menu[2][4] = new Item('Sahelanthropus', 'http://www.RiverApes.com/Latest/Toumai.htm', '', defLength , 0, 0);
menu[2][5] = new Item('Niemitz Wading Paper', 'http://www.RiverApes.com/Latest/Niemitz.htm', '', defLength , 0, 0);
menu[2][6] = new Item('Adduction Animation', 'http://www.RiverApes.com/AHAH/ComparativeBiology/Bipedalism/Adducting.htm', '', defLength , 0, 0);
menu[2][7] = new Item('New Phylogeny Poster', 'http://www.riverapes.com/images/RiverApePoster.jpg', '', defLength , 0, 0);
menu[2][8] = new Item('AAH Questionaire', 'http://www.riverapes.com/vote.asp', '', defLength , 0, 0);
menu[2][9] = new Item('AHAH Timescale', 'http://www.RiverApes.com/AHAH/Timescale/index.htm', '', defLength , 0, 0);
menu[2][10] = new Item('More...', 'http://www.RiverApes.com/changes.htm', '', defLength , 0, 0);

// Orthodoxy menu
menu[9] = new Array();
menu[9][0] = new Menu(true, '<', 0, 22, 210, defOver, defBack, 'itemBorder', 'itemText');
menu[9][1] = new Item('Anthopology', 'http://www.RiverApes.com/HEvol/index.htm', '', defLength, 0, 0);
menu[9][2] = new Item('Darwinian Revolution', 'http://www.RiverApes.com/HEvol/index.htm', '', defLength, 0, 0);
menu[9][3] = new Item('Paleontology in 20th Century', 'http://www.RiverApes.com/HEvol/index.htm', '', defLength, 0, 0);
menu[9][4] = new Item('The Current Paradigm', 'http://www.RiverApes.com/HEvol/index.htm', '', defLength, 0, 0);
menu[9][5] = new Item('Current Theories on Bipedalism', 'http://www.RiverApes.com/AHAH/ComparativeBiology/Bipedalism/Bipedalism.htm', '', defLength, 0, 0);
menu[9][6] = new Item('Links', 'http://www.RiverApes.com/HEvol/links.htm', '', defLength, 0, 0);

// AAH menu
menu[3] = new Array();
menu[3][0] = new Menu(true, '>', 0, 22, 230, defOver, defBack, 'itemBorder', 'itemText');
menu[3][1] = new Item("What the AAH is and isn't", 'http://www.RiverApes.com/AAH/index.htm', '', defLength, 0, 0);
menu[3][2] = new Item('Key People', '#', '', defLength, 0, 4);
menu[3][3] = new Item('Evidence', '#', '', defLength, 0, 5);
menu[3][4] = new Item('Studies', '#', '', defLength, 0, 6);
menu[3][5] = new Item('Arguments and Controversies', 'http://www.RiverApes.com/AAH/arguments/index.htm', '', defLength, 0, 0);
menu[3][6] = new Item('A Wading Origin for Bipedalism?', '#', '', defLength, 0, 13);
menu[3][7] = new Item('Links to other AAH Sites', '#', '', defLength, 0, 10);

// AAH People sub menu
menu[4] = new Array();
// This is across but not down... a horizontal popout (with crazy stylesheets :)...
// was menu[4][0] = new Menu(true, '>', 85, 0, 120, '#800000', '#800000', 'crazyBorder', 'crazyText');
menu[4][0] = new Menu(true, '>', 200, 5, 150, defOver, defBack, 'itemBorder', 'itemText');
// These items are lengthier than normal, and have extra spacing due to the fancy borders.
menu[4][1] = new Item('Max Westernhoffer', 'http://www.RiverApes.com/sorry.htm', '', defLength, 0, 0);
menu[4][2] = new Item('Sir Alister Hardy', 'http://www.RiverApes.com/AAH/Hardy/Hardy.htm', '', defLength, 0, 0);
menu[4][3] = new Item('Elaine Morgan', 'http://www.RiverApes.com/AAH/Morgan/Morgan.htm', '', defLength, 0, 0);
menu[4][4] = new Item('Marc Verhaegen', 'http://www.RiverApes.com/AAH/MV/Verhaegen.htm', '', defLength, 0, 0);
menu[4][5] = new Item('Phillip Tobias', 'http://www.RiverApes.com/AAH/WaterAndHumanEvolution.htm', '', defLength, 0, 0);


// AAH Evidence sub menu
menu[5] = new Array();
// This is across but not down... a horizontal popout (with crazy stylesheets :)...
menu[5][0] = new Menu(true, '>', 200, 5, 220, defOver, defBack, 'itemBorder', 'itemText');
menu[5][1] = new Item('Comparisons with Chimps', 'http://www.RiverApes.com/AHAH/ComparativeBiology/ChimpsandHumans.htm', '', defLength, 0, 0);
menu[5][2] = new Item('Similarities with Aquatic Mammals', 'http://www.RiverApes.com/sorry.htm', '', defLength, 0, 0);
menu[5][3] = new Item('Dietary & Nutritional', 'http://www.RiverApes.com/AAH/EFA/EFA.htm', '', defLength, 0, 0);
menu[5][4] = new Item('Fossil Evidence', 'http://www.RiverApes.com/sorry.htm', '', defLength, 0, 0);
menu[5][5] = new Item('Baboon Marker', 'http://www.RiverApes.com/sorry.htm', '', defLength, 0, 0);


// AAH Studies sub menu
menu[6] = new Array();
// This is across but not down... a horizontal popout (with crazy stylesheets :)...
menu[6][0] = new Menu(true, '>', 200, 5, 200, defOver, defBack, 'itemBorder', 'itemText');
// These items are lengthier than normal, and have extra spacing due to the fancy borders.
menu[6][1] = new Item('Roede et al:Fact or Fiction', 'http://www.RiverApes.com/AAH/FoF/FactOrFiction.htm', '', defLength, 0, 0);
menu[6][2] = new Item('Water and Human Evolution Symposium', 'http://allserv.rug.ac.be/~mvaneech/Symposium.html', '', defLength, 0, 0);
menu[6][3] = new Item('Other Papers...', 'http://www.RiverApes.com/sorry.htm', '', defLength, 0, 0);


// AAH Wading sub menu
menu[13] = new Array();
// This is across but not down... a horizontal popout (with crazy stylesheets :)...
menu[13][0] = new Menu(true, '>', 200, 5, 240, defOver, defBack, 'itemBorder', 'itemText');
// These items are lengthier than normal, and have extra spacing due to the fancy borders.
menu[13][1] = new Item('Why did we start walking?', 'http://www.RiverApes.com/AAH/AATheories/Wading/why_did_we_start_walking.htm', '', defLength, 0, 0);
menu[13][2] = new Item('Bipedalism Theories', 'http://www.RiverApes.com/AHAH/ComparativeBiology/Bipedalism/Bipedalism.htm', '', defLength, 0, 0);
menu[13][3] = new Item("Aquarboreal Ancestors", 'http://www.RiverApes.com/AAH/AATheories/Aquarborealism/Aquarborealism.htm', '', defLength, 0, 0);
menu[13][4] = new Item('Thesis: Bipedal Wading in Hominoidae', 'http://www.RiverApes.com/Me/Work/BipedalismThesis.htm', '', defLength, 0, 0);


// AAH Links sub menu
menu[10] = new Array();
// This is across but not down... a horizontal popout (with crazy stylesheets :)...
menu[10][0] = new Menu(true, '>', 200, 5, 230, defOver, defBack, 'itemBorder', 'itemText');
// These items are lengthier than normal, and have extra spacing due to the fancy borders.
menu[10][1] = new Item("Marc Verhaegen's Papers", 'http://www.RiverApes.com/sorry.htm', '>', defLength, 0, 14);
menu[10][2] = new Item('Yahoo AAT Forum', 'http://groups.yahoo.com/group/AAT', '', defLength, 0, 0);
menu[10][3] = new Item("Dewi Morgan's AAH Site", 'http://www.geocities.com/Athens/5168/aat.html', '', defLength, 0, 0);
menu[10][4] = new Item("Marcel William's Afar Geology Site", 'http://www.newpapyrus.net/afargeology.html', '', defLength, 0, 0);
menu[10][5] = new Item("Craig Hagstrom's Passionate Ape", 'http://www.passionateape.com/index.htm', '', defLength, 0, 0);
menu[10][6] = new Item("The Interglacial Hypothesis", 'http://www.geocities.com/mrinterglacial/index.html', '', defLength, 0, 0);
menu[10][7] = new Item("More Links...", 'http://www.RiverApes.com/links.html', '', defLength, 0, 0);



// AAH MV's papers Links sub menu
menu[14] = new Array();
// This is across but not down... a horizontal popout (with crazy stylesheets :)...
menu[14][0] = new Menu(true, '>', 220, 5, 180, defOver, defBack, 'itemBorder', 'itemText');
// These items are lengthier than normal, and have extra spacing due to the fancy borders.
menu[14][1] = new Item("A'piths Wading, Homo diving?", 'http://allserv.rug.ac.be/~mvaneech/Verhaegen.html', '', defLength, 0, 0);
menu[14][2] = new Item('Speech Origins', 'http://www.infres.enst.fr/confs/evolang/actes/_actes74.html', '', defLength, 0, 0)


// AHAH menu
menu[7] = new Array();
menu[7][0] = new Menu(true, '<', 0, 22, 230, defOver, defBack, 'itemBorder', 'itemText');
menu[7][1] = new Item('What is the Aquatic Hybrid Ape Theory?', 'http://www.RiverApes.com/AHAH/index.htm', '', defLength, 0, 0);
menu[7][2] = new Item('Hybridisation Theory', 'http://www.RiverApes.com/AHAH/hybrids/hybrids.htm', '', defLength, 0, 0);
menu[7][3] = new Item('Apes 48 Humans 46', 'http://www.RiverApes.com/sorry.htm', '', defLength, 0, 0);
menu[7][4] = new Item('AHAH Model & Timescale', 'http://www.RiverApes.com/AHAH/Timescale/index.htm', '', defLength, 0, 0);
menu[7][5] = new Item("Kestutis' Sideways Wading Theory", 'http://www.RiverApes.com/sorry.htm', '', defLength, 0, 0);
menu[7][6] = new Item('Infant Head Floating Theory', 'http://www.RiverApes.com/AHAH/ComparativeBiology/HeadSize/FloatingHeadTheory.htm', '', defLength, 0, 0);


// Stories menu
menu[8] = new Array();
menu[8][0] = new Menu(true, '<', 0, 22, 250, defOver, defBack, 'itemBorder', 'itemText');
menu[8][1] = new Item('About the River Apes Stories', '../Stories/index.htm', '', defLength, 0, 0);
menu[8][2] = new Item('1.  They Came from the Swamps', '../Stories/Story01.html', '', defLength, 0, 0);
menu[8][3] = new Item('2.  Lucy wades through the lake', '../Stories/Story02.html', '', defLength, 0, 0);
menu[8][4] = new Item("3.  Swaima's Fat Branch", '../Stories/Story03.html', '', defLength, 0, 0);
menu[8][5] = new Item('4.  Naked Apes v Crocodiles', '../Stories/Story04.html', '', defLength, 0, 0);
menu[8][6] = new Item('5.  Seasiders, Riversiders and Firemakers', '../Stories/Story05.html', '', defLength, 0, 0);
menu[8][7] = new Item('6.  Rise and Fall of the Aquafarians', '../Stories/Story06.html', '', defLength, 0, 0);
menu[8][8] = new Item("7.  The End of Aquafaria", '../Stories/Story07.html', '', defLength, 0, 0);
menu[8][9] = new Item("8.  How We Conquered The World", '../Stories/Story08.html', '', defLength, 0, 0);
menu[8][10] = new Item("9.  Carriers of the Christian Meme", '../Stories/Story09.html', '', defLength, 0, 0);
menu[8][11] = new Item("10. 20th Century Families", '../Stories/Story10.html', '', defLength, 0, 0);

// About Me menu
menu[11] = new Array();
menu[11][0] = new Menu(true, '<', 0, 22, 210, defOver, defBack, 'itemBorder', 'itemText');
menu[11][1] = new Item('About the Author: Algis Kuliukas', 'http://www.RiverApes.com/Me/index.htm', '', defLength, 0, 0);
menu[11][2] = new Item('Contact List', 'http://www.RiverApes.com/sorry.htm', '', defLength, 0, 0);
menu[11][3] = new Item('Web-Site Change History', 'http://www.RiverApes.com/Changes.htm', '', defLength, 0, 0);
menu[11][4] = new Item('Sister Web-Sites', 'http://www.RiverApes.com/sorry.htm', '', defLength, 0, 12);
menu[11][5] = new Item('Feedback', 'http://www.RiverApes.com/sorry.htm', '', defLength, 0, 0);
menu[11][6] = new Item('Questionaires', 'http://www.riverapes.com/vote.asp', '', defLength, 0, 0);
menu[11][7] = new Item('Other Links', 'http://www.RiverApes.com/sorry.htm', '', defLength, 0, 0);

// About MeSister Web sites sub menu
menu[12] = new Array();
// This is across but not down... a horizontal popout (with crazy stylesheets :)...
menu[12][0] = new Menu(true, '>', 200, 5, 230, defOver, defBack, 'itemBorder', 'itemText');
menu[12][1] = new Item('Batten Disease Family Association', 'http://www.bdfauk.freeserve.co.uk/', '_New', defLength, 0, 0);
menu[12][2] = new Item('Customised Training Solutions', 'http://www.customised-training-solutions.co.uk', '_New', defLength, 0, 0);
menu[12][3] = new Item('Customised Stained Glass', 'http://www.customised-Stained-Glass.co.uk', '_New', 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);
}
//  End -->

