function ShowNav(navItem) {
	ypSlideOutMenu.showMenu(navItem + 'Menu');
}
function HideNav(navItem) {
	ypSlideOutMenu.hideMenu(navItem + 'Menu');
}

function SwapNavImage(menuObj, state) {

	var thisNav;
	switch(menuObj) {
		case 0: thisNav = "navHome"; break;
		case 1: thisNav = "navAbout"; break;
		case 2: thisNav = "navServices"; break;
		case 3: thisNav = "navEmployment"; break;
		case 4: thisNav = "navContact"; break;
		case 5: thisNav = "navLinks"; break;
		case 6: thisNav = "navHRSCA"; break;
		case 7: thisNav = "navHRSF"; break;
		default: thisNav = ""; break;
	}

	if (thisNav != "") {
		if (state == "over") {
			SwapImage(thisNav, 'over');
			if (getImageObject(thisNav).style) { getImageObject(thisNav).style.borderBottom = "1px solid #b3b3b3"; }
		} else {
			SwapImage(thisNav, 'out');
			if (getImageObject(thisNav).style) { getImageObject(thisNav).style.borderBottom = "1px solid #FFFFFF"; }
		}
	}
}

var menus = [
	new ypSlideOutMenu("navHomeMenu", "down", 96, 77, 107, 260),
	new ypSlideOutMenu("navAboutMenu", "down", 96, 97, 107, 260),
	new ypSlideOutMenu("navServicesMenu", "down", 96, 117, 107, 260),
	new ypSlideOutMenu("navEmploymentMenu", "down", 96, 137, 107, 60),
	new ypSlideOutMenu("navContactMenu", "down", 96, 157, 127, 75),
	new ypSlideOutMenu("navLinksMenu", "down", 96, 177, 107, 60),
	new ypSlideOutMenu("navHRSCAMenu", "down", 96, 202, 107, 60),
	new ypSlideOutMenu("navHRSFMenu", "down", 96, 222, 107, 60)
]

for (var i = 0; i < menus.length; i++) {
	menus[i].onactivate = new Function("SwapNavImage(" + i + ", 'over');");
	menus[i].ondeactivate = new Function("SwapNavImage(" + i + ", 'out');");
}


function ScriptaculousEffect(element,action,length){
   new Effect.toggle(element, action, {duration:length});
}
