check this :
http://webscripts.softpedia.com/scriptDownload/Auto-Hide-Popup-Download-23045.htmlyou create a hidden window before the user close it and when the popup window detect the parent is closed (set a timer to check if window.opener is null) you run a second timer to show itself after 5 minutes