CALENDARIO CON RELOJ DIJITAL

ESPERO OS SEA UTIL
<form name="Tick">
<div align="center">
<input type="text" size="11" name="Clock">
</div>
</form>

<script>
<!--
function show(){
var Digital=new Date()
var hours=Digital.getHours()
var minutes=Digital.getMinutes()
var seconds=Digital.getSeconds()
var dn="AM"
if (hours>12){
dn="PM"
hours=hours-12
}
if (hours==0)
hours=12
if (minutes<=9)
minutes="0"+minutes
if (seconds<=9)
seconds="0"+seconds
document.Tick.Clock.value=hours+":"+minutes+":"
+seconds+" "+dn
setTimeout("show()",1000)
}
show()
//-->

<!--
var timerID = null;
var timerRunning = false;

function stopclock()
{
if(timerRunning)
clearTimeout(timerID);
timerRunning = false;
}

function startclock()
{
stopclock();
showtime();
}

function showtime ()
{
var now = new Date();
var hours = now.getHours();
var minutes = now.getMinutes();
var seconds = now.getSeconds()
var timeValue = "" + ((hours >12) ? hours -12 :hours)
timeValue += ((minutes < 10) ? ":0" : ":") + minutes
timeValue += ((seconds < 10) ? ":0" : ":") + seconds
timeValue += (hours >= 12) ? " P.M." : " A.M."
document.clock.face.value = timeValue;
// you could replace the above with this
// and have a clock on the status bar:
// window.status = timeValue;
timerID = setTimeout("showtime()",1000);
timerRunning = true;
return '';
}
// -->

<!-- to hide script contents from old browsers

function greeting()
{
var today = new Date();
var hrs = today.getHours();

document.writeln("<CENTER>");
document.write("<H3>&iexcl;&iexcl;");
if (hrs < 6)
document.write("(Early) Morning");
else if (hrs < 14)
document.write("Buenos D&iacute;as");
else if (hrs <= 20)
document.write("Buenas Tardes");
else
document.write("Buenas noches");
document.writeln("!!</H3>");
document.writeln("</CENTER>");


return '';
}

function montharr(m0, m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11)
{
this[0] = m0;
this[1] = m1;
this[2] = m2;
this[3] = m3;
this[4] = m4;
this[5] = m5;
this[6] = m6;
this[7] = m7;
this[8] = m8;
this[9] = m9;
this[10] = m10;
this[11] = m11;
return '';
}

function calendar()
{
var monthNames = "EneFebMarAbrMayJunJulAgoSepOctNovDic";
var today = new Date();
var thisDay;
var monthDays = new montharr(31, 28, 31, 30, 31, 30, 31, 31, 30,
31, 30, 31);

year = today.getYear() + 00;
thisDay = today.getDate();

// do the classic leap year calculation
if (((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0))
monthDays[1] = 29;

// figure out how many days this month will have...
nDays = monthDays[today.getMonth()];

// and go back to the first day of the month...
firstDay = today;
firstDay.setDate(1);
// and figure out which day of the week it hits...
startDay = firstDay.getDay();

document.writeln("<CENTER>");
document.write("<TABLE BORDER>");
document.write("<TR><TH COLSPAN=7 ALIGN=CENTER>");
document.write(monthNames.substring(today.getMonth() * 3,
(today.getMonth() + 1) * 3));
document.write(". ");
document.write(year);
document.write("<TR><TH ALIGN=CENTER>");
document.write("Dom<TH ALIGN=CENTER>Lun<TH ALIGN=CENTER>");
document.write("Mar<TH ALIGN=CENTER>Mie<TH ALIGN=CENTER>");
document.write("Jue<TH ALIGN=CENTER>Vie<TH ALIGN=CENTER>Sab");
// now write the blanks at the beginning of the calendar
document.write("<TR>");
column = 0;
for (i=0; i<startDay; i++)
{
document.write("<TD ALIGN=CENTER><FONT SIZE+=4>");
column++;
document.write("</FONT>");
}

for (i=1; i<=nDays; i++)
{
document.write("<TD ALIGN=CENTER>");
if (i == thisDay)
document.write("<FONT COLOR=\"#FF0000\" SIZE+=4>")
document.write(i);
if (i == thisDay)
document.write("</FONT>")
column++;
if (column == 7)
{
document.write("<TR>"); // start a new row
column = 0;
}
}
document.write("</TABLE>");
document.writeln("</CENTER>");
return '';
}

document.write(greeting());
document.write(calendar());
document.write("</FONT>");

//cease hiding-->
Mejor lo dejamos, veré si puedo arreglarlo y si no lo consigo lo elimino. Gracias en cualquier caso por tu aportación.

Ah y dime de donde lo has sacado por si puedo recuperar algo o ver mejor como hacerlo funcionar!