The onUnload event is notoriously unreliable. The document can get unloaded before the event gets properly triggered. For this reason it is best to avoid using it.
I should also say that what you are trying to do is very unfriendly. If people wanted to go to http://www.example.com they could go there themselves, so don't try to force them to go there when they unload your page. Stuff like that gives all us webmasters a bad name.
[edited by: BlobFisk at 8:56 am (utc) on June 24, 2005] [edit reason] Changed example URL to example.com [/edit]