<!--
/**********************************************************************
 * G'day Howard,
 *---------------------------------------------------------------------
 * Remember to back up before you f**k up.
 * and be very careful if you edit the following 3 lines.
 *********************************************************************/
var thisLoc = document.location.href.split('au/')[1];
var navItems = new Array();
var navStyle = new Array("navLeft","navLeftSecond","navLeftThird");

/**********************************************************************
 * The following arrays provide the display name, URL, and navigation level for every page.
 * The navigation builds in the same order that the items are listed in the arrays.
 *---------------------------------------------------------------------
 * To add a new page
 * 	Add an additional line within the appropriate top level group
 * 			Ensure each array entry ends with a comma EXCEPT THE LAST ONE!
 * 			Ensure the format remains true,
 * 																		"NAME||URL||LEVEL",
 * 			Where:
 * 			NAME can be any alphanumeric characters EXCEPT " | or ,
 * 				URL starts at the root, (don't include the leading slash '/' ) for internal links
 *                                                  or the protocol, (http://) for external links
 * 				LEVEL can be 0 or 1
 * 					To add a level:
 * 						create the additional style in /style/soundScience.css
 * 					add the style to the navStyle Array at line 10 of this file,
 * 							i.e. var navStyle = new Array("navLeft","navLeftSecond","navLeftThird");
 *---------------------------------------------------------------------
 * to add a new site section, simply add a new navItems array, 
 *   i.e. navItems[6] = new Array(
 * 			"New Page Name||NewPageURL||NewPageLevel",
 * 			"Other New Page||OtherPageURL||OtherPageLevel",
 * 			"Next New Page||NextPageURL||NextPageLevel"
 * 		)
 *********************************************************************/

navItems[0] = new Array(
	"Solutions Overview||solutions/index.htm||0",
	"Heavy Industry||solutions/heavyindustry.htm||1",
	"Consulting Firms||solutions/consultingfirms.htm||1",
	"Regulatory Authorities||solutions/regulatoryauthorities.htm||1"

)
navItems[1] = new Array(
	"BarnOwl<sup>®</sup> Overview||products/index.htm||0",
	"Why use BarnOwl<sup>®</sup>||products/whyusebarnowl.htm||1",
	"How can it help||products/howcanithelp.htm||1",
	"How does it work||products/howdoesitwork.htm||1",
	"System description||products/systemdescription.htm||1",
	"System pricing||products/systempricing.htm||1",
	"Brochures & Datasheets||products/brochuresdatasheets.htm||1",
	"SoundScape||products/soundscape.htm||0",
	"NoiseWorks||products/noiseworks.htm||0",
	"MADMax||products/madmax.htm||0"
)
navItems[2] = new Array(
	"Services||services/index.htm||0"
)
navItems[3] = new Array(
	"Customers||customers/index.htm||0"
)
navItems[4] = new Array(
	"About Us||aboutus/index.htm||0",
	"News||aboutus/news.htm||0",
	"Find a Reseller||aboutus/resellers.htm||0",
	"Partner programs||aboutus/partner.htm||0"
)
navItems[5] = new Array(
	"Contact us||contactus/index.htm||0"
)


// edit anything below here at your own risk!

function drawNav(group,item){
	var htmlStart = "<DIV id='navLeftDiv'><TABLE width='175' cellpadding='0' cellspacing='0' border='0'>";
	var htmlEnd = "</TABLE></DIV>";
	var htmlMiddle = "";
	var thisItem = new Array();
	for (var k=0;k<navItems[group].length;k++){
		thisItem = navItems[group][k].split('||');
		var regex = /,/;
		htmlMiddle += "<TR><TD nowrap>";
		if (regex.test(thisItem[1])){
			htmlMiddle += addItem(thisItem[0],thisItem[1].split(',')[0],thisItem[2],thisItem[3],k,item);
		} else {
			htmlMiddle += addItem(thisItem[0],thisItem[1],thisItem[2],thisItem[3],k,item);
		}
		htmlMiddle += "</TD></TR>";
	}
	document.write(htmlStart + htmlMiddle + htmlEnd);
}

// Add the html for a found link
function addItem(addName,addUrl,addLevel,addTarget,addId,thisPage){
	var htmlOut = "";
	if (addTarget){
		htmlOut += "<A href='" + addUrl + "' style='text-decoration:none;' target='" + addTarget + "'>";
	} else {
		htmlOut += "<A href='/" + addUrl + "' style='text-decoration:none;'>";
	}
	if (addId == thisPage){
		htmlOut += "<DIV class='" + navStyle[addLevel] + "Sel'>" + addName + "</DIV>";
	} else {
		htmlOut += "<DIV class='" + navStyle[addLevel] + "' onmouseover=\"this.className='" + navStyle[addLevel] + "High';\" onmouseout=\"this.className='" + navStyle[addLevel] + "';\">" + addName + "</DIV>";
	}
	htmlOut += "</A>";
	return htmlOut;
}

for (var i=0;i<navItems.length;i++){
	for (var j=0;j<navItems[i].length;j++){
		var regex = /,/;
		var regexTest = navItems[i][j].split('||')[1];
		if (navItems[i][j].split('||')[1] == thisLoc){
			drawNav(i,j);
			break;
		} else if (regex.test(regexTest)){
			for (var m=0;m<regexTest.split(',').length;m++){
				if (regexTest.split(',')[m] == thisLoc){
					drawNav(i,j);
					break;
				}
			}
		}
	}
}

//-->
