var timerID=null;var timerRunning=false;var Hora;function runClock(){var tmp=timeNow();window.status= tmp;window.document.getElementById('Crono').innerHTML=tmp;timerID=setTimeout("runClock()",1000);timerRunning=true;}function timeNow(){var Segundos,seconds,minutes,hours,timeStr;var now=new Date();Segundos=parseInt((now-Hora)/1000);seconds=Segundos%60;minutes=parseInt(Segundos/60)%60;hours=parseInt(Segundos/3600)%60;timeStr=hours+((minutes < 10) ? ":0" : ":")+minutes;timeStr += ((seconds < 10) ? ":0" : ":")+seconds;return timeStr;}function Arranca(){if (timerRunning) return;Hora=new Date();runClock();}function Para(){var tmp=timeNow();if (timerRunning){clearTimeout(timerID); window.document.getElementById('Crono').innerHTML=tmp; window.status='Tiempo empleado: '+tmp; timerRunning=false;}}function MSeg(){var now=new Date();return (now-Hora).toString();}
