var openBox = null;
var fadeCount = 0;
var fade = 0;

function showDesc( id )
{
	var box = document.getElementById( id );

	if( box != null )
	{
		if( openBox == box )
		{
			box.style.display = 'none';
			openBox = null;
		}
		else
		{
			if( openBox != null )
			{
				openBox.style.display = 'none';
			}
			box.style.display = 'block';
			//box.style.opacity = '0';
			openBox = box;
			//fade = setTimeout( "fadeIn()", 100 );
		}
	}
}

function fadeIn()
{
	if( fade )
	{
		clearTimeout( fade );
	}

	if( openBox != null )
	{
		openBox.style.opacity = 0.10 * fadeCount;
		if( fadeCount < 9 )
		{
			fadeCount++;
			fade = setTimeout( "fadeIn()", 100 );
		}
		else if( fadeCount == 9 )
		{
			fadeCount = 0;
		}
	}
}

function closeDesc( id )
{
	var box = document.getElementById( id );

	if( box != null )
	{
		box.style.display = 'none';
		openBox = null;
	}
}