// Declare and instantiate the images for each of the navigation items (Both on and off states)
var nav_abouton = new Image(); nav_abouton.src = navColourOn;
var nav_aboutoff = new Image(); nav_aboutoff.src = navColourOff;

var nav_attractionson = new Image(); nav_attractionson.src = navColourOn;
var nav_attractionsoff = new Image(); nav_attractionsoff.src = navColourOff

var nav_photographicon = new Image(); nav_photographicon.src = navColourOn;
var nav_photographicoff = new Image(); nav_photographicoff.src = navColourOff

var nav_communityon = new Image(); nav_communityon.src = navColourOn;
var nav_communityoff = new Image(); nav_communityoff.src = navColourOff

var nav_businesson = new Image(); nav_businesson.src = navColourOn;
var nav_businessoff = new Image(); nav_businessoff.src = navColourOff

var nav_eventson = new Image(); nav_eventson.src = navColourOn;
var nav_eventsoff = new Image(); nav_eventsoff.src = navColourOff

// Change the image when the mouse is on the navigation item
function turnOn(imageName,layerName) {
	if (document.layers && layerName != "") {
  		eval('document.' + layerName + '.document.' + imageName + '.src = ' + imageName + 'on.src')
	}
	else {
  		eval('document.' + imageName + '.src = ' + imageName + 'on.src')
    }
}



// Change the image when the mouse is off the navigation item
function turnOff(imageName,layerName) {
	if (document.layers && layerName != "") {
	// declare layer for netscape.	
  		eval('document.' + layerName + '.document.' + imageName + '.src = ' + imageName + 'off.src')
	}
 	else {
		eval('document.' + imageName + '.src = ' + imageName + 'off.src')
    }
}

// this script handles the Netscape 4 bug on CSS layers.
if(document.layers){origWidth=innerWidth;origHeight=innerHeight;onresize=function(){ 
if(innerWidth!=origWidth||innerHeight!=origHeight)location.reload()}} 

// Highlight the relevant navigation item when the user visits a section of the site. This will indicate to
// the user which area of the site they are currently in.
function menuHighlight(theItem, theDiv)
{
	if(document.getElementById != null)
	{
		turnOn(theItem,'');
		theMenu = document.getElementById(theDiv);
		newHTML = theMenu.innerHTML;
		newHTML = newHTML.replace("turnOff('" + theItem + "','')", "");
		theMenu.innerHTML = newHTML;
	}
}

// end hiding javascript -->

// JS for LHS include
	function MenuHeader(menuHeaderName, menuItems)
	{
		this.menuHeaderName = menuHeaderName;
		this.menuItems = menuItems;
	}

	function MenuItem(menuItemName, menuLink)
	{
		this.menuItemName = menuItemName;
		this.menuLink = menuLink;
	}

	function Menu(menuTitle, menuHeaders)
	{
		this.menuTitle = menuTitle;
		this.menuHeaders = menuHeaders;
	}

