// JavaScript Document
function init(){
}

var timeOpac;
var timeout;

function tempsOpac(){
	clearTimeout(timeOpac);
	timeOpac= setTimeout('changeOpac()',80); //50
}

function tempsCalque(){
	clearTimeout(timeout);
	timeout= setInterval('changeCalque()',6000); //10000
}

var nbDiv=1
var nbOpac=10;
var OpacInit=0;
function changeCalque(){
	if (document.all){
		with (document.getElementById("opacit"+nbDiv).style){
			filter=eval('"alpha(opacity='+OpacInit+')"');
		}
	}
	else{
		with (document.getElementById("opacit"+nbDiv).style){
			opacity=0;
		}	
	}	
	if(nbDiv<5){// mettre le nombre de témoignages ici
		nbDiv++;		
	}
	else
		nbDiv=1;
	tempsOpac();
	//alert(nbDiv);	
}

function changeOpac(){
	if (document.all){
		with (document.getElementById("opacit"+nbDiv).style){
			filter=eval('"alpha(opacity='+nbOpac+')"');
		}
	}
	else{
		with (document.getElementById("opacit"+nbDiv).style){
			opacity=(nbOpac/100);
		}	
	}
	nbOpac=nbOpac+10;
	if(nbOpac<=100){
		tempsOpac();
	}
	else{
		nbOpac=10;
		tempsCalque();
	}		
}

/*window.onload=onloadpage;

function onloadpage()
{
	init();
	tempsOpac();
}
*/