/*
 * listaFotos: lista de imagens do slideshow
 * tempoFotos: tempo, em segundos, em que cada foto será exibida
 */

var listaFotos = ["01.jpg", "02.jpg", "03.jpg", "04.jpg", "05.jpg", "06.jpg", "07.jpg", "08.jpg", "09.jpg", "10.jpg"];
var tempoFotos = 3;


/// NÃO MODIFIQUE NADA A PARTIR DAQUI

var caminhoImagens = "/imagens/capa/";

var slideShow = {
	atual: 0,

	iniciar: function () {
		setInterval("slideShow.iterar()", parseInt(tempoFotos) * 1000);
	},

	iterar: function () {
		if (++this.atual == listaFotos.length)
			this.atual = 0;

		mudarImagem("slideshow", caminhoImagens+listaFotos[this.atual]);
	},

	preCarregar: function () {
		document.imageArray = new Array(listaFotos.length);

		for(i in listaFotos) {
			document.imageArray[i] = new Image;
			document.imageArray[i].src = caminhoImagens+listaFotos[i];
		}
	}
}

slideShow.preCarregar();
window.onload = slideShow.iniciar;

/// OUTRAS FUNÇÕES
document.onmousedown = function(){location.href="/ensaios/";};
