function toggleview(id)
{
	var ignore = -1;
	if ( ! id ) return;
	
	// is there an except
	if (arguments.length > 1)
	{
		// If the ignore argument is set, assign it to the variable
		ignore = arguments[1];
	}
	else
	{
		ignore = id;
	}

	//Hide all menus except the one we want to toggle the view on
	hideMenu(ignore);
	
	var d;
	
	// Check that the menu we're calling exists
	if (d = document.getElementById('submenu-' + ((String) (id))))
	{
		//switch the view either on or off
		if (d.style.display == 'block')
		{
			d.style.display = 'none';
		}
		else
		{
			d.style.display = 'block';
		}
	}
}

function hideMenu()
{
	// start by declaring a variable for an optional ignore
	var ignore = -1;
	var d;
	
	if (arguments.length > 0)
	{
		// If the ignore argument is set, assign it to the variable
		ignore = arguments[0];
	}

	// do outer levels
	for (var i = 1; i <= 100; i++)
	{
		// do outer levels
		for (var u = 1; u <= 10; u++)
		{
			// hide the menu
			if (d = document.getElementById('submenu-' + ((String) (i)) + '-' + ((String) (u))))
			{
				d.style.display = 'none';
			}
		}
		
		// check to make sure this id is not to be ignored
		if (i != ignore)
		{
			// hide the menu
			if (d = document.getElementById('submenu-' + ((String) (i))))
			{
				d.style.display = 'none';
			}
		}
	}
}