Firstly, for this to be effective, you have to make sure users are logged out on the server at the end of this idle time. Otherwise, nothing you do on the client side is effective. If you send them to a login page, they can just click the back button.
Second, the conventional way to do this is to use a "meta refresh" tag. Adding this to the page:
<meta http-equiv="refresh" content="900;url=http://example.com/login"/>
will send them to the login page after 15 minutes (900 seconds). This will send them there even if they are doing something on the page. It doesn't detect activity. It just knows how long the page has been up in the browser. This is usually good enough because people don't take 15 minutes to fill in a page (stackoverflow.com is a notable exception, I guess.)
If you really need to detect activity on the page, then I think your first instinct is correct. You're going to have to add event handlers to several things. If you are worried about messing with other scripting for validation or other things, you should look at adding event handlers programmatically rather than inline. That is, instead of using
<input type="text" onClick="doSomething;">
Access the object model directly with
Mozilla way: element.addEventListener('click' ...)
Microsoft way: element.attachEvent('onclick' ...)
and then make sure you pass along the events after you receive them so existing code still does whatever (validation?) it is supposed to do.
http://www.quirksmode.org/js/introevents.html has a decent write up on how to do this.
--
bmb