// JavaScript Document for controlling the side navigation menus
var sideBtns = new Array('campaignpatientsfirst','gethealthinformation','advocateforchange',
						 'membershipdirectory','onlinecommunity_2','nhcblog','resourcedirectory',
						 'multimediacenter','news','programs','publications','polls');
var sideTimer = 100;
var endTimer = 0;
var closingMenu = '';
function showMenu(btn){
	if(document.getElementById(btn+"_menu").style.display == "block"){
		closingMenu = btn;
		startMenuClose();
		setHeight();
	}else{
		document.getElementById(btn+"_menu").style.display = "block";
		document.getElementById(btn+"_link").style.color = "#ff0000";
		document.getElementById(btn+"_parent").style.backgroundImage = "url("+siteRoot+"/images/nav_images/bluebullet.png)";		
		getNavContent('side',btn)
	}
}
function hideMenu(){
	if(document.getElementById(closingMenu+"_menu")){
		var thisHeight = document.getElementById(closingMenu+"_menu").offsetHeight;
		document.getElementById(closingMenu+"_menu").style.display = "none";
		document.getElementById(closingMenu+"_link").style.color = "#000000";		
		document.getElementById(closingMenu+"_parent").style.backgroundImage = "url("+siteRoot+"/images/nav_images/redbullet.png)";	
		setHeightDown(thisHeight);
	}
}
function startMenuClose(cMenu){
	endTimer = setTimeout("hideMenu()",sideTimer);
}
function stopMenuClose(){
	if(endTimer){
		window.clearTimeout(endTimer);
		endTimer = null;
	}
}
