// Slideshow JS
if(imgList == undefined){
	var imgList = new Array();
}

var myImages = new Array();
for (var i=0; i<imgList.length; i++){
	myImages[i] = new Image();
	myImages[i].src = imgList[i];
}

var current = -1;

function swap(){
	if(document.images){
		var next = current + 1;
		if(next >= imgList.length) next = 0;
		if(myImages[next] && myImages[next].complete){
			var target = document.getElementById('myImage');
			var caption = document.getElementById('imgCaption');
			if(target){
				target.src = myImages[next].src;
				caption.innerHTML = capList[next];
				current = next;
			}
			setTimeout('swap()',3000);
		}
	}else{
		setTimeout('swap()',500);
	}
}

setTimeout('swap()',3000);