function filldate() 
{
var date = new Date(); // current date from local computer
var weekday = new Array("Sun","Mon", "Tue", "Wed", "Thu", "Fri", "Sat");
var displaydate = "Today is: ";
displaydate += weekday[date.getDay()] + " "; // Day in Week
if ( date.getDate() < 10 ) { displaydate += "0" + date.getDate() + "-"; }
else { displaydate += date.getDate() + "-"; } // day in month
if ((date.getMonth()+1) < 10 ) { displaydate += "0" + (date.getMonth()+1) + "-"; }
else { displaydate += (1 + date.getMonth()) + "-"; } // month
displaydate += date.getFullYear(); // year in format YYYY
displaydate += " " + date.getHours(); // hours
if (date.getMinutes() < 10) { displaydate += ":0" + date.getMinutes();}
else {displaydate += ":" + date.getMinutes(); } // minutes
if (date.getSeconds() < 10) { displaydate += ":0" + date.getSeconds();}
else {displaydate += ":" + date.getSeconds(); } // seconds
window.document.getElementById("time").innerHTML = displaydate; // time and date displaying
}
filldate();
window.setInterval("filldate()", 1000);