/* Function for showing and hiding the left hand navigation on the facts pages */

function showHide (div)  
{


	var elem = document.getElementById(div); 
	var currentStatus = elem.style.display; 
 
	if (currentStatus == 'none' || currentStatus == '')    
		{elem.style.display = 'block';} 
	else 
		{elem.style.display = 'none';}

		
// ---------------Addtional functionality - closes all Menu sections when function is called	----------
	
	//loop through all "ul" tags (the menu items are always uls with an id like factsMenu1, factsMenu2 etc.
	for(i=0;i<document.getElementsByTagName('ul').length;i++)
	{
		// since there are many ul tags which we dont want to hide, get only those whos first 9 chars of their id
		//is "factsMenu" (ie a menu item) AND the tag isnt the one which has just been called or else it will close that
		// tag which has just been opened
		if(document.getElementsByTagName('ul')[i].id.substring(0,9) == "factsMenu" && document.getElementsByTagName('ul')[i].id != div)
			{
			// close all these factsMenu items - the correct one, which the user has clicked on will be opened bellow
			document.getElementsByTagName('ul')[i].style.display = 'none';
			}		
	}

	


}

