// JavaScript Document

myPix = new Array("one.png","two.png","three.png")
imgCt = myPix.length 
function choosePic() {
	if (document.images) {
		randomNum = Math.floor((Math.random() * imgCt))
		document.banner.src = myPix[randomNum]
	}
}

var bannerImg = new Array();
  // Enter the names of the images below
  bannerImg[00]="./files/one.png";
  bannerImg[01]="./files/two.png";
  bannerImg[02]="./files/three.png";

var newBanner = 0;
var totalBan = bannerImg.length;

function cycleBan() {
  //newBanner++;
  randomNum = Math.floor((Math.random() * totalBan))
  //if (newBanner == totalBan) {
  //  newBanner = 0;
  //}
  document.banner.src=bannerImg[randomNum];
  // set the time below for length of image display
  // i.e., "4*1000" is 4 seconds
  setTimeout("cycleBan()", 4*1000);
}
window.onload=cycleBan;


