// Courtesy of SimplytheBest.net (http://simplythebest.net/info/dhtml_scripts.html)

function canManipulateImages() {
	if (document.images)
		return true;
	else
		return false;
}
function loadSlide(imageURL) {
	if (gImageCapableBrowser) {
		if (document.all){
			document.images.slide.style.filter="blendTrans(duration=2)";
			document.images.slide.style.filter="blendTrans(duration=CrossFadeDuration)";
			document.images.slide.filters.blendTrans.Apply();
			document.images.slide.src = imageURL;
		} else {
			document.slide.src = imageURL;
		}
		if (document.all) document.images.slide.filters.blendTrans.Play();
		return false;
	}
	else {
		return true;
	}
}

function runSlideShow(){
if (document.all){
document.images.PictureBox.style.filter="blendTrans(duration=2)";
document.images.PictureBox.style.filter="blendTrans(duration=CrossFadeDuration)";
document.images.PictureBox.filters.blendTrans.Apply();}
document.images.PictureBox.src = preLoad[jss].src;
if (document.getElementById) document.getElementById("CaptionBox").innerHTML= Caption[jss];
if (document.all) document.images.PictureBox.filters.blendTrans.Play();
jss = jss + 1;
if (jss > (pss)) jss=1;
tss = setTimeout('runSlideShow()', SlideShowSpeed);
}

function nextSlide() {
	gCurrentImage = (gCurrentImage + 1) % gNumberOfImages;
	loadSlide(gImages[gCurrentImage]);
}

