rendered paste body<html><head><script>//7:00:00:00var countId = 0function counter(strTime) { var id = (++countId)var outPut = "<input type='text' value='"+strTime+"' id='counter_"+id+"' />"document.writeln(outPut)countDown(id)}function countDown(id) { var timeArray = [-1,23,59,59]var timeelm = document.getElementById("counter_"+id)time = timeelm.valuevar stime = time.split(":")for (var i =stime.length-1;i>=0;i--) { var t = parseInt(stime[i].replace(/^0/,""))r = stime[i] = (--t < 0)?timeArray[i]:tif (r == timeArray[i]) continuebreak}if (parseInt(stime[0]) == -1) {timeelm.value = "00:00:00:00"timeelm.style.backgroundColor = "red"}else {timeelm.value = stime.join(":").replace(/\b(\d)\b/g,"0$1")setTimeout("countDown("+id+")",1000)}}</script></head><body><h3>testing below<h3><br> <div><script> counter("7:00:10:00") </script></div><h3>testing below<h3><br> <div><script> counter("00:00:00:15") </script></div><h3>testing below<h3><br> <div><script> counter("2:15:10:25") </script></div><h3>testing below<h3><br> <div><script> counter("3:20:10:49") </script></div></body></html>