Not entirely sure, but try this and see if it works:
<BODY onLoad="setTimeout('window.close()', 5000)">
The 5000 is milliseconds, which means 5 seconds! ^_^
Use appropriately, modify to your needs! I just tested this and it works, in a literal context. This will close the window in 5...