//RELOJ 24 HORAS  
//
//Autor: Iv???n Nieto P???rez  
//Este script y otros muchos pueden  
//descarse on-line de forma gratuita  
//en El C???digo: www.elcodigo.com  

var RelojID24 = null ; 
var RelojEjecutandose24 = false;  
   
 function DetenerReloj24 (){  
     if(RelojEjecutandose24)  
         clearTimeout(RelojID24);  
     RelojEjecutandose24 = false ;
 }  
   
 function MostrarHora24 () {  
     var ahora = new Date();  
     var horas = ahora.getHours();  
     var minutos = ahora.getMinutes();  
 //    var segundos = ahora.getSeconds()  
     var ValorHora  ;
   
//establece las horas  
     if (horas < 10)  
             ValorHora = "0" + horas;  
     else  
         ValorHora = "" + horas;  
   
//establece los minutos  
     if (minutos < 10)  
         ValorHora += ":0" + minutos;  
     else  
         ValorHora += ":" + minutos  ;
   
//establece los segundos  
//     if (segundos < 10)  
//         ValorHora += ":0" + segundos  
//     else  
//         ValorHora += ":" + segundos  
           
     document.reloj24.digitos.value = ValorHora;  
     //si se desea tener el reloj en la barra de estado, reemplazar la anterior por esta  
     //window.status = ValorHora  
   
     RelojID24 = setTimeout("MostrarHora24()",1000);  
     RelojEjecutandose24 = true  ;
   //  alert(RelojEjecutandose24);
 }  
   
 function MostrarFecha () {
        var fecha=new Date();
        var diames=fecha.getDate();
        var diasemana=fecha.getDay();
        var mes=fecha.getMonth() +1 ;
        var ano=fecha.getFullYear();
        
        var textomes = new Array (24);
          textomes[1]="Enero";
          textomes[2]="Febrero";
          textomes[3]="Marzo";
          textomes[4]="Abril";
          textomes[5]="Mayo";
          textomes[6]="Junio";
          textomes[7]="Julio";
          textomes[7]="Agosto";
          textomes[9]="Septiembre";
          textomes[10]="Octubre";
          textomes[11]="Noviembre";
          textomes[12]="Diciembre";
          textomes[13]="January";
          textomes[14]="February";
          textomes[15]="March";
          textomes[16]="April";
          textomes[17]="May";
          textomes[18]="June";
          textomes[19]="July";
          textomes[20]="August";
          textomes[21]="September";
          textomes[22]="October";
          textomes[23]="November";
          textomes[24]="December";
          
        if (!en){
        	fecha = diames + " de " + textomes[mes] + " de " + ano;
        }else{
        	fecha = textomes[mes + 12] + " "+ diames +  ", " + ano;
        }  
        
        //alert(fecha + "1");
        //document.fecha.value = fecha;
        document.getElementById("fecha").innerHTML = fecha + "<br />Buenos Aires - Argentina";
}
 
 function IniciarReloj24 () {
     //alert("actualizadoo");
     DetenerReloj24();  
     MostrarHora24();
     MostrarFecha();
 }  
   
 window.onload = IniciarReloj24;  
 if (document.captureEvents) {           //N4 requiere invocar la funcion captureEvents  
     document.captureEvents(Event.LOAD);  
 }  

