/* JavaScript Document
 * sourced frokm suckerfish dropdown tabs - http://www.alistapart.com/articles/dropdowns/
 * 
 * Used to generate the dropdown tabs from nested list for IE
 */

startList = function() {
	navRoot = document.getElementById("subMenu");
	for (i=0; i<navRoot.childNodes.length; i++) {
		node = navRoot.childNodes[i];
		if (node.nodeName=="LI") {
			
			// targets only IE
			if (document.all&&document.getElementById) {
				node.onmouseover=function() {
					this.className+=" over";
				}
				node.onmouseout=function() {
					this.className=this.className.replace(" over", "");
				}
			}
			
			node.onclick=function() {
				navRoot = document.getElementById("subMenu");
				for (i=0; i<navRoot.childNodes.length; i++) {
					node = navRoot.childNodes[i];
					if (node.nodeName=="LI")
						node.className = "";
				}
				this.className=this.className.replace(" over", "");
				this.className+=" selected";
			}
		}
	}
}

addLoadEvent(startList);