hideElements = new Array();

function setNav() {

	if (document.getElementById && document.getElementById("nav")) {
		navRoot = document.getElementById("nav");
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.className == "collapse") {
			
				node.onmouseover = function() {
					this.className = 'expand';
				}
				
				node.onmouseout = function() {
				    this.className = 'collapse';				
				}
				for (j=0; j<node.childNodes.length; j++) {
				
					if (node.childNodes[j].className == "dropmenu") {
								menuElem = node.childNodes[j];				
								for (q=0; q<menuElem.childNodes.length; q++) {
									if (menuElem.childNodes[q].className == "dropitem") {
										dropElem = menuElem.childNodes[q];
										dropElem.onmouseover = function() {
											this.className = 'dropitemHi';
										}
										dropElem.onmouseout = function() {
											this.className = 'dropitem';
										}
									
										// find 1st tier drop items that are also 2nd tier dropdowns
										for (d=0; d<dropElem.childNodes.length; d++) {
											if (dropElem.childNodes[d].className == "dropmenu2") {
												// found one
												tier2Item = dropElem.childNodes[d];
												// assign rollovers
												for (r=0; r<dropElem.childNodes.length; r++) {
													tier2Item.childNodes[r].onmouseover = function() {
														this.className = 'dropitemHi';
													}
													tier2Item.childNodes[r].onmouseout = function() {
														this.className = 'dropitem';
													}
												}
											}
										}
									}
						}
					}
				}
			}
		}
	}
}