Session Timeout functionality

Hi, I am wondering if there is a “simple” way to implement some sort of session timeout functionality with flash. I have a login page where users enter username/pass contained in MySQL database. I would like to be able to time them out after a set period of time, so if they left the computer, and came back 30 min later and tried to click, it would take them back to the login.

If anyone has any ideas of how to go about this, that would be great. Thanks.

Just a thought, but would something like a php script that checks their username/login/ip against the login time work? If this function was added to every button on the site, would that put a huge strain on the server and speed of the site?