title: How to position a pop up to be in the top right part of the screen
body: <p>What I want to do is to change the size of a window and create a window next to it so they are exactly next to each other. In that sense, I need to position to the new window to the top right part of the screen, the way I am doing it is not working (code is below), I need help :)</p>
  
  <pre><code>function () { 
     var viewportwidth = document.documentElement.clientWidth;
     var viewportheight = document.documentElement.clientHeight;
     window.resizeBy(-300,0); 
     window.open("something.htm",
       "mywindow",
       "width=300,
       height=viewportheight,
       left=(viewportwidth - 300),
       top=0,
       screenX=0,
       screenY=0"); 
  }
  </code></pre>