Opening a popup window on Exit

How do you make a new automatically launched window that goes to a URL if the user exits from the site? You can achieve this
effect by using the onUnload event, although we encourage you to use this script sparingly.