var delay=10000
var curindex=0

var Banner=new Array()

	Banner[0]="../PT/fotosctr/bannereng_04.jpg"
	Banner[1]="../PT/fotosctr/bannereng_02.jpg"
	Banner[2]="../PT/fotosctr/bannereng_01.jpg"
	Banner[3]="../PT/fotosctr/bannereng_03.jpg"
	Banner[4]="../PT/fotosctr/bannereng_05.jpg"

var preload=new Array()

for (n=0;n<Banner.length;n++)
{
	preload[n]=new Image()
	preload[n].src=Banner[n]
}

document.write('<img name="viva_intensamente" '+Banner[Math.floor(Math.random()*(Banner.length))]+'>')

function rotateimage(){
if (curindex==(tempindex=Math.floor(Math.random()*(Banner.length)))){
curindex=curindex==0? 1 : curindex-1
}
else
curindex=tempindex

	document.images.viva_intensamente.src=Banner[curindex]
}

setInterval("rotateimage()",delay)

