var slideShowSpeed = 3000
var crossFadeDuration = 3
var Pic = new Array() 
Pic[0] = 'imagens/topo_rand/11.jpg'
Pic[1] = 'imagens/topo_rand/05.jpg'
Pic[2] = 'imagens/topo_rand/10.jpg'
Pic[3] = 'imagens/topo_rand/02.jpg'
Pic[4] = 'imagens/topo_rand/17.jpg'
Pic[5] = 'imagens/topo_rand/08.jpg'
Pic[6] = 'imagens/topo_rand/01.jpg'
Pic[7] = 'imagens/topo_rand/14.jpg'
Pic[8] = 'imagens/topo_rand/04.jpg'
Pic[9] = 'imagens/topo_rand/09.jpg'
Pic[10] = 'imagens/topo_rand/15.jpg'
Pic[11] = 'imagens/topo_rand/06.jpg'
Pic[12] = 'imagens/topo_rand/16.jpg'
Pic[13] = 'imagens/topo_rand/03.jpg'
Pic[14] = 'imagens/topo_rand/12.jpg'
Pic[15] = 'imagens/topo_rand/13.jpg'
Pic[16] = 'imagens/topo_rand/07.jpg'

var t
var j = 0
var p = Pic.length

var preLoad = new Array()
for (i = 0; i < p; i++){
   preLoad[i] = new Image()
   preLoad[i].src = Pic[i]
}

function runSlideShow(){
   if (document.all){
      document.images.SlideShow.style.filter="blendTrans(duration=2)"
      document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)"
      document.images.SlideShow.filters.blendTrans.Apply()      
   }
   document.images.SlideShow.src = preLoad[j].src
   if (document.all){
      document.images.SlideShow.filters.blendTrans.Play()
   }
   j = j + 1
   if (j > (p-1)) j=0
   t = setTimeout('runSlideShow()', slideShowSpeed)
}

