How to open new window (popup) and center on screen : Creates a new secondary browser window and loads the referenced resource.

<script type="text/javascript">  
function PopUpManager(url, title,w,h) {
var left = (screen.width/2)-(w/2);
var top = (screen.height/2)-(h/2);
var targetWin = (url, title, 'width='+w+', height='+h+', top='+top+', left='+left);

Here is an example, click on this link to activate the popup.

This has been tested with IE9, Chrome, Firefox 12.0, Opera and Safari.

If you want to include scrollbars in your popup window you can use this property “scrollbars=1”