 
//Place the following script in the head of the page.
//Follow the set-up instructions within the script.


// (C) 2002 www.CodeLifter.com
// http://www.codelifter.com
// Free for all users, but leave in this header.

// ==============================
// Set the following variables...
// ==============================

function rand(l,u) // lower bound and upper bound
 {
     return Math.floor((Math.random() * (u-l+1))+l);
 }
 
 //Usage
 //alert(rand(4000,8000));
 
// Set the slideshow speed (in milliseconds)
var SlideShowSpeed = rand(3000,5000); 
//var SlideShowSpeed2 = rand(4000,8000); 
//var SlideShowSpeed3 = rand(4000,8000); 

// Set the duration of crossfade (in seconds)
var CrossFadeDuration = 3;

var Picture = new Array(); // don't change this
//var MiddlePicture = new Array();
//var LastPicture = new Array();

//var Caption = new Array(); // don't change this

// Specify the image files...
// To add more images, just continue
// the pattern, adding to the array below.
// To use fewer images, remove lines
// starting at the end of the Picture array.
// Caution: The number of Pictures *must*
// equal the number of Captions!

Picture[1]  = '/images/formatting/homeb1.jpg';
Picture[2]  = '/images/formatting/homeb2.jpg';
Picture[3]  = '/images/formatting/homeb5.jpg';
Picture[4]  = '/images/formatting/homeb4.jpg';

//MiddlePicture[1]  = '/images/formatting/home_cvs.jpg';
//MiddlePicture[2]  = '/images/formatting/home_shell.jpg';
//MiddlePicture[3]  = '/images/formatting/home_rapidlube.jpg';

//LastPicture[1]  = '/images/formatting/home_mcd.jpg';
//LastPicture[2]  = '/images/formatting/home_chevron.jpg';
//LastPicture[3]  = '/images/formatting/home_seating.jpg';

// Specify the Captions...
// To add more captions, just continue
// the pattern, adding to the array below.
// To use fewer captions, remove lines
// starting at the end of the Caption array.
// Caution: The number of Captions *must*
// equal the number of Pictures!

//Caption[1]  = "&nbsp;";
//Caption[2]  = "&nbsp;";
//Caption[3]  = "&nbsp;";
//Caption[4]  = "&nbsp;";
//Caption[5]  = "&nbsp;";

// =====================================
// Do not edit anything below this line!
// =====================================

var tss;
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(){
if (document.all){
document.images.PictureBox.style.filter="blendTrans(duration=2)";
document.images.PictureBox.style.filter="blendTrans(duration=CrossFadeDuration)";
document.images.PictureBox.filters.blendTrans.Apply();}
document.images.PictureBox.src = preLoad[jss].src;
//if (document.getElementById) document.getElementById("CaptionBox").innerHTML= Caption[jss];
if (document.all) document.images.PictureBox.filters.blendTrans.Play();
jss = jss + 1;
if (jss > (pss)) jss=1;
tss = setTimeout('runSlideShow()', SlideShowSpeed);
}


//var tss2;
//var iss2;
//var jss2 = 1;
//var pss2 = MiddlePicture.length-1;

//var preLoadMiddle = new Array();
//for (iss2 = 1; iss2 < pss2+1; iss2++){
//preLoadMiddle[iss2] = new Image();
//preLoadMiddle[iss2].src = MiddlePicture[iss2];}

//function runSlideShow2(){
//if (document.all){
//document.images.MiddlePictureBox.style.filter="blendTrans(duration=2)";
//document.images.MiddlePictureBox.style.filter="blendTrans(duration=CrossFadeDuration)";
//document.images.MiddlePictureBox.filters.blendTrans.Apply();}
//document.images.MiddlePictureBox.src = preLoadMiddle[jss2].src;
//if (document.getElementById) document.getElementById("CaptionBox").innerHTML= Caption[jss];
//if (document.all) document.images.MiddlePictureBox.filters.blendTrans.Play();
//jss2 = jss2 + 1;
//if (jss2 > (pss2)) jss2=1;
//tss2 = setTimeout('runSlideShow2()', SlideShowSpeed2);
//}


//var tss3;
//var iss3;
//var jss3 = 1;
//var pss3 = LastPicture.length-1;

//var preLoadLast = new Array();
//for (iss3 = 1; iss3 < pss3+1; iss3++){
//preLoadLast[iss3] = new Image();
//preLoadLast[iss3].src = LastPicture[iss3];}

//function runSlideShow3(){
//if (document.all){
//document.images.LastPictureBox.style.filter="blendTrans(duration=2)";
//document.images.LastPictureBox.style.filter="blendTrans(duration=CrossFadeDuration)";
//document.images.LastPictureBox.filters.blendTrans.Apply();}
//document.images.LastPictureBox.src = preLoadLast[jss3].src;
//if (document.getElementById) document.getElementById("CaptionBox").innerHTML= Caption[jss];
//if (document.all) document.images.LastPictureBox.filters.blendTrans.Play();
//jss3 = jss3 + 1;
//if (jss3 > (pss3)) jss3=1;
//tss3 = setTimeout('runSlideShow3()', SlideShowSpeed3);
//}

function runSlides(){
  runSlideShow();
  //runSlideShow2();
  //runSlideShow3();
}