<!--code called when left slideshow arrow is pressed-->
<!--the images slideshowpic is loaded with the previous image in the sequence-->
<!--if index boardNum reaches 0 then it is reset to the length of the billboard minus 1)-->
function slideLeft() {
if ( boardNum > 0) boardNum--;
else boardNum = billboards.length - 1;
document.slideshowpic.src = billboards[boardNum].src;
}


<!--code called when right slideshow arrow is pressed-->
<!--the images slideshowpic is loaded with the next image in the sequence-->
<!--if index boardNum reaches 4 then it is reset to 0)-->
function slideRight() {
if ( boardNum < billboards.length - 1) boardNum++;
else boardNum = 0;
document.slideshowpic.src = billboards[boardNum].src;
}

/////////////////////////////////////////////////////////////////////////////////////////////
//                                                                                         //
// The next code is for when a slideshow category is set to automatic                      //
// The slides will automaticly change instead of the user having to push the               //
// slideshow next/previous buttons                                                         //
//                                                                                         //
/////////////////////////////////////////////////////////////////////////////////////////////

// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 4000

// Duration of crossfade (seconds)
var crossFadeDuration = 4


var t
var j = 0
var p = billboards.length

function runSlideShow(){
   if (document.all){
      document.images.slideshowpic.style.filter="blendTrans(duration=2)"
      document.images.slideshowpic.style.filter="blendTrans(duration=crossFadeDuration)"
      document.images.slideshowpic.filters.blendTrans.Apply()      
   }
   document.images.slideshowpic.src = billboards[j].src
   if (document.all){
      document.images.slideshowpic.filters.blendTrans.Play()
   }
   j = j + 1
   if (j > (p-1)) j=0
   t = setTimeout('runSlideShow()', slideShowSpeed)
}
