// =======================================
// do not edit anything below this line
// =======================================
var t
var j = 0
var cptnav = 0
var indice = 1
var p = Pic.length
var IsLoad=1;
var preLoad = new Array()
var ns4 = (document.layers)? true:false;         	//NS 4
var ie4 = (document.all)? true:false;         		//IE 4
var dom = (document.getElementById)? true:false;   //NS 6 ou IE 5

for (i = 0; i < p; i++)
	{
    preLoad[i] = new Image()
    preLoad[i].src = Pic[i]   
	}

function runSlideShow()
   {
   IsLoad=1;
   /*
   if (document.all)
		{
		document.images.SlideShow.style.filter="blendTrans(duration=2)"
		document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)"
		document.images.SlideShow.filters.blendTrans.Apply()      
		}
	*/
	//if (j>=0) { 
		SetDiv('descriptif',listeinfosphotos[j]); 
	//}
   document.images.SlideShow.src = preLoad[j].src 
   j = j + 1
   if (j > (p-1)) { j=0; cptnav=0;} 
   /*
	if (document.all)
		{
	  	document.images.SlideShow.filters.blendTrans.Play()
   		}
   		*/
   IsLoad=0;
   t = setTimeout('runSlideShow()', slideShowSpeed)
   }

function mvimg(nb)
	{
	IsChange=1;

	if (nb==1) {cptnav=j;}
	if (nb==0) 
		{
		if (j==0) {courant=2;}
		else {courant=j-1;}
		if (courant==0) { cptnav=2; }
		else { cptnav=courant-1; }
		}
	SetDiv('descriptif',listeinfosphotos[cptnav]);	
	document.images.SlideShow.src = preLoad[cptnav].src
	if (nb==0) 
		{
		if (j==0) {j=2;}
		else {j=j-1;}
		}
	if (nb==1) 
		{
		if (j==(p-1)) {j=0;}
		else {j=j+1;}
		}
	}

function SetDiv(ID,Content) 
	{
		
    if (dom) {
      document.getElementById(ID).innerHTML = Content;
      return;
      }
    if (ie4) {
      document.all[ID].innerHTML = Content;
      return;
	  }
    if (ns4) {
      with (eval('document.'+ID+'.document')) {
         open();
         write(Content);
         close();
         }
      return;
      }
   }

function arreter() {
 window.clearTimeout(t); 
}

