// JavaScript Document

//Détection des largeurs pour IE
/*for (i=0; i<20; i++){
			if(document.getElementById('image_affiche_'+i)){
             
			 var largeur = document.getElementById('image_affiche_'+i).width;
			 document.getElementById('survol_affiche_'+i).style.width=largeur+'px';
			 document.getElementById('panel_affiche_'+i).style.width=largeur+'px';
			 // document.getElementById('lien_affiche_'+i).style.width=document.getElementById('image_affiche_'+i).width+'px';
               	//		   document.getElementById('survol_affiche_'+i).style.display='block';
			  // alert(document.getElementById('survol_affiche_'+i).width);
  		    }
}
*/
//Fond grisé lors du survol 
function survol(afficheID){
   
   var afficheID;
   document.getElementById('image_affiche_'+afficheID).className='survol';
}

//Fond normal en sortie de survol 
function normal(afficheID){
   
   var afficheID;
   document.getElementById('image_affiche_'+afficheID).className='normal';

}

function slideAfficheMoveNext(){

if(!spSlidingAffiche)
return;
var idx = spSlidingAffiche.getContentPanelIndex(spSlidingAffiche.currentPanel);
var maxPanels = spSlidingAffiche.getContentPanels().length-6;
   if(maxPanels == idx){
      spSlidingAffiche.showFirstPanel();
   }else{ 
      spSlidingAffiche.showPanel((spSlidingAffiche.getContentPanelIndex(spSlidingAffiche.currentPanel)+1));
   }
} 



function slideAfficheMovePrevious(){

if(!spSlidingAffiche)
return;
var idx = spSlidingAffiche.getContentPanelIndex(spSlidingAffiche.currentPanel);
var maxPanels = spSlidingAffiche.getContentPanels().length-6;
    if(0 == idx){
      //spSlidingAffiche.showPanel(maxPanels)
	}else{
      spSlidingAffiche.showPanel((spSlidingAffiche.getContentPanelIndex(spSlidingAffiche.currentPanel)-1));
	}
}

//Navigation onmouseover
function cycleAfficheMoveNext(){
    a=setInterval("slideAfficheMoveNext()",1000);
} 

function cycleAfficheMovePrevious(){
    b=setInterval("slideAfficheMovePrevious()",1000);
}    	

function stopCycleAfficheNext(){
    clearTimeout(a);
}    	

function stopCycleAffichePrevious(){
    clearTimeout(b);
}    	

//Cycler
function cyclerStart(){
    cycler=setInterval("slideAfficheMoveNext()",5000);
} 

function cyclerStop(){
   clearTimeout(cycler);
} 

