// work out the file name
sLocation = window.location.href;
aLocationParts = sLocation.split("/");
sSectionName = aLocationParts[aLocationParts.length-2]

// root level is a little different
if (sSectionName == 'circanundah' || sSectionName == 'www.circanundah.com.au' || sSectionName == 'overview' || sSectionName == 'register') {
	sSectionName = 'index.htm';
}

// get to the man navigation div
oMainNav = document.getElementById('cellNavigation');

// loop through all the links in the main navigation div
aObjs = oMainNav.getElementsByTagName('a');
for(i=0;i<aObjs.length;i++){
	oLink = aObjs[i];
	// work out the href
	sLinkURL = oLink.toString();
	// check if it matches our current file name
	iInstancePos = sLinkURL.indexOf(sSectionName);

	if (iInstancePos > 0) {
		// change its class if it is.
		oLink.className  = 'current';			
	}
}

