/*
Top Navigational Bar II (By Mike Hall @ Brainjar.com)
Last updated: 00/05/08
Permission granted and modified by Dynamicdrive.com to include script in archive
For this and 100's more DHTML scripts, visit http://dynamicdrive.com
*/

var myNavBar1 = new NavBar(0);
var dhtmlMenu;

//define menu items (first parameter of NavBarMenu specifies main category width, second specifies sub category width in pixels)
//add more menus simply by adding more "blocks" of same code below

dhtmlMenu = new NavBarMenu(100, 0);
dhtmlMenu.addItem(new NavBarMenuItem("home", "index.htm"));
myNavBar1.addMenu(dhtmlMenu);

dhtmlMenu = new NavBarMenu(100, 120);
dhtmlMenu.addItem(new NavBarMenuItem("about us", ""));
dhtmlMenu.addItem(new NavBarMenuItem("Brian Mason", "brianmason.htm"));
dhtmlMenu.addItem(new NavBarMenuItem("The Trustees", "trustees.htm"));
myNavBar1.addMenu(dhtmlMenu);

dhtmlMenu = new NavBarMenu(110, 120);
dhtmlMenu.addItem(new NavBarMenuItem("objectives", ""));
dhtmlMenu.addItem(new NavBarMenuItem("Objectives", "objectives.htm"));
dhtmlMenu.addItem(new NavBarMenuItem("Guidelines", "guidelines.htm"));
dhtmlMenu.addItem(new NavBarMenuItem("Conditions", "conditions.htm"));
dhtmlMenu.addItem(new NavBarMenuItem("Map", "map.htm"));
myNavBar1.addMenu(dhtmlMenu);

dhtmlMenu = new NavBarMenu(100, 150);
dhtmlMenu.addItem(new NavBarMenuItem("projects", ""));
dhtmlMenu.addItem(new NavBarMenuItem("Science Alive!", "scialive.htm"));
dhtmlMenu.addItem(new NavBarMenuItem("Tourism & Seals", "seals.htm"));
dhtmlMenu.addItem(new NavBarMenuItem("Waterwatch", "waterwatch.htm"));
dhtmlMenu.addItem(new NavBarMenuItem("Camellia Blight", "camellia.htm"));
dhtmlMenu.addItem(new NavBarMenuItem("Walnut Farms", "walnut.htm"));
dhtmlMenu.addItem(new NavBarMenuItem("NZ Mistletoe", "mistletoe.htm"));
myNavBar1.addMenu(dhtmlMenu);

dhtmlMenu = new NavBarMenu(100, 150);
dhtmlMenu.addItem(new NavBarMenuItem("contact us", ""));
dhtmlMenu.addItem(new NavBarMenuItem("E-mail us", "mailto:enqiries@scitech-trust.org.nz"));
dhtmlMenu.addItem(new NavBarMenuItem("Application Form", "apply.htm"));
dhtmlMenu.addItem(new NavBarMenuItem("Reports to the Trust", "reports.htm"));
myNavBar1.addMenu(dhtmlMenu);

//set menu colors
myNavBar1.setColors("#999966", "#999966", "#d0d8c0", "#003300", "#9faf80", "#003300", "#d0d8c0", "#d0d8c0", "#999933")

//uncomment below line to center the menu (valid values are "left", "center", and "right"
//myNavBar1.setAlign("center")

var fullWidth;

function init() {

  // Get width of window, need to account for scrollbar width in Netscape.

  fullWidth = getWindowWidth() 
    - (isMinNS4 && getWindowHeight() < getPageHeight() ? 16 : 0);

  myNavBar1.resize(fullWidth);
  myNavBar1.create();
  myNavBar1.setzIndex(2);
}