my problem is that I can not stop a timer.
I had this method to set a timeout from this forum. It supposed to store the identifyer in the global variable. By accid
I think you misunderstand 'setTimeout' and 'clearTimeout'.
If you want to set a timer that you want to cancel later, do something like:
foo = setTimeout(function, time);
then call
clearTimeout(foo);
if you want to cancel that timer.
Hope this helps!