

/* Advanced Customizable Text Menu Script v1.0
   Copyright 2002 Jonathan Lipps, www.jonathanlipps.com
   Script is free for use with the stipulation that this
   comment is retained! */

/* What follows is a huge list of customizable variables
   You need to modify each one to create your menu
   I'll give explanations of what each variable does

   Important note on variable types:
   1. All Color variables are STRINGS, either hex values or color names
      Either way, they need quotes.
   2. All Font variables are STRINGS. This includes font names and font
      sizes. They need quotes.
   3. All style variables are STRINGS.
   4. Most other variables are INTEGERS, i.e., don't put quotes around them.
   5. Any exceptions will be noted at the variable. 

   Extranea:
   1. The script does a lot to weed out errors, but some can still creep in.
      For instance, in IE6win, a DIV height can't be decreased below the
      font height, whereas in other browsers it can. So always make sure your
      menus are tall enough for your fonts.
   2. Netscape does a bad job of rendering the menus with borders set to "none"
   3. In both browsers I noticed that dashed borders were sometimes rendered
      as solid if the length of the border was small.

   There are lots of cool things you can do with this script.
   The best way to learn what you can do is to play around with
   the variables and try out different combinations. */



var menubordercolor = "#333333"; // Color for the outside border of the main menuitems
var subbordercolor = "#333333";  // Border color the submenus

var menubgcolor = "#E8F7FC";     // Background color for the menu
var subbgcolor = "#CAD0A7";       // Background color for the submenus

var menuborderwidth = 1;         // Width of the border around the menu
var subborderwidth = 1;          // Width of the border around the submenu

var menuborderstyle = "solid";   // Style of the borders: can be none, solid,
var subborderstyle = "solid";    // dashed, double, groove, ridge, inset, or outset
                                 // Solid and Dashed work the best on most browsers
                                 // Note: if you set the style to 'none', be sure to
                                 // change the borderwidths to 0

var menutextcolor = "#333333";   // Color of the text in the main menu
var subtextcolor = "#333333";    // Color of the text in the submenus

var menutextfont = "verdana,arial,helvetica"; // Font-family style for the main menu text
var subtextfont = "verdana,arial,helvetica";  // Font-family style for the submenu text

var menutextsize = "7pt";        // Font size for main menu. Best to use pt
var subtextsize = "7pt";         // Font size for submenus

var menufontstyle = "font-weight:bold";       // Put any extra CSS here
var subfontstyle = "";                        // Same for submenus

var menuovercolor = "#e6e6e6";   // Color the menu background changes to on a mouseover
var subovercolor = "#e6e6e6";    // Color the submenu background changes on mouseover

var allmenuwidth = 643;          // Width, in pixels, of the entire main menu
var allxdisp = 241;               // Distance, in pixels, of the menu from the left edge
var allydisp = 166;               // Distance, in pixels, of the menu from the top edge

var menuheight = 16;             // Height, in pixels, of the main menu
var subheight = 14;              // Height, in pixels, of each submenu item

var menubetween = 0;             // Pixels between each main menu item (horizontal distance)
var subbetween = 2;              // Pixels between each submenu item (vertical distance)

var menuleftpad = 2;             // Number of spaces from the left border of the menu
var subleftpad = 1;              // until the text is written
                                 // Note: the leftpads are in SPACES (&nbsp;), NOT pixels,
                                 // so the actual pad distance depends on your font properties

var menutoppad = 0;              // Distance, in PIXELS this time, from the top of the
var subtoppad = 0;               // menu to the top of the text
                                 // Important Note: the toppads actually ADD to the height
                                 // of the menu. So if menuheight = 15, and menutoppad = 3,
                                 // the actual height of your menu will be 18px

var subleftindent = -5;           // Distance, in pixels, that the given edge of the submenu
var subrightindent = -5;          // is indented beneath the main menu item width
                                 // Try negative values for a cool effect

var menuover = 0;                // Either 0 or 1: 0 causes the border of one menu to overlap
                                 // the border of the adjacent menus, so that you don't get
                                 // a double-thick border between menuitems. 1 retains the
                                 // double border.
var subdrop = 1;                 // The same as menuover, but for submenus
                                 // Important Note: these values have no effect if menubetween
                                 // or subbetween are greater than 0

var suboffset = 0;               // X-offset, in pixels, for the entire submenu. Can be negative

/* Note on the next section of variables:
   The "hanger" consists of two vertical bars
   which are interposed between a main menu
   item and its submenu, giving the appearance
   that the submenu is being suspended by these
   bars. Experiment with it to see what I mean */
   
var hangerheight = 2;            // Height, in pixels, of the hanger
var hangerwidth = 50;            // Width of the hanger, in percent of submenu width

var hangerdrop = 1;              // Either 1 or 0: 1 causes the bottom border of the
                                 // main menu item to show. 0 pushes the hanger up a
                                 // pixel so that the hangerbgcolor and menubgcolor are
                                 // not divided by the border

var hangeroffset = 0;            // x-offset, in pixels, for the hanger

var hangerthickness = 1;         // Width, in pixels, of the hanger bars
var hangercolor = "#666666";     // Color of the hanger bars

var hangerbgcolor = "";       // Background color between the hanger bars. Set to "false",
                                 // without the quotes, for no background color

var hangerstyle = "none";       // Style for the hanger bars. Can be none, solid, dashed, etc...
                                 // Set to "none" if you want the hanger bars to be invisible

var midhanger = false;           // The "midhanger" is the same as the hanger, except between
                                 // submenuitems. Either "true" or "false" (without quotes)
                                 // True draws the hanger bars, false leaves them out.

var click = false;               // Either "true" or "false" (without quotes). If click = true,
                                 // menu action is driven by mouse clicks. If click = false,
                                 // menu action is driven by mouseovers.

/* In this section, you define the different elements of your menu.
   There are three functions: Init(), makeMain(), and makeSub(). Don't
   do anything with Init(). For makeMain() and makeSub() you will have
   to provide your menu information as arguments. Do this as follows:

 (1) makeMain()  
   makeMain() calls are of the form: makeMain(string text, string/bool link, bool sub, ...)
   So, if I wanted a menu with two items, both with submenus, and both linking
   somewhere, I would write the following:
     makeMain('menuname1','link.html', true, 'menuname2', 'link2.html', true);
   (a) The single quotes around strings are very important, don't forget them.
   (b) If you don't want your main menuitems to be links (a very bad idea, for example,
       if your menu is click-driven), type "false" (WITHOUT quotes) in the place of the link.
       i.e., makeMain('menuname1',false, true, 'menuname2', false, true);
   (c) If you don't want a menuitem to have a submenu, use "false" instead of "true" 
       i.e., makeMain('menuname1', 'link.html', false);
   (d) You can have menu items that are not links and don't have submenus, but that seems dumb
   (e) You call makeMain() only ONCE, since it contains all the information for your main menu

 (2) makeSub()
   makeSub() calls are of the form: makeSub(int subnum, string text, string link, ...)
   (a) Don't forget the first argument: an integer that is the number of the main menuitem that
       the submenu is underneath. i.e., 1 would be underneath the first main menu item, 2 the second,
       etc...
   (b) Unlike makeMain(), makeSub() requires links. If you don't want your submenu item to move you
       anywhere, use '#' or '' or 'javascript:return false;' or something.
   (c) You need to call makeSub() once for EACH submenu you have
   (d) Take care that you have a submenu for any main menu item with sub = true, and that you
       don't call makeSub() for any main menu item with sub = false. Either error will cause
       unpredictable problems.

 (3) If you can follow all these instructions, great job! Right now the function calls are filled with
     useless data--replace them with your own. */

Init();
makeMain('Home','index.html',true,'SCI3','#',true,'Instruments','instruments.html',false,'Gallery','gallery.html',true,'Scheduling','scheduling.html',false,'Links','#',true, 'Contact Us', 'contact.html', false);
makeSub(1, 'Overview', 'overview.html', 'Site Info', 'site.html');
makeSub(2, 'Directors', 'directors.html', 'Chris Contag', 'http://sci3.stanford.edu/lab/members_contag.html', 'Sam Gambhir', 'http://mips.stanford.edu/public/faculty-info.adp?personnel%5fid=101', 'Floor Plan', 'floorplan.html');
makeSub(4, 'Optical', 'gallery-optical.html', 'PET', 'gallery-pet.html', 'SPECT', 'gallery-spect.html', 'CT', 'gallery-ct.html', 'MRI', 'gallery-mri.html', '3D', 'gallery-3d.html', 'Movies', 'gallery-movies.html');
makeSub(6, 'Contag Lab', 'http://sci3.stanford.edu/lab/', 'MIPS', 'http://mips.stanford.edu');
