Kód:
function timedCount(prvek)
{
var x = document.getElementById(prvek).value=c;
c=c+1;
t=setTimeout("timedCount('"+prvek+"')",1000);
}

...
onUDALOST="timedCount('idprvku');" ...