
	function toggleMenu(elm)
	// this function handles the revealing/hiding of primary navigation items (2nd-tier nav)
	{
		// toggle the selected menu
		var target = "sub-" + elm;
		var list = document.getElementById(target);
		if (list.style.display == "none")
		{ 
			show(list.id);	
		} 
		else
		{ 
			hide(list.id);
		}
		
		// now hide the previously open menu
		if (lastMenu != "")
		{
			hide(lastMenu);
		}
			
		// if lastMenu is the same as it was last time, we want to reset it to blank
		// otherwise you won't be able to re-open a menu you just closed
		if (lastMenu == list.id)
		{
			lastMenu = "";
		}
		else
		{	
			lastMenu = list.id;
		} 	
	}
	
	function toggleSubmenu(elm)
	{
		
		var targetSubset = document.getElementById(elm);
		if (targetSubset.style.display == "none")
		{
			show(targetSubset.id);
		}
		else
		{
			hide(targetSubset.id);
		}
	
		// now hide the previously open menu
		if (lastSubmenu != "")
		{
			hide(lastSubmenu);
		}
			
		// if lastMenu is the same as it was last time, we want to reset it to blank
		// otherwise you won't be able to re-open a menu you just closed
		if (lastSubmenu == targetSubset.id)
		{
			lastSubmenu = "";
		}
		else
		{	
			lastSubmenu = targetSubset.id;
		} 
	
	}
	
	/* these functions handle div-based navigation on sub-pages */
	
	/*
	function init()
	// this hides category-specific submenus (the ones that appear in the middle-top column) on initial load
	{
		var thePageElems = document.getElementsByTagName('ul');
		for (var i = 0; i < thePageElems.length; i++) 
		{
			if (thePageElems[i].className == 'contentSwitcher') 
			{
				hide(thePageElems[i]);
			}
		}
		
		default_content();
	}
	
	function default_content()
	// hide all content divs except content-01
	{
		var thePageElems = document.getElementsByTagName('div');
		for (var i = 0; i < thePageElems.length; i++) 
		{
			if (thePageElems[i].className == 'content' && thePageElems[i].id != 'content-01') 
			{
				hide(thePageElems[i]);
			}
		}
	}
	*/
	
	var currentswitcher = "";
	var currentcontent = "01";
	var currentimage = 1;
	
	function showswitcher(elm)
	{
		hide("switcher-" + currentswitcher);
		show("switcher-" + elm);
		currentswitcher = elm;
	}
	
	function showcontent(elm)
	{
		hide("content-" + currentcontent);
		hide("staff-" + currentcontent);
		show("content-" + elm);
		show("staff-" + elm);
		currentcontent = elm;
	}
	
	function menu_page(page)
	{
		hide("menupage-" + currentpage);
		show("menupage-" + page);
		currentpage = page;
	}
	
	function showimage(elm)
	{
		hide("image-" + currentimage);
		show("image-" + elm);
		currentimage = elm;
	}
	
	function nextimage()
	{
		if (currentimage < totalimages)
		{
			hide("image-" + currentimage);
			var next = currentimage + 1;
			show("image-" + next);
			currentimage = next;
		}
		else
		{
			hide("image-" + currentimage);
			var next = 1;
			show("image-" + next);
			currentimage = next;
		}
	}
	
	function show(elm) 
	{
		if (document.getElementById && document.getElementById(elm) != null)
		{
			 document.getElementById(elm).style.display='block';
		}
	}
	
	function hide(elm)
	{
		if (document.getElementById && document.getElementById(elm) != null)
		{
			 document.getElementById(elm).style.display='none';
		}
	}	