Abhi this really depends on the platform being used to house the website. If it's WordPress, you can say for certain there's a plugin that does this. If not, there's always jQuery.
Personally, I find those popups to be very invasive and dislike them immensely - to the point where I won't visit that site again. I do the same for sites that ask me to disable my popup blocker. That's like locking the house then leaving the key on the doorstep. You just wouldn't do it.