You can try to use body.onblur event and do a location.href = '/account/logoff' (but it will not work 100%). Also you can specify a small timeout in your web.config (default is 30 minutes).
Code:
<authentication mode="Forms">
      <forms loginUrl="~/Account/LogOn" timeout="5"/>
    </authentication>