// Used for the front page of SwissPasses.com
// globals
var gLastOpenedInfoArea = '';
//-------------------------------------------------------------
// Toggles the Info div for the clicked on button.
//-------------------------------------------------------------
function toggleInfoText( infoButton )
{
	//alert( 'Selected Info Button: ' + infoButton );
	
	// Validate that the browser knows getElementById 
 	if( !document.getElementById ) return true; 
	
	var infoBox = document.getElementById( infoButton );
	//alert( 'Selected Info Box style.display: ' + infoBox.style.display )
	if ( infoBox.style.display == 'none' || infoBox.style.display == '' ) {
		infoBox.style.display = 'block';		// make visible.
		if ( supportsOpacity( infoBox )) {
			// Semi-transparent background, if supported.
			setOpacity( infoBox, .95 );
		}
	} else {
		infoBox.style.display = 'none';		// hide.
	}
	
	// If an Info Area has already been opened, make sure its closed
	// when this one opens, so we don't end up with a screen full of 
	// the suckers.
	if ( gLastOpenedInfoArea != infoBox ) {
		if ( gLastOpenedInfoArea != '' ) {
			gLastOpenedInfoArea.style.display = 'none';		// hide last opened box.
		}
		gLastOpenedInfoArea = infoBox;					// save ref to new box...
	}
	
	
	return false;		// stop the browser from following any html link...
	
}