Javascript Session time out countdown in progress bar
===

I need your help in getting the appropriate code for showing the count down for the session time out in the progress bar or any part of the screen.

However, these actions should be included:

First Alert: "You have 5 minutes before your session expires"
Click here to continue your session.
or
Click here to logout

if no action in 5 mins then change the page to display "Your session has expired" and will be redirected to logout.jsp.

I tried to find good examples, but I did not find anyone.

Can anyone help on that issue.