<script language="JavaScript" type="text/JavaScript">
<!-- JS Crono - Copyright 2008, ScriptShow. All rights reserved. -->
<!-- Feel free to use if you leave this header intact! -- scriptshow@hotmail.com -->
<!--
sCount = 00;
mCount = 00;
tCount = null;
function startCount(mCount,sCount){
if (isNaN(mCount) || mCount=="" || isNaN(sCount) || sCount==""){
alert("No es un número. Prueba de nuevo.");return false;
}
document.getElementById("nCount").innerHTML = xforms.xCount.value;
document.getElementById("yCount").innerHTML = mCount +":"+ sCount;
if (sCount <= 60){
sCount ++;
sCount = checkCero(sCount);
}
if (sCount >= 60){
mCount ++;
sCount = "0"+"0";
mCount = checkCero(mCount);
}
tCount = setTimeout("startCount('"+mCount+"','"+sCount+"')",1000);
}
function checkCero(i)
{
if (i<10)
{
i="0" + i;
}
return i;
}
//-->
</script>
<center>
<hr color="#000000" size="4" noshade>
<fieldset style="width:240px;height:200px;font-family:sans-serif;color:#000000">
<legend id="nCount">Crono</legend>
<div id="yCount" style="font-size:40px;width:146;height:45">00:00</div>
</font>
<form name="xforms">
<input name="xCount" type="text" size="16" value="Titulo" maxlength="10">
<br>
<input name="xMin" type="text" size="2" value="00" maxlength="2">
:
<input name="xSeg" type="text" size="2" value="00" maxlength="2">
<br><br>
<input type="button" value="Start" onClick="clearTimeout(tCount);startCount(xforms.xMin.value,xforms.xSeg.value)">
<input type="button" value="Stop" onClick="clearTimeout(tCount);">
</form>
</fieldset>
<hr color="#000000" size="4" noshade>
</center>
</font>