// VARIABLE GENERALE

var Compteur=0;
var CptPeinture=0;
TabPeinture = new Array();
TabPeintureTexte = new Array();
TabPeintureTitre = new Array();
ListePeinture = new Array();
var timespeed=6000;	
var Timer=0;


function imgSwap(oImg) {
   var strOver  = "-on"    // image to be used with mouse over
   var strOff = "-off"     // normal image
   var strImg = oImg.src
   if (strImg.indexOf(strOver) != -1) 
      oImg.src = strImg.replace(strOver,strOff)
   else
      oImg.src = strImg.replace(strOff,strOver)
}

function AfficheClient(TabClient,Pas) {
	Indice = Compteur+Pas;
	if (Indice>=0 && Indice<TabClient.length) {
		window.document.getElementById('Logo').innerHTML=TabClient[Indice];
		window.document.getElementById('Client'+Indice).className="texte_gris_normal";	
		window.document.getElementById('Client'+Compteur).className="texte_bleu_normal";
		Compteur=Indice;
	}
}





function AfficheEquipe(TabEquipe,Indice) {
	window.document.getElementById('texte').innerHTML=TabEquipe[Indice];
	imgSwap(window.document.getElementById('image'+Indice));
}


function Affiche(id,div,tab) {
	window.document.getElementById(div).innerHTML=tab[id];
}



function TimerPeinture(Indice,NbMax) {
	window.document.getElementById('middle').innerHTML=TabPeinture[Indice];
	window.document.getElementById('middleTexte').innerHTML=TabPeintureTexte[Indice];
	window.document.getElementById('middleTitre').innerHTML=TabPeintureTitre[Indice];		
	try {		
		if (Indice==0) {
			document.getElementById('peinture'+NbMax).style.backgroundColor='black';
		} else {
			document.getElementById('peinture'+(Indice-1)).style.backgroundColor='black';
		}	
	}
	catch(e) {};
	Affiche(Math.floor(Indice/3),'Peintures',ListePeinture);
	try {
		document.getElementById('peinture'+Indice).style.backgroundColor='#5d0a30';
	}
	catch(e){}
	
	
	
	
	if (Indice==NbMax) { Indice=-1}
	Timer=setTimeout("TimerPeinture("+(++Indice)+","+NbMax+")",timespeed);
}



function MontreModuleLudique(NomRand,Indice,NbMax,URLSkin) {
	for(compteur=1;compteur<=NbMax;compteur++){
		if (Indice==compteur) {
			window.document.getElementById(NomRand+'_contenu_'+compteur).style.visibility='visible';
			window.document.getElementById('ModuleLudique_'+NomRand).innerHTML='<span class="titre-chapeau" name="'+TabModuleLudiqueTitre[(Indice-1)]+'" alt="'+TabModuleLudiqueTitre[(Indice-1)]+'" title="'+TabModuleLudiqueTitre[(Indice-1)]+'">'+TabModuleLudiqueTitre[(Indice-1)]+'</span>';
			if (IE6==true) {
				PNGswapON(NomRand+'_bouton_'+compteur);
			} else {
				window.document.getElementById(NomRand+'_bouton_'+compteur).src='jazz-en-ligne-interface/'+URLSkin+'images/bouton-rond-jazz-en-ligne-on.png';
			}			
		} else {
			window.document.getElementById(NomRand+'_contenu_'+compteur).style.visibility='hidden';
			if (IE6==true) {				
				PNGswapOFF(NomRand+'_bouton_'+compteur);
			} else {
				window.document.getElementById(NomRand+'_bouton_'+compteur).src='jazz-en-ligne-interface/'+URLSkin+'images/bouton-rond-jazz-en-ligne-off.png';
			}
		}
	}
	window.clearTimeout(Timer);
}