function SlideImage(id, duration, direction, width)
{
   var millisec = Math.round(duration / 100);
   var timer = 0;
   if (direction == 0)
   {
      for(i = width; i >= 0; i--)
      {
         setTimeout("SetPosition('" + id + "'," + i + ")",(timer * millisec));
         timer++;
      }
   }
   else
   {
      for(i = -width; i <= 0; i++)
      {
         setTimeout("SetPosition('" + id + "'," + i + ")",(timer * millisec));
         timer++;
      }
   }
}
function SetPosition(id, pos)
{
   var element = document.getElementById(id).style;
   element.left = pos;
}

function PreloadImages(images)
{
   var imageObj = new Image();
   var images = new Array();
   for (var i=0; i<=3; i++)
   {
      imageObj.src = images[i];
   }
}

function SlideShow1ShowNext()
   {
      SlideShow1_Index = SlideShow1_Index + 1;
      if (SlideShow1_Index > SlideShow1_Images.length-1)
         SlideShow1_Index = 0;
      document.getElementById('SlideShow1_Fade').src = document.getElementById('SlideShow1').src;
      SetPosition('SlideShow1', 170);
      eval("document.SlideShow1.src = SlideShow1_Images[" + SlideShow1_Index + "][0]");
      setTimeout("SlideShow1ShowNext();", 5000);
      SlideImage('SlideShow1', 1000, 0, 170);
	}
   
