function makeSlideShow(idElement, speed, width, height) {
	object = document.getElementById(idElement);
	object.style.width = width + "px";
	object.style.height = height + "px";
	object.style.cssFloat = "left";
	this.alphaShow = 0;
	this.alphaFade = 100;
	this.currentImage = 0;
	this.currentImage = 0;
	this.animationSpeed = speed;
	this.images = object.getElementsByTagName("img");
	this.objectLength = this.images.length;



/*******************************************************************************/

	// Testing for slide show without fading 2007-09-02-0949 
	if (this.animationSpeed == 0) {

		for (i = 0; i < this.objectLength; i++) {
			this.images[i].style.width = width + "px";
			this.images[i].style.height = height + "px";
			this.images[i].style.position = "absolute";
			// this.images[i].style.filter = "alpha(opacity = 0)";
			// this.images[i].style.opacity = "0";
			// this.images[i].style.mozOpacity = "0";
		}
		window.setInterval("", 500);

/*******************************************************************************/

	} else {
		for (i = 0; i < this.objectLength; i++) {
			this.images[i].style.width = width + "px";
			this.images[i].style.height = height + "px";
			this.images[i].style.position = "absolute";
			this.images[i].style.filter = "alpha(opacity = 0)";
			this.images[i].style.opacity = "0";
			this.images[i].style.mozOpacity = "0";
		}
		var _this = this;
		var startShow = window.setInterval(
			function() { 
				_this.engine()
			} , this.animationSpeed * 1 
		);  // very slow = 1000, very fast = 1
	}
}
 

makeSlideShow.prototype.engine = function() {
	this.nextImage = this.currentImage + 1 < this.objectLength ? this.currentImage + 1 : 0;
	this.images[this.currentImage].style.filter = "alpha(opacity =" + this.alphaFade + ")";
	this.images[this.currentImage].style.opacity = 
		this.alphaFade < 10 ? "0.0" + this.alphaFade : 
			this.alphaFade >= 10 && this.alphaFade < 100 ? "0." + this.alphaFade : 1.0;

	this.images[this.currentImage ].style.mozOpacity = this.alphaFade < 10 ? 
		"0.0" + this.alphaFade : this.alphaFade >= 10 && this.alphaFade < 100 ? "0." + this.alphaFade : 1.0;
 
	this.images[this.nextImage].style.filter = "alpha(opacity=" + this.alphaShow + ")";
	this.images[this.nextImage].style.opacity = this.alphaShow < 10 ? 
		"0.0" + this.alphaShow : this.alphaShow >= 10 && this.alphaShow < 100 ? "0." + this.alphaShow : 1.0;
	this.images[this.nextImage].style.mozOpacity = this.alphaShow < 10 ? 
		"0.0" + this.alphaShow : this.alphaShow >= 10 && this.alphaShow < 100 ? "0." + this.alphaShow : 1.0;

	this.alphaFade = this.alphaFade - 2;
	this.alphaShow = this.alphaShow + 2;
 
	if (this.alphaFade == 100 || this.alphaShow == 100) {
    this.alphaFade = 100;
    this.alphaShow = 0;
    this.currentImage = this.currentImage + 1 > this.objectLength-1 ? 0 : this.currentImage + 1;
	}
}

