var timerID = null;
var timerRunning = false;

function stopclock (){
if(timerRunning)
clearTimeout(timerID);
timerRunning = false;
}

curDate = new Date();
curMo = curDate.getMonth();
curDt = curDate.getDate();
curDay = curDate.getDay();
curYe = curDate.getFullYear(); WeekDay = new Array("Воскресенье","Понедельник","Вторник","Среда",
"Четверг","Пятница","Суббота");
Month = new Array("января","февраля","марта","апреля","мая","июня","июля","августа",
"сентября","октября","ноября","декабря");




function showtime () {
var now = new Date();
var hours = now.getHours();
var minutes = now.getMinutes();
var seconds = now.getSeconds()

timeValue = "" + ((hours < 10) ? "0" : "") + hours;
timeValue += ((minutes < 10) ? ":0" : ":") + minutes;
timeValue += ((seconds < 10) ? ":0" : ":") + seconds;
document.getElementsByName("oclock").item(0).innerText = timeValue;
document.getElementById('oclock').innerHTML = timeValue;
oclock.innerHTML = timeValue;
timerID = setTimeout("showtime()",1000);
timerRunning = true;
}

function startclock() {
stopclock();
showtime();
}
document.write(WeekDay[curDay]+" ");
document.write("<br>"+[curDt]+" ");
document.write(Month[curMo]+" ");
startclock();