/*
this creates dropdowns for the departments link across the top menubar. Since the id's are autogenerated, you will need to determine the ID of your departments page from view source once your sitemap is created. The sub that id into the script below to make it resolve.
JSB 8/26/04 Added code for "Elected Officials" dropdown
*/

//pointer to menus
var sourceMenu,targetMenu,sourceMenu2,targetMenu2;

function x8showMenu(what,which){
	if(what=="show" && which=="departments")
	{
		targetMenu.style.display="block";
		targetMenu2.style.display="none";
	}
	else if(what=="show" && which=="electedofficials")
	{
		targetMenu2.style.display="block";
		targetMenu.style.display="none";
	}
	else
	{
		targetMenu.style.display="none";
		targetMenu2.style.display="none";
	}
}

function x8initMenus(){
	sourceMenu = document.getElementById("x8menu2_1");
	targetMenu = document.getElementById("x8_dropdowns");

	if(sourceMenu && targetMenu){
		sourceMenu.onmouseover=function(){x8showMenu("show","departments")}
		targetMenu.onmouseover=function(){x8showMenu("show","departments")}
		targetMenu.onmouseout=function(){x8showMenu("hide","departments")}
	}
	sourceMenu2 = document.getElementById("x8menu2_0");
	targetMenu2 = document.getElementById("x8_dropdowns2");

	if(sourceMenu2 && targetMenu2){
		sourceMenu2.onmouseover=function(){x8showMenu("show","electedofficials")}
		targetMenu2.onmouseover=function(){x8showMenu("show","electedofficials")}
		targetMenu2.onmouseout=function(){x8showMenu("hide","electedofficials")}
	}
	document.ListC.BKCOL.focus();
}

window.onload = x8initMenus;
