window.onload = function() {
	setInterval(imageroller_timeout, 3000);
}

function imageroller_timeout() {
	if (document.images) {
		for (var i = 0; i < document.images.length; ++i) {
			var imageList = document.images[i].getAttribute('imagelist');
			if(imageList != null) {
				var imageArray = imageList.split('|');
				var currentIndex = document.images[i].getAttribute('imagelist_currentindex');
				if (currentIndex == null) {
					currentIndex = 0;
				}
					
				currentIndex = ++currentIndex % imageArray.length;
				document.images[i].src = imageArray[currentIndex];
				document.images[i].setAttribute('imagelist_currentindex', currentIndex);
			}
		}
	}
}

