// Navigation flags to control when to Hide/Show HTML SELECT dropdowns in IE6's browser bug.
var selectBoxFlag = 0;
// Top navigation menu control
topNav = function() {
	if ((document.all)&&(document.getElementById)&&(cssdropdownRoot = $('nav_list'))) {
		cssdropdownRoot = $('nav_list').getElementsByTagName('li');
		nodes = $A(cssdropdownRoot);
		for (x=0; x<nodes.length; x++) { // length = 7
			node = nodes[x];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					// mimics the :hover functionality
					this.className+=" over";
					selectBoxFlag++;
					hideSelectBoxes('hidden');
				}
				node.onmouseout=function() {
					// mimics the :hover functionality
					this.className=this.className.replace(" over", "");
					selectBoxFlag--;
					if (!selectBoxFlag) hideSelectBoxes('visible');
				}
			}
		}
	}
}

// This function hides select boxes in IE that fall underneith a layer.
hideSelectBoxes = function(action) {
	if ((action == 'visible') && (selectBoxFlag)) return;
	else if ((browser.isIE6x) && ($('content') && (selectRoot = $('content').getElementsByTagName('select')))) {
		for (i=0; i<selectRoot.length; i++ ) {
			if (selectRoot[i].className.match(/elementToHideOnMenuOpen/)) {
				selectRoot[i].style.visibility = action;
			}
		}
	}
}

// This function is activated upon page load. They embed JavaScript without function calls from appearing within the HTML.
init = function() {
	topNav(); // activate top navigation
}

// Standard Global Fully Browser-compat onload function init call.
if (window.addEventListener)
window.addEventListener("load", init, false)
else if (window.attachEvent)
window.attachEvent("onload", init)
else if (document.getElementById)
window.onload=init;


