<html>

<head>

<SCRIPT>
var interval = "";
var i = 5;

function startInterval()
{
    interval = window.setInterval("tTimer()",1000);
}
function stopInterval()
{
    window.clearInterval (interval);
    interval="";
}
function tTimer()
{
    document.f.display.value = i--;
    if (i == -1)
    {
        stopInterval();
        alert ("TIME'S UP");
    }
}
</SCRIPT>

</head>

<body>

<form name=f>

<input type=text name=display value="">

</form>

<script>
startInterval();
</script>

</body>

</html>