title: Display a warning after 3 mins of inactivity on a page
body: <p>I am working on a php page with tests. The max time for a test is 1 hour, but the session times out after 10 mins of inactivity. At timeout, the tests page doesn't refresh or redirect... It stays the same, but when the user hits the "see the results" button at the end of the test, he is logged out and his results are not registred.</p>
  
  <p>I just need - [after 3 mins of inactivity on the page] - to diplay a warning message.
  if after displaying the message the user makes a mouse movement - or click - anywhere on the page, the timer resets without refreshing the page.</p>
  
  <p>If even after displaying the warning message the user didn't moved his mouse or clicked for 7 mins, the message shows "you have been logged out".</p>
  
  <p>I am a beginner in progrmming, but I guess it's pretty simple stuff, displaying 2 messages after 3 and 10 mins of inactivity, both timer reset at mouse movement or click.</p>
  
  <p>Could somebody help me with a nice solution to this? Thanks!</p>