title: Position javascript window.open centered on secondary screen?
body: <p>I have this code from an <a href="http://www.javascriptkit.com/javatutors/advwin2.shtml" rel="nofollow">example</a>:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  function open_and_move2(){
  
  win3=window.open("page.htm","","width=600,height=500")
  win3.moveTo(screen.width/2-300,screen.height/2-250)
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>It works just fine with the exception that, if the browser window is located at a secondary screen, the javscript window pops up on the main screen.</p>
  
  <p>Seems like the calculated offsets would be correct for the secondary screen, but the offsets are executed on an absolute scope.</p>
  
  <p>I would like to have a window open on click positioned in the middle of the current screen or current window.</p>
  
  <p>How can I do that?</p>
  
  <p>The reason is that I am implementing single sign on for a website and this should be used for a comments plugin.</p>