// Slideshow speed (milliseconds)
var Speed = 5000;

// duration for crossfade (seconds)
var FadeDuration = 3;

var Box1Pic = new Array();
var Box2Pic = new Array();
var Box3Pic = new Array();
var Box4Pic = new Array();

// Specify SlideShow images
Box1Pic[1]  = 'img/Slide1.1.jpg';
Box1Pic[2]  = 'img/Slide1.2.jpg';
Box2Pic[1]  = 'img/Slide2.1.jpg';
Box2Pic[2]  = 'img/Slide2.2.jpg';
Box3Pic[1]  = 'img/Slide3.1.jpg';
Box3Pic[2]  = 'img/Slide3.2.jpg';
Box4Pic[1]  = 'img/Slide4.1.jpg';
Box4Pic[2]  = 'img/Slide4.2.jpg';

var tss;
var iss;
var jss = 1;
var pss1 = Box1Pic.length-1;
var pss2 = Box2Pic.length-1;
var pss3 = Box3Pic.length-1;
var pss4 = Box4Pic.length-1;

var preLoad1 = new Array();
for (iss = 1; iss < pss1+1; iss++)
{
 preLoad1[iss] = new Image();
 preLoad1[iss].src = Box1Pic[iss];
}

var preLoad2 = new Array();
for (iss = 1; iss < pss2+1; iss++)
{
 preLoad2[iss] = new Image();
 preLoad2[iss].src = Box2Pic[iss];
}

var preLoad3 = new Array();
for (iss = 1; iss < pss3+1; iss++)
{
 preLoad3[iss] = new Image();
 preLoad3[iss].src = Box3Pic[iss];
}

var preLoad4 = new Array();
for (iss = 1; iss < pss4+1; iss++)
{
 preLoad4[iss] = new Image();
 preLoad4[iss].src = Box4Pic[iss];
}


function runSlideShow(){
 if (document.all)
 {
  document.images.PicBox1.style.filter="blendTrans(duration=2)";
  document.images.PicBox1.style.filter="blendTrans(duration=FadeDuration)";
  document.images.PicBox1.filters.blendTrans.Apply();

  document.images.PicBox2.style.filter="blendTrans(duration=2)";
  document.images.PicBox2.style.filter="blendTrans(duration=FadeDuration)";
  document.images.PicBox2.filters.blendTrans.Apply();

  document.images.PicBox3.style.filter="blendTrans(duration=2)";
  document.images.PicBox3.style.filter="blendTrans(duration=FadeDuration)";
  document.images.PicBox3.filters.blendTrans.Apply();

  document.images.PicBox4.style.filter="blendTrans(duration=2)";
  document.images.PicBox4.style.filter="blendTrans(duration=FadeDuration)";
  document.images.PicBox4.filters.blendTrans.Apply();
 }
 document.images.PicBox1.src = preLoad1[jss].src;
 document.images.PicBox2.src = preLoad2[jss].src;
 document.images.PicBox3.src = preLoad3[jss].src;
 document.images.PicBox4.src = preLoad4[jss].src;
 if (document.all) document.images.PicBox1.filters.blendTrans.Play();
 if (document.all) document.images.PicBox2.filters.blendTrans.Play();
 if (document.all) document.images.PicBox3.filters.blendTrans.Play();
 if (document.all) document.images.PicBox4.filters.blendTrans.Play();
 jss = jss + 1;
 if (jss > (pss1)) jss=1;
 tss = setTimeout('runSlideShow()', Speed);
}
