Better way to write this popup function?
<pre><code>function popUp(URL) {
    day = new Date();
    id = day.getTime();
    eval("page" + id + " = window.open(URL, '" + id + "', 
       'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=400,height=600,left=600,top=300');");
}

&lt;a href="javascript:popUp('http://google.com')"&gt;Open the Popup Window&lt;/a&gt;
</code></pre>

<p>That is the code I have now. I want to change it so that it targets a specific class like "popup" and all links with that class generates a popup window with the link in the <code>href</code>.</p>

<p>Kind of like this: </p>

<pre><code>&lt;a class="popup" href="http://google.com"&gt;Open the Popup Window&lt;/a&gt;
</code></pre>

<p>How would I achieve this?</p>
