<!-- Original:  CodeLifter.com (support@codelifter.com) -->
<!-- Web Site:  http://www.codelifter.com -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 3500;
// Duration of crossfade (seconds)
var crossFadeDuration = 3;

var t;
// Specify the image files
// to add more images, just continue
// the pattern, adding to the array below

function MultiSlideShow(theImgName) {
	//this['pics'] = thePics;
	this['current'] = 0;
	this['imgName'] = theImgName;
	
	this['preLoad'] = new Array();
	
	//for (i = 0; i < this.pics.length; i++) {
	//	this.preLoad[i] = new Image();
	//	this.preLoad[i].src = this.pics[i];
	//}

	MultiSlideShow.prototype.addImage = function(imgSrc) {
       var img = new Image();
	   img.src = imgSrc;

		this.preLoad[this.preLoad.length] = img;  
 	}
	
	MultiSlideShow.prototype.next = function() {
		this.current = this.current + 1;
		if (this.current > (this.preLoad.length - 1)) {
			this.current = 0;
		}
	
		return this.current;	
	}
	
	MultiSlideShow.prototype.changeImages = function() {
		if (document.all) {
			document.images[this.imgName].style.filter="blendTrans(duration=2)";
			document.images[this.imgName].style.filter="blendTrans(duration=crossFadeDuration)";
			document.images[this.imgName].filters.blendTrans.Apply();
		}

		document.images[this.imgName].src = this.preLoad[this.current].src;
		if (document.all) {
			document.images[this.imgName].filters.blendTrans.Play();
		}
		
		this.next();	
	}
}

function SlideShowManager() {
 this['shows'] = new Array();

 SlideShowManager.prototype.createSlideShow = function(imgName) {
  var show = new MultiSlideShow(imgName);
  this.shows[this.shows.length] = show;

  return show;
 }

 SlideShowManager.prototype.run = function(imgName) {
  for (i = 0; i < this.shows.length; i++) {
   this.shows[i].changeImages();
  }
 }


}



