﻿<!-- Original:  D. Keith Higgs (dkh2@po.cwru.edu) -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

var timeDelay = 5; // change delay time in seconds
var Pix = new Array("images/smiling_little_boy.jpg",
"images/smiling_man.jpg",
"images/senior_woman.jpg",
"images/african_american_woman.jpg");

var howMany = Pix.length;
timeDelay *= 1000;
var PicCurrentNum = 0;
var PicCurrent = new Image();
PicCurrent.src = Pix[PicCurrentNum];

function startPix() {
	setInterval("slideshow()", timeDelay);
}

function slideshow() {
	PicCurrentNum++;
	if (PicCurrentNum == howMany) {
		PicCurrentNum = 0;
	}
	PicCurrent.src = Pix[PicCurrentNum];
	document["mainpic"].src = PicCurrent.src;
}


