function fecha(){
fecha = new Date()
mes = fecha.getMonth()
diaMes = fecha.getDate()
diaSemana = fecha.getDay()
anio = fecha.getFullYear()
dias = new Array('Domingo', 'Lunes','Martes','Miercoles','Jueves','Viernes','Sábado')
meses = new Array('Ene.','Febr.','Marzo','Abril','Mayo','Junio','Julio','Agos.','Sept.','Oct.','Nov.','Dic.')
document.write('<span id="fecha">')
document.write (dias[diaSemana] + " " + diaMes + ", " + meses[mes] + " de " + anio)
document.write ('</span>')
}

function hora(){
var fecha = new Date()
var hora = fecha.getHours()
var minuto = fecha.getMinutes()
var segundo = fecha.getSeconds()
if (hora < 10) {hora = "0" + hora}
if (minuto < 10) {minuto = "0" + minuto}
if (segundo < 10) {segundo = "0" + segundo}
var horita = hora + ":" + minuto + ":" + segundo
document.getElementById('hora').firstChild.nodeValue = horita
tiempo = setTimeout('hora()',1000)
}
function tiempo(){
document.write('<span id="hora">')
document.write ('000000</span>')
hora()
}

