function SlideShow(slideList, image, speed, name)          
{
  this.slideList = slideList;
  this.image = image;
  this.speed = speed;
  this.name = name;
  this.current = 0;
  this.timer = 0;
}
SlideShow.prototype.play = SlideShow_play;  
function SlideShow_play()       
{
  with(this)
  {
    if(current++ == slideList.length-1) current = 0;
    if (timer!=0) switchImage(image, slideList[current]);
    clearTimeout(timer);
    timer = setTimeout(name+'.play()', speed);
  }
}

function switchImage(imgName, imgSrc) 
{
  if (document.images)
  {
    if (imgSrc != "none")
    {
		if (document.images[imgName].filters != null) {
		document.images[imgName].style.filter="blendTrans(duration=2)";
		document.images[imgName].filters.blendTrans(duration=2).Apply();
	}
	document.images[imgName].src=imgSrc;
    	if (document.images[imgName].filters != null) {
		document.images[imgName].filters.blendTrans.Play();
	}

	
      //document.images[imgName].src = imgSrc;
    }
  }
}

function startSlides() 
{
	
	if(typeof mySlideShow1 != 'undefined') mySlideShow1.play();
	if(typeof mySlideShow2 != 'undefined') mySlideShow2.play();
	if(typeof mySlideShow3 != 'undefined') mySlideShow3.play();
	if(typeof mySlideShow5 != 'undefined') mySlideShow5.play();
	if(typeof mySlideShow6 != 'undefined') mySlideShow6.play();
	if(typeof mySlideShow7 != 'undefined') mySlideShow7.play();

		
}
