function showProductPhoto(imageUrl, currentPhoto)
{
	$("#productPhoto").attr("src", imageUrl);
	currentImage = currentPhoto;
}

function nextImage()
{
	currentImage++;	
	if(currentImage>lastImage) currentImage = firstImage;
						
	var nextPhotoSrc = $("#photoNumber"+currentImage).attr("src");
	nextPhotoSrc = nextPhotoSrc.replace("thumb", "main");
						
	$("#productPhoto").attr("src", nextPhotoSrc);
}
					
function prevImage()
{
	currentImage--;	
	if(currentImage<firstImage) currentImage = lastImage;
						
	var nextPhotoSrc = $("#photoNumber"+currentImage).attr("src");
	nextPhotoSrc = nextPhotoSrc.replace("thumb", "main");
						
	$("#productPhoto").attr("src", nextPhotoSrc);
}