var currentPhotoId;
function prevPhoto()
{
	currentPhotoId--
	if(currentPhotoId < 0)
		currentPhotoId = photos.length - 1;
	
	showPhoto(currentPhotoId);
}

function nextPhoto()
{
	currentPhotoId++
	if(currentPhotoId > photos.length - 1)
		currentPhotoId = 0;
	
	showPhoto(currentPhotoId);
}

function showPhoto(nr)
{
	currentPhotoId = nr % photos.length;
	document.getElementById("numOfPhotos").innerHTML = nr+1 + " / " + photos.length;
	document.getElementById("polaroidPhoto").src = photos[nr].src;
	document.getElementById("polaroidPhoto").alt = photos[nr].alt;
}
