var clockID = 0;

function tS() {
  x=new Date();
  x.setTime(x.getTime());
  return x;
} 
function lZ(x) {
  return (x>9) ? x : "0" + x;
}
function y4(x) {
  return (x<500) ? x+1900 : x;
}

var dN = new Array("So","Mo","Di","Mi","Do","Mo","Sa");
var mN = new Array("Januar","Februar","M&auml;rz","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember");
var oT = "'[' + dN[tS().getDay()] + ', ' + tS().getDate() + '. ' + mN[tS().getMonth()] + ' ' + y4(tS().getYear()) + ' - ' + lZ(tS().getHours()) + ':' + lZ(tS().getMinutes()) + ':' + lZ(tS().getSeconds()) + ']'";

function UpdateClock() {
  document.getElementById("klocke").innerHTML=eval(oT);
  clockID = setTimeout("UpdateClock()", 500);
} 
function StartClock() {
  clockID = setTimeout("UpdateClock()", 500);
} 
function KillClock() {
   if(clockID) {
      clearTimeout(clockID);
      clockID  = 0;
   }
}
