I need a little help with a timer function. It needs to be possible to reset the timer if:

* mouse movement is detected
* any key is pressed

I have experimented with onMouseMove attached to the BODY tag, but it constantly triggered the action required (an alert, for the initial purposes of testing) - I got into a loop and could never get out!

Has anyone used anything like this before? And if so, could you help?

Mille grazie