<!DOCTYPE html>
<html >
<head>
<title></title>
<script>
function rotate(imageNumber) {
var myimage = new Array;
//Modify these variables as needed
//vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
myimage.push("image1.jpg");
myimage.push("image2.jpg"); //Add additional
myimage.push("image3.jpg"); //myimage.push()
myimage.push("image4.jpg"); //for each image
//myimage.push... etc.
var time = 5000; //5000 milliseconds = 5 seconds
//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
var image = document.getElementById('rotator');
if (imageNumber < myimage.length) {
image.src = myimage[imageNumber];
imageNumber++;
}
else {
imageNumber = 0;
image.src = myimage[imageNumber];
imageNumber++;
}
var t = setTimeout("rotate(" + imageNumber + ")", time);
}
</script>
</head>
<body onload="rotate(0);">
<div>
<img src="image1.jpg" id="rotator" />
</div>
</body>
</html>