Use a cron job to set users offline after a certain amount of time.
Just have it run every 5-10 minutes and that will solve the problem without having to rely on javascript to do it (which is not a good thing to do).
Reputation Points: 235
Solved Threads: 193
Nearly a Posting Virtuoso
Offline 1,315 posts
since Jun 2007