Check users idle time and generating a message that they will be logged out

Anyone have a suggestion on handling user idle time?
Basically if a users session is idle for x amount of time, then a message is displayed to either Cancel to stay logged in or OK to log out. Or if no action taken the user is logged out after x minutes.
The application already will log the user out, based on the application.cfc, but would like to generate a message to them as well.