execute a javascript function if the user is not active on the page?
<p>i'm looking for a javascript or jQuery function to execute my function newalert() if the user is not active on the page, ( maybe with some event to check the cursor position or something like this )</p>

<p>i will make it auto check using settimeout , i just want the function to check the availability of user like in gmail chat, when receiving a new IM and you are not watching the gmail page, it plays a bleep sound.</p>

<p>Thanks</p>
