/***************************************************
Function to swap photos
	First parameter is the base name of the photos
	Second parameter is the number of photos
	Photos must all have the same base path and be numbered consecutively, starting with 1
	Example: ../images/photo1.jpg, ../images/photo2.jpg, etc.
	The <img tag must include: id="photo"
****************************************************/

var photoNumber = 1;

function nextPhoto(basePath,numberPhotos) {
	//alert("This is nextPhoto!");
	//alert("basePath: " + basePath + "; numberPhotos: " + numberPhotos);
	if(photoNumber < numberPhotos) {
		photoNumber = photoNumber + 1;
		document.getElementById('photo').src = basePath + photoNumber + ".jpg";
	} else {
		if(confirm("To view the photos again, please click \"OK.\"")) {
			photoNumber = 1;
			document.getElementById('photo').src = basePath + "1.jpg";
		}
	}
}
