window.onload=initAll;
var currImg=1;
var captionText=new Array(
	"Test 1;"
	"Test 2;
	"Test 3"
	"Test 4;"
	"Test 5;"
	"Test 6;"
	"Test 7;"
	"Test 8 ;"
	"Test 9;"
	"Test 10;"
)

function initAll() {
     document.getElementById("caption").innerHTML=captionTex[0];
     document.getElementById("prevLink").onclick=processPrevious;
     document.getElementById("nextLink").onclick=processNext;
}

function processPrevious() {
     newSlide(-1);
}

function processNext() {
     newSlide(1);
}

function newSlide(direction) {
     var imgCt=captionText.length;

     currImg=currImg+direction;
     if(currImg<0) {
         curImg=imgCt-1;
     }
     if(currImg==imgCt) {
         currImg=0;
     }

     document.getElementById("slideshow").src="images/slideshow/1" + currImg + ".jpg"
     document.getElementById("captionText").innerHTML=captionText[surrImg]
