// Set the slideshow speed (in milliseconds)
var SlideShowRate = 2000;

// Set the duration of crossfade (in seconds)
var CFadeDuration = 2;

var Picture = new Array(); 
// Specify the image files...

Picture[1]  = '../assets/media/images/boomer/configuration_frames/f00_start.jpg';
Picture[2]  = '../assets/media/images/boomer/configuration_frames/f01_fuel.jpg';
Picture[3]  = '../assets/media/images/boomer/configuration_frames/f02_cargo.jpg';
Picture[4]  = '../assets/media/images/boomer/configuration_frames/f03_troops.jpg';
Picture[5]  = '../assets/media/images/boomer/configuration_frames/f04_patients.jpg';
Picture[6]  = '../assets/media/images/boomer/configuration_frames/f05_all.jpg';


var ltss;
var iss;
var jss = 1;
var pss = Picture.length-1;

var preLoad = new Array();
for (iss = 1; iss < pss+1; iss++){
preLoad[iss] = new Image();
preLoad[iss].src = Picture[iss];}

function runSlideShow(){
   document.images.PictureBox.src = preLoad[jss].src;
   jss = jss + 1;
   if (jss > (pss)) {
	   jss=1;
	   }
   ltss = setTimeout('runSlideShow()', SlideShowRate);
}

function runSlideShowFade(){
if (this.document.all){
	this.document.images.PictureBox.style.filter="blendTrans(duration=2)";
	this.document.images.PictureBox.style.filter="blendTrans(duration=CFadeDuration)";
	this.document.images.PictureBox.filters.blendTrans.Apply();
}
this.document.images.PictureBox.src = preLoad[jss].src;

if (this.document.all) {
	this.document.images.PictureBox.filters.blendTrans.Play();
	jss = jss + 1;
}
if (jss > (pss)) {
	jss=1;
}
ltss = setTimeout('runSlideShow()', SlideShowRate);
// ltss = setInterval('runSlideShow()', SlideShowRate);
}
// end slide show 

function clickSlide(thisIss) {
	this.document.images.PictureBox.src = Picture[thisIss];
	stopSlideShow();
}
function stopSlideShow() {
if (this.document.all){
	//alert("stopped");
	//document.images.PictureBox.filters.blendTrans.Stop();
	this.clearTimeout(ltss);
	}	
}
