// photoManager.js
// (c) toddfraser designs 2006
// June 28, 2006

var imageArray = ["5-original1",
				  "5-new1",
				  "5-new2",
				  "5-new3",
				  "10-original1",
				  "10-new1",
				  "11-original1",
				  "11-new1",
				  "12-original1",
				  "12-new1",
				  "12-new2",
				  "14-original1",
				  "14-new1",
				  "15-original1",
				  "15-new1",
				  "15-new2",
				  "16-original1",
				  "16-new1",
				  "16-new2",
				  "16-new3",
				  "17-original1",
				  "17-new1",
				  "17-new2",
				  "18-original1",
				  "18-new1",
				  "18-new2",
				  "18-new3",
				  "18-new4",
				  "18-new5",
				  "18-new6"];
var titleArray = ["5th Hole",
				  "5th Hole",
				  "5th Hole",
				  "5th Hole",
				  "10th Hole",
				  "10th Hole",
				  "11th Hole",
				  "11th Hole",
				  "12th Hole",
				  "12th Hole",
				  "12th Hole",
				  "14th Hole",
				  "14th Hole",
				  "15th Hole",
				  "15th Hole",
				  "15th Hole",
				  "16th Hole",
				  "16th Hole",
				  "16th Hole",
				  "16th Hole",
				  "17th Hole",
				  "17th Hole",
				  "17th Hole",
				  "18th Hole",
				  "18th Hole",
				  "18th Hole",
				  "18th Hole",
				  "18th Hole",
				  "18th Hole"];
var subtitleArray = ["Before",
					 "After",
					 "After",
					 "After",
					 "Before",
					 "After",
					 "Before",
					 "After",
					 "Before",
					 "After",
					 "After",
					 "Before",
					 "After",
					 "Before",
					 "After",
					 "After",
					 "Before",
					 "After",
					 "After",
					 "After",
					 "Before",
					 "After",
					 "After",
					 "Before",
					 "After",
					 "After",
					 "After",
					 "After",
					 "After"];
var currentNum = 0;
var imageCount = 29;

function changeImage(num)
{
	currentNum = num;
	document.coursePhoto.src = "images/course/smaller/mini-" + imageArray[num] + ".jpg";
	document.getElementById("photoTitle").innerHTML = titleArray[num];
	document.getElementById("photoSubtitle").innerHTML = subtitleArray[num];
}

function nextImage()
{
	currentNum++;
	if(currentNum >= imageCount) currentNum = 0;
	changeImage(currentNum);
}

function previousImage()
{
	currentNum--;
	if(currentNum < 0) currentNum = (imageCount - 1);
	changeImage(currentNum);
}