Thank you for replying.
I'm using the onUnload feature for an intranet webpage that i'm designing, not for evil purposes
But incase someone else should have the same question as I, here is the code for how i implemented it:
Use single quotes around your url, windowname and whatever features list (if any) you declare for the new window.
Thank you again for your help!