<div><center><span id="hours"></span></center></div> <script type="text/javascript"> obj_hours=document.getElementById("hours"); function wr_hours() { time_wr=((time_hours<10)?"0":"")+time_hours; time_wr+=":"; time_wr+=((time_min<10)?"0":"")+time_min; time_wr+=":"; time_wr+=((time_sec<10)?"0":"")+time_sec; time_wr=""+time_wr; obj_hours.innerHTML=time_wr; } wr_hours(); setInterval("wr_hours();",1000); </script>