Show popup in centre of screen/browser
<pre><code>&lt;html&gt;
&lt;head&gt;
&lt;script language="javascript" type="text/javascript" &gt;

function popupwindow(url, title, w, h)
{
    var left = (screen.width/2)-(w/2);
    var top = (screen.height/2)-(h/2);
    var new_left = window.screenX + (((window.outerWidth/2) - (w/2)));
    var new_top = window.screenY + (((window.outerHeight/2) - (w/2)));

    return window.open(url, title, 'width='+w+', height='+h+', top='+new_top+', left='+new_left+',toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, copyhistory=no');
}

popupwindow('index.html','','1024','768');


&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;

&lt;/body&gt;
&lt;html&gt;
</code></pre>
