Opening a popup window at center of the screen

Opening a popup window at center of the screen :

Level : Beginner

You can open popup window through javascript. But opening it at center of the screen will make it look good for all size of screen.
Following is the way to do it :

This is the link to open popup window

OPEN GOOGLE

and the javascript function is

function popup(pageURL, title, popupWidth, popupHeight)
    {
        var left = (screen.width / 2) - (popupWidth / 2);
        var top = (screen.height / 2) - (popupHeight / 2);
        var targetPop = window.open(pageURL, title, 'toolbar=no, location=no, directories=no,
status=no, menubar=no, scrollbars=YES, resizable=YES, copyhistory=no, width=' + popupWidth + ',
height=' + popupHeight + ', top=' + top + ', left=' + left);
    }
150 150 Burnignorance | Where Minds Meet And Sparks Fly!