// (C) 2000 www.CodeLifter.com
// http://www.codelifter.com
// Free for all users, but leave in this  header
// NS4-6,IE4-6
// Fade effect only in IE; degrades gracefully

// =======================================
// set the following variables
// =======================================

// Set slideShowSpeed (milliseconds)
var slideShowSpeed1 = 5000;


// Duration of crossfade (seconds)
var crossFadeDuration = 3;

// Specify the image files
var Pic1 = new Array();
var Pic2 = new Array();
var Pic3 = new Array();
var Pic4 = new Array();
var Pic5 = new Array();
// to add more images, just continue
// the pattern, adding to the array below

Pic1[0] = 'images/picture-frame5.jpg';

Pic1[1] = 'images/picture-frame1.jpg';

Pic1[2] = 'images/picture-frame2.jpg';

Pic1[3] = 'images/picture-frame3.jpg';

Pic1[4] = 'images/picture-frame4.jpg';

// =======================================
// do not edit anything below this line
// =======================================

var t;
var p1 = Pic1.length;
var p2 = Pic2.length;
var p3 = Pic3.length;
var p4 = Pic4.length;

var preLoad1 = new Array();
for (i = 0; i < p1; i++)
{
   preLoad1[i] = new Image();
   preLoad1[i].src = Pic1[i];
}

var preLoad2 = new Array();
for (i = 0; i < p2; i++)
{
   preLoad2[i] = new Image();
   preLoad2[i].src = Pic2[i];
}

var preLoad3 = new Array();
for (i = 0; i < p3; i++)
{
   preLoad3[i] = new Image();
   preLoad3[i].src = Pic3[i];
}

var preLoad4 = new Array();
for (i = 0; i < p4; i++)
{
   preLoad4[i] = new Image();
   preLoad4[i].src = Pic4[i];
}

var j = 0;
function runSlideShow1()
{
   if (document.all)
   {
      document.images.SlideShow1.style.filter="blendTrans(duration=2)";
      document.images.SlideShow1.style.filter="blendTrans(duration=crossFadeDuration)";
      document.images.SlideShow1.filters.blendTrans.Apply();
   }

   document.images.SlideShow1.src = preLoad1[j].src;
   if (document.all)
   {
      document.images.SlideShow1.filters.blendTrans.Play();
   }

   j = j + 1;
   if (j > (p1-1)) j=0;
   t = setTimeout('runSlideShow1()', slideShowSpeed1);
}

j = 0;
function runSlideShow2()
{
   if (document.all)
   {
      document.images.SlideShow2.style.filter="blendTrans(duration=2)";
      document.images.SlideShow2.style.filter="blendTrans(duration=crossFadeDuration)";
      document.images.SlideShow2.filters.blendTrans.Apply();
   }

   document.images.SlideShow2.src = preLoad2[j].src;
   if (document.all)
   {
      document.images.SlideShow2.filters.blendTrans.Play();
   }

   j = j + 1;
   if (j > (p2-1)) j=0;
   t = setTimeout('runSlideShow2()', slideShowSpeed2);
}

j = 0;
function runSlideShow3()
{
   if (document.all)
   {
      document.images.SlideShow3.style.filter="blendTrans(duration=2)";
      document.images.SlideShow3.style.filter="blendTrans(duration=crossFadeDuration)";
      document.images.SlideShow3.filters.blendTrans.Apply();
   }

   document.images.SlideShow3.src = preLoad3[j].src;
   if (document.all)
   {
      document.images.SlideShow3.filters.blendTrans.Play();
   }

   j = j + 1;
   if (j > (p3-1)) j=0;
   t = setTimeout('runSlideShow3()', slideShowSpeed3);
}

j = 0;
function runSlideShow4()
{
   if (document.all)
   {
      document.images.SlideShow4.style.filter="blendTrans(duration=2)";
      document.images.SlideShow4.style.filter="blendTrans(duration=crossFadeDuration)";
      document.images.SlideShow4.filters.blendTrans.Apply();
   }

   document.images.SlideShow4.src = preLoad4[j].src;
   if (document.all)
   {
      document.images.SlideShow4.filters.blendTrans.Play();
   }

   j = j + 1;
   if (j > (p4-1)) j=0;
   t = setTimeout('runSlideShow4()', slideShowSpeed4);
}