<!-- Para cualquier consulta o error sobre las siguientes funciones, escribe a soporte@melodysoft.com -->
<!-- http://www.melodysoft.com -->

<!-- Revisión 0.2	20-02-2001 -->
<!-- Revision 0.3	01-03-2001 -->
<!-- Revisión 0.4	02-04-2001 -->
<!-- Revisión 0.5	02-05-2001 -->
<!-- Revisión 0.6       19-06-2001 --> 
<!-- Revisión 0.7	01-02-2002 --> 

<!-- Versión actual: 0.7 -->

<!-- Gracias a Netvicious por sus revisiones (vers. 0.6 y 0.7) -->

LocalSegundos=Translate(servertime);
function Bisiesto (year)
	{	
	f=(year*1) % 4;
		if (!f)
			{
			f=(year*1) % 100;
				if (f)
			return 0;
			}
	
	f=(year*1) % 400;
	return f;
	}




function Translate (Label){
	var mes= new Array(31,28,31,30,31,30,31,31,30,31,30,31);
	dias=365;
	r=Label.search(/\ /i);

	DateVG=Label.substring(0,r);
	HoraVG=Label.substr(r+1,5);

	HoraV=HoraVG.substring(0,2);
	MinutoV=HoraVG.substr(3,2);
	f=DateVG.search('/');
	DiaV=DateVG.substring(0,f);
	MesV=DateVG.substr(f+1,2);
	AnoV=DateVG.substr(f+4,4);			
		
		if ( (!Bisiesto(AnoV)))
			{
			mes[1]=29;
			dias=366;
			}
		
	AnoV=(AnoV*1)-1970;
	SegDia=(DiaV*86400)-86400;
	SegMes=0;
	for (i=0; (MesV*1)-1>i; i++)
		SegMes=SegMes+(86400*(mes[i]*1));
	SegAno=AnoV*dias*86400;
	SegHora=HoraV*3600;
	SegMinuto=MinutoV*60;
	Total=SegAno+SegMes+SegDia+SegHora+SegMinuto;
		return Total;
}


function Check(Label)
	{

	MensajeSegundos=Translate(Label);
	offset= LocalSegundos - MensajeSegundos;

			if (offset < GeneralOffset)
				document.write('<img src="'+URL+'">');

	}

function nOption(VA, nOffset, sText) {
        if (VA==nOffset)
            document.write('<option selected value='+nOffset+'>'+sText+'</option>');    
        else
            document.write('<option value='+nOffset+'>'+sText+'</option>');  
                                     
        }
                                                
function nBox(VA){
        document.write('<select name="GeneralOffset" size="1" style="font-family: Arial; font-size: 8pt" onChange="submit()"> ');
        nOption (VA, 43200, '12 horas');
        nOption (VA, 86400, '24 horas');
        nOption (VA, 172800, '48 horas');
        document.write('</select>');
        }
