playing=false;
function startClock(){
  if(playing == false) {
    the_time=setInterval('document.game.timer.value++',1);
  }
  playing = true;
}

function stopClock(x) {
  // You can change the two numbers ("500") below to a different value.
  score = Math.abs(document.game.timer.value - x);
  if(playing==true) {
    clearInterval(the_time);
    alert('Puntaje: '+ score);
    playing=false;
    if(score==x) {
      alert('WOO! Perfecto!');
    }
  document.game.timer.value = -100;
  }
}
