// JavaScript Document
function timeNow() 
	{        //Toma la hora y la formatea        
	var now = new Date();
	var hours = now.getHours();
	var minutes = now.getMinutes();
	var seconds = now.getSeconds();
	var timeStr = ((hours < 10) ? "0" : "") + hours;
	timeStr += ((minutes < 10) ? ":0" : ":") + minutes;
	timeStr += ((seconds < 10) ? ":0" : ":") + seconds;
	return timeStr;
	}

function fechahoy()
	{
	var diasemana =['Domingo', 'Lunes', 'Martes', 'Miercoles', 'Jueves', 'Viernes', 'Sabado', 'Domingo'];
	var nombremes =['Enero', 'Febrero', 'Marzo', 'Abril', 'Mayo', 'Junio', 'Julio', 'Agosto', 'Septiembre','Octubre', 'Noviembre', 'Diciembre'];
	var fecha = new Date();
	var mes = fecha.getMonth();	
	var dia = fecha.getDay();
	var num = fecha.getDate();
	var ano=fecha.getFullYear();
	var ahora = diasemana[dia] + ", " + num + " de " + nombremes[mes] + " de " + ano;
	return ahora;
	}

function mueveReloj(){
    var Hora=timeNow();		// Solo para evitar hacer varias llamadas
	var Dia=fechahoy();

    var horaImprimible =Dia + " <h3>" + Hora + "</h3>";

    document.getElementById("reloj").innerHTML=horaImprimible ;

    setTimeout("mueveReloj()",1000);
} 


