
// 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');
				}
			}
		}
	}
}
// Controls the utility bar's primary open/close functionality
utilityNav = function () {
	if (cssdropdownRoot = $('my_links')) {
		cssdropdownRoot = $('my_links').getElementsByTagName('li');
		liNodes = $A(cssdropdownRoot);
		for (x=0; x<liNodes.length; x++) {
			if (liNodes[x].className == '') {
				divNodes = liNodes[x].getElementsByTagName('div');
					for (y=0; y<divNodes.length; y++) {
						if (divNodes[y].className == "close") {
							aNode = divNodes[y].getElementsByTagName('a');
							aNode[0].onclick = function() {
								this.href="javascript:void(0)";
								utility(this);
							}
						}
					}
				aNode = liNodes[x].getElementsByTagName('a');
				//alert(divNode[divNode.length-1].className);
				aNode[0].onclick = function() {
				this.href="javascript:void(0)";
				utility(this);
				}
			}
		}
	}
}


// These functions are activated upon page load. They embed JavaScript without function calls from appearing within the HTML.
init = function() {
	utilityNav(); // activate utility navigational links
	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;

