I've been playing around on my off time from other work to learn javascript better so I made this little php javascript game that randomly puts 10 boxes in different locations in a 10x10 table. The object is to close the boxes by clicking them and get timed on how long it takes to close all 10 boxes.

The problem is you can click the same box real fast and only have to click a couple boxes for the timer to stop. So what I'd like to know what is the best way to only accept one click for each box generated. Here is what I'm using so far for the click validation:

Code:
<script language="javascript">
var tovalidate = 10;
function validate()
{
tovalidate -= 1;
if(tovalidate === 9)
starttimer();
if(tovalidate === 0)
stoptimer();
}
</script>
And using Jquery to fade the boxes pretty after click and trigger the validator:

Code:
<script>
  $("#<?=$c;?>").click(function () {  /*where $c is id generated for each specific box */
  $("#<?=$c;?>").fadeOut("slow");
  validate();
  });
  </script>