// ||||||||||||||||||||||||||||||||||||||||||||||||||

// Navigation

Menu = {timer : null, current : null};
Menu.show = function(name){
	
	if(this.timer) clearTimeout(this.timer);

	// turn on current subnav
	//this.subnavElement = $("subnav_" + name);
	//if (this.subnavElement){
			//this.subnavElement.style.display = "block";
	//}
	// turn on current nav
	mainSection = $("page_nav_link_" + name)
	sectionBottom = $("page_nav_link_bottom_" + name)
	//moreLink = $("page_nav_link_more_" + whichSection)
	mainSection.style.backgroundImage = "url('" + sectionMainBackground.src + "')";
	sectionBottom.style.backgroundImage = "url('" + sectionBottomBackground.src + "')";
	
	// remember which is on
	this.current = name;

}
Menu.hide = function(){
	
	//this.timer = setTimeout("Menu.doHide()",10);
	Menu.doHide();
}
Menu.doHide = function(){ // only for flyouts
	if(this.current){
		
		// turn off current subnav
		//this.subnavElement = $("subnav_" + this.current);
		//if (this.subnavElement){
			//this.subnavElement.style.display = "none";
		//}
	
		// turn off current nav
		mainSection = $("page_nav_link_" + this.current)
		sectionBottom = $("page_nav_link_bottom_" + this.current)
		//moreLink = $("page_nav_link_more_" + whichSection)
		mainSection.style.backgroundImage = "url('/images/clear.gif')";
		sectionBottom.style.backgroundImage = "url('/images/clear.gif')";
		//Element.hide(moreLink);
		
		// remember none are on
		this.current = null;
	}
}


Menu.clearHighlight = function(nameOfItem){ // for links with no subnav
	
		// turn off current nav
		mainSection = $("page_nav_link_" + nameOfItem)
		sectionBottom = $("page_nav_link_bottom_" + nameOfItem)
		mainSection.style.backgroundImage = "url('/images/clear.gif')";
		sectionBottom.style.backgroundImage = "url('/images/clear.gif')";
		
}

Menu.highlight = function(nameOfItem){ // for links with no subnav
	
		// turn off current nav
		mainSection = $("page_nav_link_" + nameOfItem)
		sectionBottom = $("page_nav_link_bottom_" + nameOfItem)
		mainSection.style.backgroundImage = "url('" + sectionMainBackground.src + "')";
		sectionBottom.style.backgroundImage = "url('" + sectionBottomBackground.src + "')";
		
}

