
document.write("<p id='reloj'>"+Cadena()+"<\/p>");
setInterval("document.getElementById('reloj').childNodes[0].nodeValue=Cadena();",1000);

function Cadena() {
  var dias=new Array("domingo", "lunes", "martes", "miércoles", "jueves", "viernes", "sábado");
  var meses=new Array("enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre");
  var Fecha=new Date();
  var doc=""+dias[Fecha.getDay()]+", "+Fecha.getDate()+" de "+meses[Fecha.getMonth()]+" de ";
  var tmp=Fecha.getYear();
  if(tmp<100) doc+='19'; else if(tmp<200) tmp+=(-100+2000);
  doc+=tmp+".  "+Fecha.getHours()+":";
  tmp=Fecha.getMinutes(); if(tmp<10) doc+='0'; doc+=tmp+":";
  tmp=Fecha.getSeconds(); if(tmp<10) doc+='0'; doc+=tmp;
  return doc;
}

