﻿
var timerID=0;
// image array - this array could be filled from the server side it it's
//likely to have a variable number of images

var imgArray = new Array("GeoTrust Logo copy","Test banner copy");

function setupAdbanner() {
	rotateBanner();
	timerID = setInterval("rotateBanner()", 2 * 6000);
}

function cleanupPage() {
	if (timerID)
		clearInterval(timerID);
}

function rotateBanner() {
imgIndex = Math.ceil(Math.random() * imgArray.length) - 1;
if(document.images["mainBanner"] != undefined && document.images["mainBanner"].src != undefined){
document.images["mainBanner"].src= 
"images/home/" + imgArray[imgIndex] + ".jpg";
}
}

