// work out the file name
sLocation = window.location.href;
aLocationParts = sLocation.split("/");
sFullFileName = aLocationParts[aLocationParts.length-1]; // Last element
aFileNameParts = sFullFileName.split(".");
sFileName = aFileNameParts[0]; // First element

aSectionNameParts = sFileName.split("_");
sSectionName = aSectionNameParts[0]; // First element

// 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  = 'navSelected';			
	}
}

