
// set global variables for generating code suitable for different browser types
var w3c = document.getElementById ? true : false;
var nn4 = document.layers ? true : false;
var ie4 = document.all ? true : false;

// OPERA fix - incorrect implementation of DHTML, so treat as if NN4
if ((navigator.userAgent.indexOf('Opera 6') != -1) || (navigator.userAgent.indexOf('Opera/6') != -1)) {
	w3c = false;
	nn4 = true;
	ie4 = false;
}


// set global variables for elements of the URL
var pagePath = new String(location.pathname);
var pageDirs = new String(pagePath.substring(1, pagePath.lastIndexOf('/', 200)));
var pageName = new String(pagePath.substring(pagePath.lastIndexOf('/', 200)+1, pagePath.lastIndexOf('.', 200)));


// set local variables for use in the 'toggleMaps' function
if (window.mapHold == undefined) {
	mapHold = 'map2006';
}
mapPrev = 'empty';


// write styles classes for use in the 'toggleMaps' function
document.write('<style type="text/css">');
if (w3c == true || ie4 == true) {
	document.write('.infostyle1 { display: none; text-align: center; }');
}
else {
	document.write('.infostyle1 { display: block; text-align: center;  }');
}
document.write('.infostyle2 { display: block; text-align: center; }');
document.write('<\/style>');


// FUNCTION: toggleMaps - for alternating which page elements are visible or invisible
function toggleMaps(mapName) {
	if (ie4 == true) {
		document.all[mapHold].className = 'infostyle1';
		document.all[mapName].className = 'infostyle2';
	}
	else if (w3c == true) {
		document.getElementById(mapHold).className = 'infostyle1';
		document.getElementById(mapName).className = 'infostyle2';
	}
	if (mapName != 'map0000') {
		mapPrev = mapName;
	}
	mapHold = mapName;
	if (nn4 == true) {
		href.hash = 'infoanchor'.mapName.substring(5,6);
	}
}

