I need help creating a javascript popup on page load that closes when the parent window closes
<p>First off, thanks for taking the time to check this out and provide assistance. This is a fantastic community.</p>

<p>Alright to my question...I need to create a popup that contains a music player when a site is loaded. Once the site is closed, it should close the popup window. This so far is some coe ive come up with, however I'm not that great at javascript. Right now I'm just trying to build the open close actions. I'll add the player later.</p>

<pre><code>&lt;script language="JavaScript"&gt;
  function load() {
    window.open('http://www.google.com','player','
    height='320,width=320,scrollbars,resizable'); 
  }
  function unload() {
    parent.player.close();
  }
window.onload = load;
window.onunload = unload;
&lt;/script&gt;
</code></pre>

<p>This code does not work. I'm not sure why. What do I have to modify to make it function correctly?</p>
