Is there a script that will allow you to have a pop-up window open when you leave a domain (or exit your browser), but will still allow you to navigate within your domain without the pop-up window opening on every page?

Thank you.