var meses=new Array;
var dias= new Array;

meses[0]= "Enero";		meses[1]= "Febrero";	meses[2]= "Marzo";	meses[3]= "Abril";		meses[4]= "Mayo";
meses[5]= "Junio";		meses[6]= "Julio";		meses[7]= "Agosto";	meses[8]= "Septiembre";	meses[9]= "Octubre";
meses[10]="Noviembre";	meses[11]="Diciembre";

dias[0]="Domingo";	dias[1]="Lunes";	dias[2]="Martes";	dias[3]="Miercoles";	dias[4]="Jueves";
dias[5]="Viernes";	dias[6]="Sabado";

hoy=new Date();

function fechaActual(){
	document.write("<TD>"+dias[hoy.getDay()]+" "+hoy.getDate()+" de "+meses[hoy.getMonth()]+", del 2009.</TD></TR>");
};

function mueveReloj(){
    momentoActual = new Date();
    hora = momentoActual.getHours();
    minuto = momentoActual.getMinutes();
    segundo = momentoActual.getSeconds();

    str_segundo = new String (segundo);
    if (str_segundo.length == 1)
       segundo = "0" + segundo;

    str_minuto = new String (minuto);
    if (str_minuto.length == 1)
       minuto = "0" + minuto;

    str_hora = new String (hora);
    if (str_hora.length == 1)
       hora = "0" + hora;

    horaImprimible = hora + " : " + minuto + " : " + segundo;
    document.form_reloj.relojOeste.value = horaImprimible;
	setTimeout("mueveReloj()",1000);
	
};

function mueveRelojEste(){
    momentoActual = new Date();
    hora = momentoActual.getHours() + 1;
    minuto = momentoActual.getMinutes();
    segundo = momentoActual.getSeconds();

    str_segundo = new String (segundo);
    if (str_segundo.length == 1)
       segundo = "0" + segundo;

    str_minuto = new String (minuto);
    if (str_minuto.length == 1)
       minuto = "0" + minuto;

    str_hora = new String (hora);
    if (str_hora.length == 1)
       hora = "0" + hora;

    horaImprimible = hora + " : " + minuto + " : " + segundo;

	document.form_reloj.relojEste.value = horaImprimible;
    
	setTimeout("mueveRelojEste()",1000);
	
};

function iniciarHora(){
	mueveReloj();
	mueveRelojEste();
};
