<!-- Original:  Mike Canonigo (mike@canonigo.com) -->
<!-- Web Site:  http://www.munkeehead.com -->
<!-- Customised (a lot):  David Allen (david@serina.co.uk) -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
var ImgNum = 0;
var ImgLength = 12;
var ImgPath = "images/Thumbnails/images/";
//Time delay between Slides in milliseconds
var delay = 3500;
var auto=false;
var run;
var ImgPrefix="TPG00";
var ImgStart=1;
var Captions = new Array;
Captions[1]="We created the design on paper first<br>&nbsp;";
Captions[2]="We took the canvas to Mr Putt the sail maker<br>&nbsp;";
Captions[3]="He sewed it together to make a 12 foot square canvas<br>&nbsp;";
Captions[4]="We borrowed a large conservatory,<br>&nbsp;and spent 9 hours drawing the labyrinth";
Captions[5]="We needed a lot of help<br>&nbsp;";
Captions[6]="We needed a lot of help<br>&nbsp;";
Captions[7]="Barbara experimented with how to paint the labyrinth<br>&nbsp;";
Captions[8]="We started to paint the labyrinth on Dorothy's kitchen table<br>&nbsp;";
Captions[9]="and painted...<br>&nbsp;";
Captions[10]="...and...<br>&nbsp;";
Captions[11]="finally...<br>&nbsp;";
Captions[12]="The Labyrinth<br>&nbsp;";

function chgAlbum(a) {
	ImgPrefix=a.value.substr(a.value.length-13,5);
	ImgPath=a.value.substr(4,a.value.length-17)+"thumbnails/";
	ImgLength=stripZeros(a.value.substr(a.value.length-8,4))-0;
	ImgStart=stripZeros(a.value.substr(0,4))-0;
	ImgNum=ImgStart;
	chgImg(0);
}

function leadingzeros(n) {
	y=(n/10000).toFixed(4)+"";
	y=y.substr(2,4);
	return y;
}
function stripZeros(inputStr) {
	var result = inputStr
	while (result.substring(0,1) == "0") {
		result = result.substring(1,result.length)
	}
	return result
}

function chgImg(direction) {
	if (document.images) {
		if (auto==true) {
			window.clearInterval(run);
			run = setInterval("chgImg(1)", delay);
		}
		slideshow=document.getElementById("sl");
		caption=document.getElementById("cap");
		ImgNum = ImgNum + direction;
		if (ImgNum > ImgLength) {ImgNum = ImgStart;}
		if (ImgNum < ImgStart) {ImgNum = ImgLength;}
		slideshow.src = ImgPath+ImgPrefix+leadingzeros(ImgNum+.01)+".jpg";
		caption.innerHTML=Captions[ImgNum];
	}
}
function autorun() {
	play=document.getElementById("Play");
	if (auto == true) {
		auto = false;
		window.clearInterval(run);
		play.innerHTML="Play";
	} else {
		auto = true;
		play.innerHTML="Stop";
		run = setInterval("chgImg(1)", 1000);
	}
}
//  End -->
