Here's an example:

Code:
<script type="text/javascript">
    var h = 500;
    var w = 500;
    
    var l = (screen.width - w) / 2;
    var t = (screen.height - h) / 2;
    
    window.open('about:blank', 'blank', 'width='+w+', height='+h+', top='+t+', left='+l); 
</script>
h is the height you want the window to be, w is the width.

It then calculates what the top and left needs to be for it to be centered and opens the window.