vitesseDiaporama = 5000; // Vitesse du diaporama
dureeTransition = 1; // Durée de la transition

/* Déclaration */
preChargement = new Array()
NumImgAff = new Array();
nbImgTotal = new Array();
IdTimeOut = new Array();

/* Declaration et Init supplémentaire */
for (cpt_diapo = 1 ; cpt_diapo <= nb_diaporama ; cpt_diapo++)
{
	NumImgAff[cpt_diapo] = 0;
	nbImgTotal[cpt_diapo] = tabImg[cpt_diapo].length;
	preChargement[cpt_diapo] = new Array()
	
	for (cpt = 0; cpt < nbImgTotal[cpt_diapo] ; cpt++)
	{
		preChargement[cpt_diapo][cpt] = new Image()
		preChargement[cpt_diapo][cpt].src = emplacement + tabImg[cpt_diapo][cpt]
	}
}

/*****************************************/
/*             LES FONCTIONS             */
/*****************************************/

function nomId(id)
{
	return document.getElementById(id);
}

function demarrerDiaporama(numero)
{
	var nom_diaporama;
	var NumImgAff_ec;
	
	nom_diaporama = "diaporama_" + numero
	NumImgAff_ec = NumImgAff[numero];

	if (navigator.appName!="Microsoft Internet Explorer")
    {
    	// Si on est pas sous IE
		nomId(nom_diaporama).src = preChargement[numero][NumImgAff_ec].src
    }
    else
    {
    	nomId(nom_diaporama).style.filter="blendTrans(dureeTransition)"
		nomId(nom_diaporama).filters.blendTrans.Apply() 
		nomId(nom_diaporama).src = preChargement[numero][NumImgAff_ec].src
		nomId(nom_diaporama).filters.blendTrans.Play()
    }	
	
	NumImgAff[numero] = NumImgAff[numero] + 1;
	if ( NumImgAff[numero] > (nbImgTotal[numero]-1) ) NumImgAff[numero] = 0;
	IdTimeOut[numero] = setTimeout('demarrerDiaporama('+numero+')', vitesseDiaporama)
}

function initialiser()
{
	for (cptDemarrer=1; cptDemarrer <= nb_diaporama ; cptDemarrer++)
		demarrerDiaporama(cptDemarrer);
}

clignotant=0;

function clignotement()
{ 
	if (clignotant)
	{
		document.getElementById("MonElement").innerHTML='<i>Devis Gratuit !</i>';
		clignotant=0;
	}
	else 
	{
		document.getElementById("MonElement").innerHTML='<i>Prix Discount !</i>';
		clignotant=1;
	}
} 
//setInterval("clignotement()", 2000); 
