var count=-1;
var ID=null;
var Activo=0;
var prend=0;


function animacion() {
count++;
if (count == grande.length) {
	count=0; 
}
document.visor.src=grande[count]
ID = setTimeout("animacion()",3000); 

}



function ActivaReloj() {
if (!Activo) {
Activo=true;
animacion();
}
else {
clearTimeout(ID);
prend=0;
Activo=false;
}
}

function Previa(){
if(Activo){
	clearTimeout(ID);
	Activo=false;
	document.stop_play.src="../images/play30.gif";
	};
count--;
if (count == -1) {
	count= grande.length - 1; 
	}
document.visor.src=grande[count];
}

function Siguiente(){
if(Activo){
	clearTimeout(ID);
	Activo=false;
	document.stop_play.src="../images/play30.gif";
	};
count++;
if (count == grande.length) {
	count=0; 
	}

document.visor.src=grande[count];
}

function Stop_Go(){
if(Activo){
	clearTimeout(ID);
	Activo=false;
	document.stop_play.src="../images/play30.gif";
	}
else {
	document.stop_play.src="../images/stop30.gif";
	ActivaReloj();
	}
}

