function myclock(){
var ndata=new Date();
var month=ndata.getMonth()+1;
var date=ndata.getDate();
var year=ndata.getFullYear();
var hours = ndata.getHours();
var mins = ndata.getMinutes();
var secs = ndata.getSeconds();
if (month < 10) { month = "0" + month; }
if (hours < 10) { hours = "0" + hours; }
if (mins < 10) { mins = "0" + mins; }
if (secs < 10) { secs = "0" + secs; }
var datastr=(date + "." + month + "." + year + " " + hours + ":" + mins + ":" + secs);

// Вывод данных
//Если FireFox
if (document.getElementById) { 
el = document.getElementById('clockexam');
el.innerHTML = datastr; 
}
// Если Netscape Navigator
else if (document.layers){
document.layers.clockexam.document.write(datastr)
document.layers.clockexam.document.close()
}
 // Если Internet Explorer
else if (document.all)
clockexam.innerHTML= datastr
// Вызов функции с интервалом 1000 ms
setTimeout("myclock()",1000)
}
