// JavaScript Document

var gallery = new Array(10);
var maxGallery = 6;


function loadGallery(aNumber) {
	switch(aNumber) {
	  case 2:
		gallery[0] = new Picture("1097-11.jpg", "1097-11");
		gallery[1] = new Picture("1097-12.jpg", "1097-12");
		gallery[2] = new Picture("1097-13.jpg", "1097-13");
		gallery[3] = new Picture("1097-14.jpg", "1097-14");
		gallery[4] = new Picture("1097-15.jpg", "1097-15");
		gallery[5] = new Picture("1097-16.jpg", "1097-16");
		gallery[6] = new Picture("1097-17.jpg", "1097-17");
		gallery[7] = new Picture("1097-18.jpg", "1097-18");
		gallery[8] = new Picture("1097-19.jpg", "1097-19");
		gallery[9] = new Picture("1097-20.jpg", "1097-20");
		break;
	  case 3:
		gallery[0] = new Picture("1097-21.jpg", "1097-21");
		gallery[1] = new Picture("1097-22.jpg", "1097-22");
		gallery[2] = new Picture("1097-23.jpg", "1097-23");
		gallery[3] = new Picture("1097-24.jpg", "1097-24");
		gallery[4] = new Picture("1097-25.jpg", "1097-25");
		gallery[5] = new Picture("1097-26.jpg", "1097-26");
		gallery[6] = new Picture("1097-27.jpg", "1097-27");
		gallery[7] = new Picture("1097-28.jpg", "1097-28");
		gallery[8] = new Picture("1097-29.jpg", "1097-29");
		gallery[9] = new Picture("1097-30.jpg", "1097-30");
		break;
	  case 4:
		gallery[0] = new Picture("1097-31.jpg", "1097-31");
		gallery[1] = new Picture("1097-32.jpg", "1097-32");
		gallery[2] = new Picture("1097-33.jpg", "1097-33");
		gallery[3] = new Picture("1097-34.jpg", "1097-34");
		gallery[4] = new Picture("1097-35.jpg", "1097-35");
		gallery[5] = new Picture("1097-36.jpg", "1097-36");
		gallery[6] = new Picture("1097-37.jpg", "1097-37");
		gallery[7] = new Picture("1097-38.jpg", "1097-38");
		gallery[8] = new Picture("1097-39.jpg", "1097-39");
		gallery[9] = new Picture("1097-40.jpg", "1097-40");
		break;
	  case 5:
		gallery[0] = new Picture("1097-41.jpg", "1097-41");
		gallery[1] = new Picture("1097-42.jpg", "1097-42");
		gallery[2] = new Picture("1097-43.jpg", "1097-43");
		gallery[3] = new Picture("1097-44.jpg", "1097-44");
		gallery[4] = new Picture("1097-45.jpg", "1097-45");
		gallery[5] = new Picture("1097-46.jpg", "1097-46");
		gallery[6] = new Picture("1097-47.jpg", "1097-47");
		gallery[7] = new Picture("1097-48.jpg", "1097-48");
		gallery[8] = new Picture("1097-49.jpg", "1097-49");
		gallery[9] = new Picture("1097-50.jpg", "1097-50");
		break;
	  case 6:
		gallery[0] = new Picture("1097-51.jpg", "1097-51");
		gallery[1] = new Picture("1097-52.jpg", "1097-52");
		gallery[2] = new Picture("1097-53.jpg", "1097-53");
		gallery[3] = new Picture("1097-54.jpg", "1097-54");
		break;
	  default:		
		gallery[0] = new Picture("1097-01.jpg", "1097-01");
		gallery[1] = new Picture("1097-02.jpg", "1097-02");
		gallery[2] = new Picture("1097-03.jpg", "1097-03");
		gallery[3] = new Picture("1097-04.jpg", "1097-04");
		gallery[4] = new Picture("1097-05.jpg", "1097-05");
		gallery[5] = new Picture("1097-06.jpg", "1097-06");
		gallery[6] = new Picture("1097-07.jpg", "1097-07");
		gallery[7] = new Picture("1097-08.jpg", "1097-08");
		gallery[8] = new Picture("1097-09.jpg", "1097-09");
		gallery[9] = new Picture("1097-10.jpg", "1097-10");		
		break;
	}
}	

function Picture(aPicture, aDesc) {
	this.picture = aPicture;
	this.desc = aDesc;
}

function getStartingPicText() {
	return "<img src=\"pics/" + gallery[0].picture + "\" name=\"MainImage\"><br>";
}

function getStartingPicDesc() {
	return gallery[0].desc;
}

function getStartingPic() {
	return gallery[0].picture;
}

function getThumbText(aNumber) {
	return "<a href=\"javascript:update('pics/" + gallery[aNumber -1].picture + "', 9);\" onClick=\"document.OrderForm.item_name.value= '" + gallery[aNumber -1].desc + "';document.OrderForm.os0.value='" + gallery[aNumber -1].picture + "';\"> <img src=\"thumbnails/" + gallery[aNumber -1].picture + "\" border=\"0\">";

}


function getGalleryTitle() {
	return "Belgian Warmblood Inspection"
} 

function getGalleryDescription() {
	return "Photographed by Rick Bate.";
}
