// Browser sniffing variables
var ns4 = document.layers ? 1 : 0;
var ie4 = document.all ? 1 : 0;
var ns6 = document.getElementById && !document.all ? 1 : 0;

// dhtml layer variables for cross-browser compatability
if (document.layers) {	// Netscape 4
	doc = "document[";
	conDoc = "document";
	sty = "]";
	htm = ".document";
} else if (document.getElementById) {	// NS 6 or IE 5 and up (W3C compliant browsers).
	doc = "document.getElementById(";
	conDoc = "document.getElementById(";
	sty = ").style";
	htm = ".document";
} else if (document.all) {	// IE 4
	doc = "document.all[";
	conDoc = "document.all[";
	sty = "].style";
	htm = "";
}

// vars for dropdown menus
var navTimer = null;
var navTimer2 = null;
var currNav = null;
var navHideDelay = 100;
var isNavLoaded = false;

// build dropdown objects (run onload)
function buildNav() {
	nav01Obj = eval(doc + '"nav01"' + sty);
	nav02Obj = eval(doc + '"nav02"' + sty);
	nav03Obj = eval(doc + '"nav03"' + sty);
	nav04Obj = eval(doc + '"nav04"' + sty);
	nav05Obj = eval(doc + '"nav05"' + sty);
	nav06Obj = eval(doc + '"nav06"' + sty);
	isNavLoaded = true;
}

// shows a dropdown menu, hides any other dropdown that is currently showing
function showNav(which) {
	if (isNavLoaded) {
		if ((currNav != null) && (currNav != which)) {
			eval("nav" + currNav + "Obj.visibility = 'hidden'");
		}
		currNav = which;
		eval("nav" + currNav + "Obj.visibility = 'visible'");
		//NavStr = new String(currNav);
		//eval("changeImages('nav_" + NavStr.toLowerCase() + "','nav_" + NavStr.toLowerCase() + "_on')");
		clearTimeout(navTimer);
		//clearTimeout(navTimer2);
		navTimer = null;
		//navTimer2 = null;
	}
}
// hides a dropdown menu on a time delay
function hideNav(which) {
	if (isNavLoaded) {
		NavStr = new String(which);
		navTimer = setTimeout("nav" + which + "Obj.visibility = 'hidden'", navHideDelay);
		//navTimer2 = setTimeout("changeImages('nav_" + NavStr.toLowerCase() + "','nav_" + NavStr.toLowerCase() + "_off')", navHideDelay);
	}
}
