var months   = new Array();
months["ro"] = new Array();
months["ro"][0] = "ianuarie";
months["ro"][1] = "februarie";
months["ro"][2] = "martie";
months["ro"][3] = "aprilie";
months["ro"][4] = "mai";
months["ro"][5] = "iunie";
months["ro"][6] = "iulie";
months["ro"][7] = "august";
months["ro"][8] = "septembrie";
months["ro"][9] = "octombrie";
months["ro"][10] = "noiembrie";
months["ro"][11] = "decembrie";

function doClockDaemon() {
	var now = new Date();
	now.year  = now.getFullYear();
	now.month = now.getMonth();
	now.date  = now.getDate();
	now.date  = ((now.date < 10) ? "0" + now.date:now.date);
	now.seconds = now.getSeconds();
	now.seconds = ((now.seconds < 10) ? "0" + now.seconds:now.seconds);
	now.minutes = now.getMinutes();
	now.minutes = ((now.minutes < 10) ? "0" + now.minutes:now.minutes);
	now.hours   = now.getHours();
	now.hours   = ((now.hours < 10) ? "0" + now.hours:now.hours);	

	var clock = now.date + "&nbsp;" + months["ro"][now.month] + "&nbsp;" + now.year + "<br>" + now.hours + ":" + now.minutes + ":" + now.seconds;

	var lyr_clockDaemon = getLayer("clockdaemon");
	lyr_clockDaemon.write(clock);
}
doClockDaemon();
setInterval(doClockDaemon, 1000);