/*This function is used in enabling a drop-down/flyout menu for IE6
 *It is needed because IE6 and below do not support :hover css functionality
 *for elements other than <a>.  Therefor all li:hover css rules must also have a
 *corresponding class designated to them.
 *In this script that class is ".over".
 *
 *The script uses the document.all property, which is only available in IE to assign the
 *mouse events to <li> elements.
 *Finally the function takes as a parameter a dom element, this should be the parent of the
 *navigation bar, either the ul tag or the div container.
 */

window.onload = function(){

	//allow function to only add mouse events if browser is IE
	if (document.all&&document.getElementById) {

		//get navigation menu parent
		navRoot = document.getElementById("h-nav");
		//get all list items
		liList = navRoot.getElementsByTagName("li");
		//add onmounseover and onmouseout events to each <li>
		//that change the class of the element top .over
		for (i=0; i<liList.length; i++) {
			node = liList[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					this.className+=" over";
				}
				node.onmouseout=function() {
					this.className=this.className.replace(" over", "");
				}
			}
		}
	}
		//enableIESixDropDown("category-nav");
};
