cont_img=0
function cambiar_img()
{
 cont_img++;
 if (cont_img==5) { cont_img=1; }
 document.getElementById("img_central").src= document.images["img1"].src;
}

var a_mov=0; con_mov=0;
var ts;

function inicializa_scroll()
{
// clearTimeout(ts);
 a_mov=0; con_mov=0;
}
function mover_capa_sup()
{
   if (a_mov<con_mov*97 && a_mov<388) 
    {
	   a_mov++;
	   clip();
	   ts=setTimeout("mover_capa_sup()",10);
		
	}
}
function subir()
{
  con_mov++;
  if (con_mov<4) 
   { 
     mover_capa_sup();
	}
   else 
   { 
   con_mov--; 
   }
}
function bajar()
{
  con_mov--;
  if (con_mov>=0)  
   { 
    mover_capa_inf();
    }
  else { con_mov++; }
}

function mover_capa_inf()
{
   if (a_mov>con_mov*97 && a_mov>0) 
    {
	   a_mov--;
	   clipa();
	   ts=setTimeout("mover_capa_inf()",10);

	}
}

function clip() {
 	var contWidth = 140;
 	var contHeight = 225;
	if (document.getElementById("slideA") != "undefined")
	 {
		var id1 = document.getElementById("slideA");
		var height = id1.offsetHeight;
		id1.style.top = parseInt(id1.style.top)-1 + "px";
		document.getElementById("slideCont").style.height = contHeight + "px";
		document.getElementById("slideCont").style.clip = "rect(auto,"+ contWidth +"px," + contHeight +"px,auto)";
		if(parseFloat(id1.style.top) == -(height/2)) {
			id1.style.top = "0px";
		}
	 }
}

function clipa() {
 	var contWidth = 140;
 	var contHeight = 225;
	if (document.getElementById("slideA") != "undefined")
	 {
		var id1 = document.getElementById("slideA");
		var height = id1.offsetHeight;
		id1.style.top = parseInt(id1.style.top)+1 + "px";
		document.getElementById("slideCont").style.height = contHeight + "px";
		document.getElementById("slideCont").style.clip = "rect(auto,"+ contWidth +"px," + contHeight +"px,auto)";
		if(parseFloat(id1.style.top) == -(height/2)) {
			id1.style.top = "0px";
		}
	 }
}
function ver_clip() {
 	var contWidth = 140;
 	var contHeight = 225;
 	var id1 = document.getElementById("slideA");
 	var height = id1.offsetHeight;
 	id1.style.top = parseInt(id1.style.top) + "px";
 	document.getElementById("slideCont").style.height = contHeight + "px";
 	document.getElementById("slideCont").style.clip = "rect(auto,"+ contWidth +"px," + contHeight +"px,auto)";
 	if(parseFloat(id1.style.top) == -(height/2)) {
  		id1.style.top = "0px";
 	}
	
}
function mostrar_capa(capa)
{
 c=document.getElementById(capa);
 if (c.style.display=="none") c.style.display="block"; 
 else c.style.display="none"; 
}

