/* showClock() function extracts the current time hours, minutes and seconds and then displays them in the div with showText id from the BODY section */

function showClock()
{
var clock=new Date();
var year=clock.getFullYear();
var month=clock.getMonth();
month++;
var day=clock.getDate();
var hours=clock.getHours();
var minutes=clock.getMinutes();
var seconds=clock.getSeconds();
// for a nice disply we'll add a zero before the numbers between 0 and 9
if (hours<10){
hours="0" + hours;
}
if (minutes<10){
minutes="0" + minutes;
}
if (seconds<10){
seconds="0" + seconds;
}
if (day<10){
day="0" + day;
}
if (month<10){
month="0" + month;
}
document.getElementById('showClock').innerHTML=day+"/"+month+"/"+year+" - "+hours+":"+minutes;
t=setTimeout('showClock()',500);
}

