function openMenuById(id)
{
	var element = getById( id );
	if( element == null )
	{
		return;
	}

	var prefix = getPrefix( id );
	if( prefix == null )
	{
		return;
	}

	var keep_going = true;
	for( var i = 1; keep_going; ++i )
	{
		keep_going = false;
		var menu_element = getById( prefix + i );
		if( menu_element )
		{
			menu_element.style.display='none';
			keep_going = true;
		}
	}

	element.style.display='block';
}

/**
 *	This method will grab the prefix from a name
 *	It looks for a trailing series of digits and
 *	strips them off, returning what is in front
 *	of the trailing digits.
 *
 *	@param tag A string with a number at the end.
 *	@return The prefix, with the number stripped off.
 */
function getPrefix( tag )
{
	for( i = tag.length - 1; i >= 0; --i )
	{
		var c = tag.charAt(i);
		if( !isDigit( c ) )
		{
			break;
		}
	}

	if( ( i == tag.length - 1 ) || ( i < 0 ) )
	{
		return( null );
	}

	return( tag.substring( 0, i + 1 ) )
}
