playing=false;
function startClock(){
  if(playing==false) {
    the_time=setInterval('document.game.timer.value++',1);
  }
  playing=true;
}

function stopClock() {
  // You can change the two numbers ("500") below to a different value.
  score=Math.abs(document.game.timer.value-500);
  if(playing==true&&score<500) {
    clearInterval(the_time);
    alert('Your score is '+score+'.');
    playing=false;
    if(score==0) {
      alert('Woo hoo! Perfect Score!');
    }
  document.game.timer.value=0;
  }
}

