var current;

current = '';

function popup( element, action )
{
	element_id = document.getElementById( element );
	
	if( action == 'open' )
	{
		element_id.style.display = '';
		temp = current;

		if( current.length > 0 )
		{
			popup( current, 'close' );
		}
		
		if( temp != element )
		{
			current = element;
		}
	}
	else
	{
		element_id.style.display = 'none';
		current = '';
	}
	
	return;
}