// 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(window.init) //if the spotlight initialization function has been defined...
		window.init(); //run it
	
	if(window.BoxChanger)
		bx = new window.BoxChanger();
		
   
}


window.onload = start;
