function hodiny() {
  dnes = new Date();
  with (dnes) { 
    hodin = getHours(); 
    minut = getMinutes(); 
    sekund = getSeconds(); 
  }
  cas = (hodin < 10 ? "0"  : "" ) + hodin;
  cas += (minut < 10  ? ":0" : ":" ) + minut;
  cas += (sekund < 10 ? ":0" : ":" ) + sekund;       
  document.getElementById("cifernik").innerHTML = cas;
  window.setTimeout("hodiny();", 1000);
}

