
function ImageList_addImage(imageUrl, milliseconds) {
	var count;
	count = this.imageArray.length;
	this.imageArray[count] = imageUrl;
	this.hrefArray[count] = null;
	this.newWindowArray[count] = false;
	this.timeArray[count] = milliseconds;
}

function ImageList_addLinkedImage(imageUrl, hrefUrl, openWindow, milliseconds) {
	var count;
	count = this.imageArray.length;
	this.imageArray[count] = imageUrl;
	this.hrefArray[count] = hrefUrl;
	this.newWindowArray[count] = openWindow;
	this.timeArray[count] = milliseconds;
}

function ImageList_timePoll(milliseconds) {
	this.pollTime += milliseconds;
	if ( this.pollTime >= this.timeArray[this.curImage] ) {
		this.curImage++;
		if ( this.curImage >= this.imageArray.length ) {
			this.curImage = 0;
		}
		this.image.src = this.imageArray[this.curImage];
		this.pollTime = 0;
	}
}

function ImageList_click() {
	var curHref;
	curHref = this.hrefArray[this.curImage];
	if ( curHref != null ) {
		if ( this.newWindowArray[this.curImage] ) {
			window.open(curHref);
		} else {
			window.location = curHref;
		}
	}
}

function ImageList(imageObj) {
	this.image = imageObj;
	imageObj.rotator = this;
	this.imageArray = new Array();
	this.hrefArray = new Array();
	this.newWindowArray = new Array();
	this.timeArray = new Array();
	this.curImage = 0;
	this.pollTime = 0;
	this.addImage = ImageList_addImage;
	this.addLinkedImage = ImageList_addLinkedImage;
	this.timePoll = ImageList_timePoll;
	this.click = ImageList_click;
}

function ImageRotator_addImageList(imageList) {
	var count;
	count = this.imageListArray.length;
	this.imageListArray[count] = imageList;
}

function ImageRotator() {
	this.imageListArray = new Array();
	this.addImageList = ImageRotator_addImageList;
}

function imageRotatorPoller(milliseconds) {
	var loop;
	var curImage;
	for ( loop = 0; loop < imagesToRotate.imageListArray.length; loop++ ) {
		curImage = imagesToRotate.imageListArray[loop];
		curImage.timePoll(milliseconds);
	}
}

var imagesToRotate;
imagesToRotate = new ImageRotator();
setInterval("imageRotatorPoller(100);", 100);
