
	var currentPictureID = 1;
	
	function displayDetail ( imgElementID, currentID, totalIDs )
	{
		var i;
		for ( i = 1; i <= totalIDs; i++ )
			if ( el = document.getElementById ( imgElementID + i ) )
				el.style.display = ( currentID == i ) ? 'block' : 'none';
		
		currentPictureID = currentID;
		return true;
	}
	
	function displayPrevious ( imgElementID, totalIDs )
	{
		var previousID = ( currentPictureID == 1 ) ? totalIDs : currentPictureID - 1;
		displayDetail ( imgElementID, previousID, totalIDs );
	}
	
	function displayNext ( imgElementID, totalIDs )
	{
		var nextID = ( currentPictureID == totalIDs ) ? 1 : currentPictureID + 1;
		displayDetail ( imgElementID, nextID, totalIDs );
	}
	