 var mySlideList1 = ['img/home/001.jpg', 'img/home/001h.jpg', 'img/home/002.jpg','img/home/002h.jpg','img/home/003.jpg','img/home/003h.jpg','img/home/004.jpg','img/home/004h.jpg','img/home/005.jpg','img/home/005h.jpg','img/home/006.jpg','img/home/006h.jpg'];
var mySlideShow1 = new SlideShow(mySlideList1, 'slide1',7000, "mySlideShow1");

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;
    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;
    }
  }
}

