var imgArray;
var globalSpeed = 2500; // DURATION OF IMAGE (MILLISECONDS), SET TRANSITION DURATION IN IMG TAG
var globalCount = 0;
var looper;
var imageCount=6;
var srcPath="Images/HomePageAnim/image";


if ((navigator.userAgent.indexOf("MSIE")>0) && (navigator.userAgent.indexOf("Windows")>0) && (navigator.userAgent.indexOf("Opera")<=0)) {isIE=true} 
else {isIE=false}

function startAnimation() {
	imgArray = new Array();
	for (i=0;i<imageCount;i++) {
		obj=new Image();
		obj.src = srcPath + (i + 1) + ".jpg";
		imgArray[i] = obj;
		}
	changeImg();
	if ((document.getElementById) && (document.getElementById("Rotator"))) {looper=window.setInterval("changeImg()",globalSpeed)}
	}

function changeImg() {
	var elemRotator=document.getElementById("Rotator");
	if (isIE) {elemRotator.filters.blendTrans.Apply()}
	elemRotator.src = imgArray[globalCount].src;
	if (isIE) {elemRotator.filters.blendTrans.play()}
	globalCount++;
	if (globalCount>(imageCount - 1)) {globalCount=0}
	}
