// JavaScript Document

window.onload = initLinks;

var myPix = new Array("../images/gallery/chess/chesslarge1.jpg","../images/gallery/chess/chesslarge2.jpg","../images/gallery/chess/chesslarge3.jpg","../images/gallery/chess/chesslarge4.jpg","../images/gallery/chess/chesslarge5.jpg","../images/gallery/chess/chesslarge6.jpg","../images/gallery/chess/chesslarge7.jpg","../images/gallery/chess/chesslarge8.jpg","../images/gallery/chess/chesslarge9.jpg","../images/gallery/chess/chesslarge10.jpg","../images/gallery/chess/chesslarge11.jpg","../images/gallery/chess/chesslarge12.jpg","../images/gallery/chess/chesslarge13.jpg","../images/gallery/chess/chesslarge14.jpg","../images/gallery/chess/chesslarge15.jpg","../images/gallery/chess/chesslarge16.jpg");
var thisPic = 0;

function initLinks() {
	document.getElementById("prevLink").onclick = processPrevious;
	document.getElementById("nextLink").onclick = processNext;
	document.getElementById("smallshot1").onclick = replaceSmallshot1;
	document.getElementById("smallshot2").onclick = replaceSmallshot2;
	document.getElementById("smallshot3").onclick = replaceSmallshot3;
	document.getElementById("smallshot4").onclick = replaceSmallshot4;
	document.getElementById("smallshot5").onclick = replaceSmallshot5;
	document.getElementById("smallshot6").onclick = replaceSmallshot6;
	document.getElementById("smallshot7").onclick = replaceSmallshot7;
	document.getElementById("smallshot8").onclick = replaceSmallshot8;
	document.getElementById("smallshot9").onclick = replaceSmallshot9;
	document.getElementById("smallshot10").onclick = replaceSmallshot10;
	document.getElementById("smallshot11").onclick = replaceSmallshot11;
	document.getElementById("smallshot12").onclick = replaceSmallshot12;
	document.getElementById("smallshot13").onclick = replaceSmallshot13;
	document.getElementById("smallshot14").onclick = replaceSmallshot14;
	document.getElementById("smallshot15").onclick = replaceSmallshot15;
	document.getElementById("smallshot16").onclick = replaceSmallshot16;
}

function processPrevious() {
	if (thisPic == 0) {
		thisPic = myPix.length;
	}
	thisPic--;
	document.getElementById("chessMain").src = myPix[thisPic];
	return false;
}

function processNext() {
	thisPic++;
	if (thisPic == myPix.length) {
		thisPic = 0;
	}
	document.getElementById("chessMain").src = myPix[thisPic];
	return false;
}

function replaceSmallshot1() {
	document.getElementById("chessMain").src = "../images/gallery/chess/chesslarge1.jpg"
	return false;
}

function replaceSmallshot2() {
	document.getElementById("chessMain").src = "../images/gallery/chess/chesslarge2.jpg"
	return false;
}

function replaceSmallshot3() {
	document.getElementById("chessMain").src = "../images/gallery/chess/chesslarge3.jpg"
	return false;
}

function replaceSmallshot4() {
	document.getElementById("chessMain").src = "../images/gallery/chess/chesslarge4.jpg"
	return false;
}

function replaceSmallshot5() {
	document.getElementById("chessMain").src = "../images/gallery/chess/chesslarge5.jpg"
	return false;
}

function replaceSmallshot6() {
	document.getElementById("chessMain").src = "../images/gallery/chess/chesslarge6.jpg"
	return false;
}

function replaceSmallshot7() {
	document.getElementById("chessMain").src = "../images/gallery/chess/chesslarge7.jpg"
	return false;
}

function replaceSmallshot8() {
	document.getElementById("chessMain").src = "../images/gallery/chess/chesslarge8.jpg"
	return false;
}

function replaceSmallshot9() {
	document.getElementById("chessMain").src = "../images/gallery/chess/chesslarge9.jpg"
	return false;
}

function replaceSmallshot10() {
	document.getElementById("chessMain").src = "../images/gallery/chess/chesslarge10.jpg"
	return false;
}

function replaceSmallshot11() {
	document.getElementById("chessMain").src = "../images/gallery/chess/chesslarge11.jpg"
	return false;
}

function replaceSmallshot12() {
	document.getElementById("chessMain").src = "../images/gallery/chess/chesslarge12.jpg"
	return false;
}


function replaceSmallshot13() {
	document.getElementById("chessMain").src = "../images/gallery/chess/chesslarge13.jpg"
	return false;
}

function replaceSmallshot14() {
	document.getElementById("chessMain").src = "../images/gallery/chess/chesslarge14.jpg"
	return false;
}

function replaceSmallshot15() {
	document.getElementById("chessMain").src = "../images/gallery/chess/chesslarge15.jpg"
	return false;
}

function replaceSmallshot16() {
	document.getElementById("chessMain").src = "../images/gallery/chess/chesslarge16.jpg"
	return false;
}






