In case you are interested I had no idea how do this. I found all the information using Google.
function initializePage()
{
document.onkeydown = function()
{ SetupTimer(); }
document.onmousemove = function()
{ SetupTimer(); }
SetupTimer();
}
var activityTimer = null;
function SetupTimer()
{
if(null != activityTimer) clearTimeout(activityTimer);
activityTimer = setTimeout("alert('Timed out')", 5000);
}
led mike