/*---------------------------------------------------------------------
	JavaScript DOM Show Sub Nav function

	REQUIREMENTS:
		LI needs to have class="TopNav"
	
	USAGE:
		Make sure function initShowSubNav() is called in the window.onload event.
-----------------------------------------------------------------------*/
function initShowSubNav() {
	if (!document.getElementById) return
	
/*
*/
	var aLI = document.getElementsByTagName('li');

	for (var i = 0; i < aLI.length; i++) {
	
		if (cssClassActions('check',aLI[i],'NavTop')) {
			aLI[i].onmouseover = function() {
				for (var j=0; j < this.childNodes.length; j++) {
					if (this.childNodes[j].nodeName=="UL") {
						this.childNodes[j].style.display='block';
						//this.childNodes[j].style.visibility='visible';
					}
				}
			}	
			
			aLI[i].onmouseout = function() {
				for (var j=0; j < this.childNodes.length; j++) {
					if (this.childNodes[j].nodeName=="UL") {
						this.childNodes[j].style.display='none';
						//this.childNodes[j].style.visibility='hidden';
					}
				}
			}
		}
	}
}
/*---------------
	Add to window.onload event
---------------*/
addEvent(window, 'load', initShowSubNav, false);
