Window.open if window is not open then call another function + timer
<p>I use the following code to open a new window with window.open and if somebody manually closes the window it will call the pause() function.</p>

<pre><code>    &lt;script type="text/javascript"&gt;

        var win = window.open("link.html", "thePopUp", "");
            var pollTimer = window.setInterval(function() {
if (win.closed !== false) { // !== is required for compatibility with Opera
    window.clearInterval(pollTimer);
    pause();
}
}, 200);

    &lt;/script&gt;
</code></pre>

<p>BUT for that pause() function to work the user will need to be allowing popups for the window to first open and then to manually close it.</p>

<p>I would like the pause() function to be called if the window was never open in the first place so even if they aren't allowing popups.</p>
