var dateform;
speed=1000;
tid = 0;
len=4;
function escribeFecha()
{
hora=new Date();
var meses = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");
dia=hora.getDate();
th = "th"; 
 if (dia == 1 || dia == 21 || dia == 31) th = "st";
 if (dia == 2 || dia ==22) th = "nd";
 if (dia == 3 || dia ==23) th = "rd";
month=hora.getMonth();
ano=hora.getYear();
mes=meses[month];
document.write(dia + "</b><sup>" + th + "</sup><b>" + " " + mes + " " + ano); 
}
function dodate()
{
hora=new Date();
horas=hora.getHours();
minutos= hora.getMinutes();
segundos=hora.getSeconds();
if(segundos<=9) segundos= "0" + segundos;
if(minutos<=9) minutos= "0" + minutos;
if(horas<=9) horas= "0" + horas;
f.date.value=(horas +":" + minutos + ":" + segundos);
tid=window.setTimeout("dodate()",speed);
}
function start(x) {
  f=x;
  tid=window.setTimeout("dodate()",speed);
}
function cleartid() {
  window.clearTimeout(tid);
}
function showDate()
{
document.write('<table border=0 cellspacing=0 cellpadding=0 width=100% height=10><tr>')
document.write('<td align=left><table border=0 width=30 cellspacing=0 cellpadding=0><tr><FORM name=dateform><td><font face="arial" size=2><b>&nbsp;Time:</b></td><td><div class="relox"><input name=date size=')
document.write(len)
document.write('value=""></div></td></form></tr></table>')
document.write('</td><td align=right width=50%><font face="arial" size=2><b>')
escribeFecha();
document.write('&nbsp;</td></tr></table>')
start(document.dateform);
}