var hts_showSpeed = 5000

// Duration of crossfade (seconds)
var hts_fadeDuration = 3

var hts_pix = new Array()
hts_pix[0] = 'images/hts_slide/01_hts.jpg'
hts_pix[1] = 'images/hts_slide/02_hts.jpg'
hts_pix[2] = 'images/hts_slide/03_hts.jpg'
hts_pix[3] = 'images/hts_slide/04_hts.jpg'

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

var preLoad = new Array()
for (i = 0; i < p; i++){
   preLoad[i] = new Image()
   preLoad[i].src = hts_pix[i]
   
}

function hts_Show(){

   if (document.all){
      document.images.hts_slides.style.filter="blendTrans(duration=2)"
      document.images.hts_slides.style.filter="blendTrans(duration=crossFadeDuration)"
      document.images.hts_slides.filters.blendTrans.Apply()      
   }
   document.images.hts_slides.src = preLoad[j].src
   if (document.all){
      document.images.hts_slides.filters.blendTrans.Play()
   }
   //Moves the slide show along
   j = j + 1
   //Loops the slideshow
   if (j > (p-1)) j=0 
   t = setTimeout('hts_Show()', hts_showSpeed)
   //alert(j)
}
function goAhead() {
document.images.hts_slides.src = hts_pix[j++]
if(j >(p-1)) j=0
}
function goBack() {
document.images.hts_slides.src = hts_pix[--j]
if(j < 1) j=9
}