Much as I dislike them and know them to be unprofessional, I have been tasked with popping up an unsolicited window. I figure I'll try and make it as painless as possible for the user.
This popup code creates a cookie that prevents the popup from appearing unless the user hasn't been on the site for 90 days. As a side effect, it tracks how many times they have been on the site.