///////////////////////////////////////////////////////////////////////////////////////////// MenuSets v1.0 Copyright (c) 1999,2000,2001 Matthew Gardner, logic@newmethods.com// Tested on all Win/Mac IE/NN 3.0 and up (though NS6 is buggy with js rollovers)//// STEP #1: Fill the following two variables:///////////////////////////////////// var Menus_On_Website = 4;          // <-- How many separate MenuSets will be used on your website?var Image_Location = "../images/"; // <-- Where will you be keeping your image files?/////////////////////////////////////MenuInfo = new Array ( Menus_On_Website );///////////////////////////////////////////////////////////////////////////////////////////// STEP #2: On scrap paper, write down://// 1. Short titles for each of your MenuSets (cannot contain spaces or special characters)// 2. The number of buttons in each menu// 3. The image format for each menu (gif, jpg, or png)//// STEP #3: List all your menus for the MenuInfo Array below, using this format:// MenuInfo["Menu_Title"] = new Array(Buttons_In_Menu,'Image_Format');///////////////////////////////////////////////////////////////////////////////////////////MenuInfo["linear"] = new Array(2,'gif');MenuInfo["meetmx"] = new Array(3,'gif');MenuInfo["website"] = new Array(1,'gif');MenuInfo["articles"] = new Array(2,'gif');///////////////////////////////////////////////////////////////////////////////////////////// STEP #4 Name all your physical image files using this format:// Menu_Title + Button_Number + Button_State + Image_Format (ie 'mainmenu11.gif', 'sidemenu52.jpg')//              ^ 1 to 99       ^ 1=off 2=on   ^ gif,jpg,png//// STEP #5: Include a reference to this JS file in each HTML document like so:// <script language="JavaScript" src="../menuset.js" type="text/javascript"></script>//// STEP #6: In the <BODY> tag call the menus you need for that particular page, ie:// <BODY onLoad="useMenu('Menu_Title'); useMenu('Menu_Title')"...//// STEP #7: Name all the <IMG> menu instances using this format:// Menu_Title + Button_Number (ie <IMG NAME="mainmenu1"...  , <IMG NAME="sidemenu5"... )//// STEP #8: In the <A HREF> tag of each menu item add references to the rollover functions:// onMouseOver="overItem('Menu_Title',Button_Number)" onMouseOver="offItem('Menu_Title',Button_Number)"//// YOU'RE DONE, NO ADJUSTMENTS NEEDED BELOW THIS LINE! ;)///////////////////////////////////////////////////////////////////////////////////////////MenuSet = new Array( Menus_On_Website );var NS6 = (document.getElementById && !document.all);function overItem(Menu_Title,button) { if (document.images && !NS6) {  document.images[Menu_Title+button].src = MenuSet[Menu_Title][button][1].src; }}function offItem(Menu_Title,button) { if (document.images && !NS6) {  document.images[Menu_Title+button].src = MenuSet[Menu_Title][button][0].src; }}function useMenu(Menu_Title) { if (document.images && !NS6) {    var Buttons_In_Menu = MenuInfo[Menu_Title][0];    var Image_Format = MenuInfo[Menu_Title][1];    MenuSet[Menu_Title] = new Array( Buttons_In_Menu );    Buttons_In_Menu++;    for ( button = 0; button < Buttons_In_Menu; button++ )    {        MenuSet[Menu_Title][button] = new Array(2);        for ( state = 0; state < 2; state++ )        {             MenuSet[Menu_Title][button][state] = new Image();	        MenuSet[Menu_Title][button][state].src = Image_Location + Menu_Title + button + (state+1) + "." + Image_Format;        }    }}}
