// JavaScript Document


/* JAVASCRIPT ROLLOVER MENU CODE */
/* The following code controls the rollover menu effect for a CSS based rollover/popup menu */

var maxMenus = 1		// sets the number of popup menus on the page
var menuTimeout = 0  	// sets the delay in ms before a menu is displayed or hidden
var arLinks = [];		// holds the names (page IDs) of the links or page elements which display the menu when rolled over (e.g. <a href="#" id="popUpLink1">Foo</a> or <span id="popUpLink1">Foo</span>)
var arMenus = [];		// holds the names (page IDs) of the pop up menu container blocks (e.g. <div id="popupMenu1">Foo</div>)
						
						
// When populating the arrays, the caller ID and menu ID MUST BE AT THE SAME ORDINAL POINT IN THE ARRAY
				
arLinks[0] = "mainNav12";			



arMenus[0] = "subNav12";		







/* DO NOT EDIT THE CODE BELOW */
var keepMenu = 0
if(menuTimeout < 100){menuTimeOut = 100;}
function showMenu(menuId){
	keepMenu = 0;
	setTimeout("setShowMenu(" + menuId + ")",menuTimeout);
	for (var i = 0; i < maxMenus; i++) {
		if(menuId != i) {
			setHideMenu(i);
			}
		}
	}
function hideMenu(menuId){
	keepMenu = 0;
	setTimeout("setHideMenu(" + menuId + ")",menuTimeout);
	}
function setShowMenu(menuId){
	document.getElementById(arMenus[menuId]).style.display='block';
	}
function setHideMenu(menuId){
	if(keepMenu == 0){
		var obj = document.getElementById(arMenus[menuId])
		if(obj.style.display='block'){
			obj.style.display='none';
			}
		}
	}
function setState()	{
	keepMenu = 1;
	}
var intMenuId = 0
function showIE(evt)	{
	var menuId = "menuId";
	var ie_var = "srcElement";
	menuId = evt[ie_var][menuId];
	intMenuId = menuId;
	showMenu(menuId);
	}
function hideIE(evt)	{
	hideMenu(intMenuId);
	}
function loadMenus() {
	for(var i = 0; i < maxMenus; i++){
		if (window.attachEvent) {
			document.getElementById(arLinks[i]).menuId = i
			document.getElementById(arLinks[i]).attachEvent('onmouseover', showIE);
			document.getElementById(arLinks[i]).attachEvent('onmouseout', hideIE);
			document.getElementById(arMenus[i]).attachEvent('onmouseover', setState);
			document.getElementById(arMenus[i]).attachEvent('onmouseout', hideIE);
			}
		else {
			document.getElementById(arLinks[i]).setAttribute("onmouseover", "showMenu(" + i + ");");
			document.getElementById(arLinks[i]).setAttribute("onmouseout", "hideMenu(" + i + ");");
			document.getElementById(arMenus[i]).setAttribute("onmouseover", "setState();");
			document.getElementById(arMenus[i]).setAttribute("onmouseout", "hideMenu(" + i + ");");
			}
		}
	}
//-->