var mySlideList1 = ['imgs/gepi1.gif','imgs/gepi2.gif','imgs/gepi3.gif','imgs/gepi4.gif','imgs/gepi5.gif','imgs/gepi6.gif','imgs/gepi7.gif','imgs/gepi8.gif','imgs/gepi9.gif','imgs/gepi10.gif','imgs/gepi11.gif','imgs/gepi12.gif','imgs/gepi13.gif','imgs/gepi14.gif'];
var mySlideShow1 = new SlideShow(mySlideList1, 'slide1', 4000, "mySlideShow1");

function SlideShow(slideList, image, speed, name)          
{
	this.slideList = slideList;
	this.image = image;
	this.speed = speed;
	this.name = name;
	this.current = Math.round((Math.random() * slideList.length) - 1);
	this.timer = 0;
	// Set a random image
	//document.images[this.image].src = slideList[this.current];
}
SlideShow.prototype.play = SlideShow_play;  
function SlideShow_play()       
{
	with(this)
	{
		if(current++ == slideList.length-1) current = 0;
		switchImage(image, slideList[current]);
		clearTimeout(timer);
		timer = setTimeout(name+'.play()', speed);
	}
}
function switchImage(imgName, imgSrc) 
{
	if (document.images)
	{
		if (imgSrc != "none")
		{
		  document.images[imgName].src = imgSrc;
		}
	}
}
