// Declare and instantiate the images for each of the navigation items (Both on and off states)
var nav_newson = new Image(); nav_newson.src = navColourOn;
var nav_newsoff = new Image(); nav_newsoff.src = navColourOff;

var nav_eventson = new Image(); nav_eventson.src = navColourOn;
var nav_eventsoff = new Image(); nav_eventsoff.src = navColourOff

var nav_councilon = new Image(); nav_councilon.src = navColourOn;
var nav_counciloff = new Image(); nav_counciloff.src = navColourOff

var nav_businesson = new Image(); nav_businesson.src = navColourOn;
var nav_businessoff = new Image(); nav_businessoff.src = navColourOff

var nav_visitorson = new Image(); nav_visitorson.src = navColourOn;
var nav_visitorsoff = new Image(); nav_visitorsoff.src = navColourOff

var nav_communityon = new Image(); nav_communityon.src = navColourOn;
var nav_communityoff = new Image(); nav_communityoff.src = navColourOff

var nav_contacton = new Image(); nav_contacton.src = navColourOn;
var nav_contactoff = new Image(); nav_contactoff.src = navColourOff

var nav_linkson = new Image(); nav_linkson.src = navColourOn;
var nav_linksoff = new Image(); nav_linksoff.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;
	}

