function dpl() {

var obj1=document.getElementById("gals");

if (pas !=0) {

	obj1.style.height= (obj1.offsetHeight + pas);
	obj1.style.top = obj1.offsetTop + pas;

}

id1=setTimeout("dpl()",150);
}



function moveLayer(Sens) {
	Objet=document.getElementById("gals");
    if(parseInt(Objet.style.top) + (Pas*Sens)>0)  {
		clearTimeout(Timer);
	}
	else if(parseInt(Objet.style.top) + (Pas*Sens)<-(Objet.offsetHeight-document.getElementById("support").offsetHeight)) {
		clearTimeout(Timer);
	}
    else {
        Objet.style.top = (parseInt(Objet.style.top) + (Pas*Sens)) + "px";
	}
	Timer = setTimeout("moveLayer(" + Sens + ");", 30);
}

function moveLayerAuto(Sens) {
	Objet=document.getElementById("gals");
    if(parseInt(Objet.style.top) + (Pas*Sens)>0)  {
		//clearTimeout(Timer);
		Sens=Sens*(-1);
		moveLayerAuto(Sens);
		//alert("appel 1 "+Sens);
	}
	else if(parseInt(Objet.style.top) + (Pas*Sens)<-(Objet.offsetHeight-document.getElementById("support").offsetHeight)) {
		clearTimeout(Timer2);
		//Sens=Sens*(-1);
		//moveLayerAuto(Sens);
		//alert("appel 2 "+Sens);
	}
    else {
        Objet.style.top = (parseInt(Objet.style.top) + (Pas*Sens)) + "px";
	}
	Timer2 = setTimeout("moveLayerAuto(" + Sens + ");", 30);
}

function show_big(id) {
   for (i=0; i<tot_img; i++) {
      var ladiv="big"+i;
      //alert(ladiv);
      if (i != id) {
         document.getElementById(ladiv).style.display="none";
      }
      else {
         document.getElementById(ladiv).style.display="block";
      }
   }
   
   
}
