var bx;

//based on http://www.alistapart.com/articles/dropdowns/
	
// function called when user mouseovers menu item
// adds the "mouse_in" class name to the submenu so it will display it
function mouse_in() {
	this.className += "mouse_in";
}

// function called when user mouses out of menu item
// removes "mouse_in" class name from submenu so it will no longer be displayed
function mouse_out() {
	this.className = this.className.replace("mouse_in", " ");
}



// function to be called when the page loads.  Sets the two functions above to handle the
// mouseover and mouseout events repsectively for menu items.
// Gets the root element of the list (the top level ul tag) and loops through its decendants
// that are li tags, assigning the mouse in and out functions to them.
function start() {
	if(document.getElementById) { 
		menu_root = document.getElementById("nav_list");
		list_elements = menu_root.getElementsByTagName("li");
		for (i = 0; i < list_elements.length; i++) {
			node = list_elements[i];
			node.onmouseover = mouse_in;
			node.onmouseout = mouse_out;
			if(node.getElementsByTagName("ul").length!=0) {
				a = node.getElementsByTagName("a")[0];
				a.onclick = function() { return false; };
			}
		}  	
		
		menu2 = document.getElementById("top_nav");
		list2 = menu2.getElementsByTagName("li");
		for (i = 0; i < list2.length; i++) {
			node2 = list2[i];
			node2.onmouseover = mouse_in;
			node2.onmouseout = mouse_out;
			if(node2.getElementsByTagName("ul").length!=0) {
				a = node2.getElementsByTagName("a")[0];
				a.onclick = function() { return false; };
			}
		}
	}
	if(window.BoxChanger) { 
	    bx = new window.BoxChanger();
	}
}

