/*
	Blanket function for making navigation work really nicely.
	Jeff Nadeau 2008
*/

window.onload = function(){
	//I'll move this elsewhere if I need more onloads.
	setNav();
	if(document.getElementById("map")){ //This is awkward to put in navigation.js but I don't really want to move window.onload elsewhere right now.
		initMap();
	}
}

function setNav(){
	var lis = document.getElementsByTagName("li");
	for(var i=0; i < lis.length; i++){
		lis[i].onmouseover = function(){
			if(this.firstChild.nextSibling && this.firstChild.nextSibling.tagName == "UL"){
				this.firstChild.nextSibling.style.display="block";
			}
		}
		
		lis[i].onmouseout = function(){
			if(this.firstChild.nextSibling && this.firstChild.nextSibling.tagName == "UL"){
				this.firstChild.nextSibling.style.display="none";
			}
		}
	}
}
