﻿function rotateImages(imageArray,imageID,delay,loopCount) {
    
    
    var images = new Array()
    images = imageArray;
    
    var timeout = 0;
    var i
    for (i=0;i<=loopCount-1;i++) {
       for (x in images) {
            setTimeout('fade("'+ imageID +'",'+ '"' + images[x].src + '"'+ ')',timeout);
            timeout = timeout + delay;
        }        
    }
    
    
}

function fade (id,newsrc) {

    var isIE=document.all?true:false;
    var isNS4=document.layers?true:false; 
    var isNS6=navigator.userAgent.indexOf("Gecko")!=-1?true:false;

	if (isIE) {
		document.getElementById(id).style.filter="blendTrans()";
		document.getElementById(id).filters.blendTrans.Apply();
	}
	document.getElementById(id).src = newsrc;
	if (isIE) {
		document.getElementById(id).filters.blendTrans.Play();
	}
	return true;
	
}
