function header_time() {
	var now = new Date();
	
	//console.log(now);
  var day = now.getDate();
  var month = now.getMonth() + 1;
  var year = now.getYear();
  if (year < 999)
    year += 1900;
	
	var hours = now.getHours();
	var minutes = now.getMinutes();
	var seconds = now.getSeconds();

	var thetime = (day < 10) ? "0" + day + "." : day + ".";
	thetime += (month < 10) ? "0" + month + "." : month + ".";
	thetime += year + " ";

	thetime += (hours < 10) ? "0" + hours + ":" : hours + ":";
	thetime += (minutes < 10) ? "0" + minutes + ":" : minutes + ":";
	thetime += (seconds < 10) ? "0" + seconds : seconds;

	element = document.getElementById("clock");
	element.innerHTML = thetime;
	
	window.setTimeout("header_time()", 1000);
}
