// Set ROTATESpeed (milliseconds)
var ROTATESpeed = 5000

// Duration of crossROTATE (seconds)
var crossROTATEDuration = 3

// Specify the image files
var BANNER = new Array() // don't touch this
// to add more images, just continue
// the pattern, adding to the array below

BANNER[0]  = '/coldwellbanker/images/rotate/1.jpg'
BANNER[1]  = '/coldwellbanker/images/rotate/2.jpg'
BANNER[2]  = '/coldwellbanker/images/rotate/3.jpg'
BANNER[3]  = '/coldwellbanker/images/rotate/4.jpg'
BANNER[4]  = '/coldwellbanker/images/rotate/5.jpg'


var t
var j = 0
var p = BANNER.length

var preLoad = new Array()
for (i = 0; i < p; i++){
   preLoad[i] = new Image()
   preLoad[i].src = BANNER[i]
}

function runROTATE(){
   if (document.all){
      document.images.ROTATE.style.filter="blendTrans(duration=2)"
      document.images.ROTATE.style.filter="blendTrans(duration=crossROTATEDuration)"
      document.images.ROTATE.filters.blendTrans.Apply()      
   }
   document.images.ROTATE.src = preLoad[j].src
   if (document.all){
      document.images.ROTATE.filters.blendTrans.Play()
   }
   j = j + 1
   if (j > (p-1)) j=0
   t = setTimeout('runROTATE()', ROTATESpeed)
}
