// Funcoes globais

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}



// JavaScript Document

// (C) 2000 www.CodeLifter.com
// http://www.codelifter.com
// Free for all users, but leave in this  header
// NS4-6,IE4-6
// Fade effect only in IE; degrades gracefully

// =======================================
// set the following variables
// =======================================

// Set slideshowSpeed (milliseconds)
var slideshowSpeed = 3000

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

// Specify the image files
var Pic = new Array() // don't touch this
// to add more images, just continue
// the pattern, adding to the array below

Pic[0]  = 'imagens/home_1.jpg'
Pic[1]  = 'imagens/home_2.jpg'
Pic[2]  = 'imagens/home_3.jpg'
Pic[3]  = 'imagens/home_4.jpg'
Pic[4]  = 'imagens/home_5.jpg'
Pic[5]  = 'imagens/home_6.jpg'
Pic[6]  = 'imagens/home_7.jpg'
Pic[7]  = 'imagens/home_8.jpg'
Pic[8]  = 'imagens/home_9.jpg'

// =======================================
// do not edit anything below this line
// =======================================

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)
}
// o proximo passo é colocar uma imagem com nome "slideshow" (em minusculas !)
// e <body onload="runslideshow();">

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}

}