/* 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 = '#8552AD', defBack = '#087B7B', 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, defOver, '#8C007B', defBorder); // Notice how the targets are all set to nonzero values... menu[0][1] = new Item('File', '#', defHeight, 1); menu[0][2] = new Item('Edit', '#', defHeight, 2); menu[0][3] = new Item('Me', '#', defHeight, 3); menu[0][4] = new Item('Home', '#', defHeight, 4); menu[0][5] = new Item('Reading', '#', defHeight, 5); 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('Journey', 0, 22, 130, defOver , defBack , defBorder); menu[1][1] = new Item('   Introduction ', 'Introduction.html', defHeight, 0); menu[1][2] = new Item('   The Cycle of Life ', 'Circle_of_life.html', defHeight, 0); // Non-zero target means this will trigger a popup. menu[1][3] = new Item('   Time, Space,… ', 'Present_moment.html', defHeight, 0); menu[1][4] = new Item('   Walking … ', 'Walking.html', defHeight, 0); menu[1][5] = new Item('   Sleeping … ', 'Sleeping.html', defHeight, 0); menu[1][6] = new Item('   24 Hours a day …...','24hour.html', defHeight, 0); menu[1][7] = new Item('   You are Jobless...', 'You_are_Jobless.htm', defHeight, 0); // Non-zero target means this will trigger a popup. menu[2] = new Array(); menu[2][0] = new Menu('Garden', 0, 22, 150, defOver , defBack , defBorder); menu[2][1] = new Item('   The beginning to
   the True Liberation ... ', 'The_beginning.html', 38, 0); menu[2][2] = new Item('   Spices', 'MyGarden.htm' , defHeight, 0); menu[2][3] = new Item('   The morning breeze','breeze.htm' , defHeight, 0); menu[2][4] = new Item('   I am ... That ','Me.htm' , defHeight, 0); menu[2][5] = new Item('   Burrying the Self ','TheSelf.htm', defHeight, 0); menu[2][6] = new Item('   Addictions ', 'Addiction.htm', defHeight, 0); menu[2][7] = new Item('   The Empty Space ','empty_space.htm', defHeight, 0); menu[2][8] = new Item('   Realisations ','Realisations.htm', defHeight, 0); menu[2][9] = new Item('   Peace ', 'peace.html', 25, 0); menu[2][10] = new Item('   ……..More .....… ', '#', defHeight, 6); menu[3] = new Array(); menu[3][0] = new Menu('AboutMenu', 0,0, 90, '#087B7B', defBack, '#FF0000'); menu[3][1] = new Item('   About..Me!', 'About_me.html', defHeight, 0); menu[4] = new Array(); // This is across but not down... a horizontal popout (with crazy colours :)... menu[4][0] = new Menu('HomeMenu', 0, 0, 65, '#087B7B', defBack, '#FF0000'); menu[4][1] = new Item('   Home', '../home.html', defHeight, 0); menu[5] = new Array(); // This is across but not down... a horizontal popout (with crazy colours :)... menu[5][0] = new Menu('ReadingMenu', 0,22, 140, defOver, defBack, defBorder); menu[5][1] = new Item('   Discussion Board', 'http://pub3.bravenet.com/forum/show.php?usernum=232661377&cpv=1', defHeight, 0); menu[5][2] = new Item('   Mail Me', 'mailto:midway_n@wxs.nl', defHeight, 0); menu[5][3] = new Item('   Websites…...', 'websites.html', defHeight, 0); menu[5][4] = new Item('   The Reading Corner', 'reading_corner.htm', defHeight, 0); menu[5][5] = new Item('   …...Guest Book…...', 'http://www.TheGuestBook.com/vgbook/114814.gbook', defHeight, 0); menu[6] = new Array(); // Leftwards popout with a negative x relative to its trigger. menu[6][0] = new Menu('MoreMenu', 85, -117, 140, defOver, '#8C007B', '#663399'); menu[6][1] = new Item('   Time', 'time.html', 22, 0); menu[6][2] = new Item('   Silence', 'silence.html', 22, 0); menu[6][3] = new Item('   Tears … ', 'tears.html', 22, 0); menu[6][4] = new Item('   Multilayer
   Processing Beeing', 'processing.html', 42, 0); menu[6][5] = new Item('   Awareness:
      Inter-Processing...', 'interprocess.html ', 42, 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 '' or '', so add it afterwards. // Old Background MEnu is #006666 ... newRoot = startDL('rootMenu', 0, 10, '103%', 19, 'hidden', '#8C007B', null, 100, ''); newRoot += startDL('rootMenu1', 5, 0, 100, 19, 'inherit', '#8C007B', null, 100, mouseProps(0, 1)); newRoot += '    The Journey' + endDL; newRoot += startDL('rootMenu2', 105, 0, 150, 19, 'inherit', '#8C007B', null, 100, mouseProps(0, 2)); newRoot += '   The Flower Garden' + endDL; newRoot += startDL('rootMenu3', 255, 0, 90, 19, 'inherit', '#8C007B', null, 100, mouseProps(0, 3)); newRoot += '   About..Me' + endDL; newRoot += startDL('rootMenu4', 345, 0, 65, 19, 'inherit', '#8C007B', null, 100, mouseProps(0, 4)); newRoot += '   Home' + endDL; newRoot += startDL('rootMenu5', 410, 0,140, 19, 'inherit', '#8C007B', null, 100, mouseProps(0, 5)); newRoot += '   The Reading Corner' + 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, ''); in your own script. writeMenus(newRoot, '>'); // 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; }