
	var Vcolor = new Array;
	var foto = new Array;
	var Veste = ".jpg";
	var Vfoto = 1;
	var Vplay = "no";
	var Vvel = 200;

function Fcargar()
	{	// se cargarn las tipo _00 _0
	Vtem = '<img style=\"visbility:visible;\ id=\"cuadro0"   > \n';
	document.write(Vtem); 
	
	for (Vcont=1;Vcont <= Vtotalfotos;Vcont++)
		{			
		var Vtem = (Vcont < 10) ? (Vnombre + "_00" + Vcont + Veste) : (Vnombre + "_0" + Vcont + Veste);
		Vnom = "cuadro" + Vcont;	
		Vtem = '<img onload="cargada(Vcont)"  id=\"' +  Vnom + '\"   src=\"' + Vtem + '\"  > \n';
		document.write(Vtem);	
			

		}
	}
	
function cargada(Vcont)
	{
	document.contador.contadorFotos.value = "cargada la foto" + Vcont;	
	}
	
	
function FcargarNuevas()
	{	
	// distinta numeracion (las hice con otro programa)
	Vtem = '<img style=\"visibility:visible;\ id=\"cuadro0"   > \n';
	document.write(Vtem); 
	for (Vcont=1;Vcont <= Vtotalfotos;Vcont++)
		{			
		Vtem = Vnombre + "_" + Vcont + Veste;
		Vnom = "cuadro" + Vcont;	
		Vtem = '<img id=\"' +  Vnom + '\"   src=\"' + Vtem + '\"  > \n';
		document.write(Vtem);			
		}
	}
	
function Fapagar()
	{
	for (Vcont=1;Vcont <= Vtotalfotos;Vcont++)
		{
		Vnom = "cuadro" + Vcont;
		perro = document.all (Vnom);
		perro.style.visibility = "hidden";
		}
	cuadro1.style.visibility = 'visible';	
	}

function Fcomprobar()
	{
	for (Vcont=1;Vcont <= Vtotalfotos;Vcont++)
			{
			nombre = document.all ("tf" + Vcont);
			nombre.style.background = Vcolor[Vcont];
			Vnom = "cuadro" + Vcont;
			perro = document.all (Vnom);
			tema = perro.style.visibility;
			if (tema == "visible") { perro.style.visibility = "hidden"; }
			}
	}

function Fcambiarfoto(tempasado)
		{
		Fcomprobar();	
		Vfoto = tempasado;
		nombre = document.all ("cuadro" + tempasado);
		nombre.style.visibility = "visible";
		nombre = document.all ("tf" + Vfoto);
		nombre.style.background = "ffffff";
		document.puta.tfoto.value = tempasado;
		}

function Fcambiar(pasado,vcolor)
		{ 
		pasado.style.cursor = 'hand'; 
		pasado.style.fontWeight = 900;
		pasado.style.color = "000000";  
		pasado.style.background = vcolor;
		}
function Frecambiar(pasado,vcolor)
		{
		pasado.style.fontWeight = 200;
		pasado.style.background = vcolor;
		pasado.style.color = "000000";
		}
function Fplay()
		{
		Vplay = "si";
		idplay = window.setInterval ("Fcontinuo()",Vvel);
		}
		
function Fcontinuo()
		{
		if (Vplay == "si")
			{
			Vfoto++;
			if ( Vfoto >= Vtotalfotos ) { Vfoto = 1; }
			Fcambiarfoto(Vfoto);
			}
		}

function Fstop()
		{
		window.clearInterval(idplay)
		Vplay = "no";
		}
		
function Fsiguiente()
		{
		if (Vplay == "no")
			{
			Vfoto++;
			if ( Vfoto >= Vtotalfotos ) { Vfoto = 1; }
			Fcambiarfoto(Vfoto);
			}
		}
		
function Fanterior()
		{
		if (Vplay == "no")
			{
			Vfoto--;
			if ( Vfoto <= 0 ) { Vfoto = 1; }
			Fcambiarfoto(Vfoto);
			}
		}

function Frapido()
		{
		Vvel = Vvel - 100;
		if (Vvel <= 0 ) { Vvel = 100; }
		if (Vplay == "si") { window.clearInterval(idplay) ; Fplay(); }
		document.guarra.tvel.value = Vvel;
		}
		
function Flento()
		{
		Vvel = Vvel + 100;
		if (Vplay == "si") { window.clearInterval(idplay) ; Fplay(); }
		document.guarra.tvel.value = Vvel;
		}

function Firinicio()
		{
		Vfoto = 1;
		if (Vplay == "si") { window.clearInterval(idplay) ; Fplay(); }
		Fcambiarfoto(Vfoto);
		}

function Firfinal()
		{
		Vfoto = Vtotalfotos;
		if (Vplay == "si") { window.clearInterval(idplay) ; Fplay(); }
		Fcambiarfoto(Vfoto);
		}
	
function Fcerrar()
		{
		window.close();
		}

