// parte do allan para fazer carregar as imagens do menu
imagem_lista = Array('menu_on1.jpg', 'menu_on2.jpg', 'menu_on3.jpg', 'menu_on4.jpg', 'menu_on5.jpg', 'menu_on6.jpg', 'menu_on7.jpg'	, 'menu_on8.jpg');
imagem_qtd = imagem_lista.length;
	for (i = 0; i <imagem_qtd; i++) {
	    var preload = new Image();
	    preload.src = "imagens/"+imagem_lista[i];
	}
// animação do menu... mouseout e in
function bt_on(){document.getElementById(botao).style.backgroundImage='url(inicio_on.jpg)';}
function bt_off(){document.getElementById(botao).style.backgroundImage='';}
	
// loop da fotos... lembrando que sem jquery ^^ huahuauhauhauha	
caminho = "imagens/slyde/";

img = Array (caminho+array_global[0], caminho+array_global[1], caminho+array_global[2], caminho+array_global[3], caminho+array_global[4]); // imagem da animação no centro da INDEX
txt = Array (array_global[5], array_global[6], array_global[7], array_global[8], array_global[9]); // Texto referente a cada imagem na animação da INDEX

vis=true; num=1; trocaImagem();

function trocaImagem() {

	if (vis) {
		fadeValue=99;
	} else {
	//--------------------------------------------------- anima saida
		fadeValue=99; lef=50;
		var intervaloum = window.setInterval(function() {
		var di=document.getElementById("centro_anima").style;	
		if (lef>149){
			fadeValue = 0;
			clearInterval(intervaloum);
			di.opacity='.'+fadeValue;/*todos*/di.MozOpacity='.'+fadeValue;/*mozilla*/di.filter = 'Alpha(Opacity='+fadeValue+')';/*ie*/
			document.getElementById("centro_cima").style.backgroundImage="url("+img[num]+")"; /* variavel da imagem */
			document.getElementById("centro_cima").style.backgroundRepeat = 'no-repeat';
			document.getElementById("centro_cima").style.backgroundPosition = 'center';
			document.getElementById("centro_baixo").innerHTML=txt[num];
			if (num==4){
				num=0;
			}
			else {
				num++;
			}
		//----------------------------------------------- anima entrada
		lef=-50;
		var intervalodois = window.setInterval(function() {
		
			if (lef>49){
				fadeValue = 99;
				clearInterval(intervalodois);
				di.opacity='.'+fadeValue;/*todos*/di.MozOpacity='.'+fadeValue;/*mozilla*/di.filter = 'Alpha(Opacity='+fadeValue+')';/*ie*/
			}else{
				fadeValue++;
				lef++;
				di.left=lef+'%';
				di.opacity='.'+fadeValue;/*todos*/di.MozOpacity='.'+fadeValue;/*mozilla*/di.filter = 'Alpha(Opacity='+fadeValue+')';/*ie*/
			}
		},1);
		
		}else{
			fadeValue--;
			lef++;
			di.left=lef+'%';
			di.opacity='.'+fadeValue;/*todos*/di.MozOpacity='.'+fadeValue;/*mozilla*/di.filter = 'Alpha(Opacity='+fadeValue+')';/*ie*/
		}
		},1);	
	}  
	if (fadeValue == 99) { vis = false; wait=15000; } //controla o tempo... animação funciona a cada 15seg... mudar esse o de baixo
setTimeout('trocaImagem()',wait);
}
	  


