var newWindow;
function openCenteredWindow(url) {
    var width = 750;
    var height = 400;
    var left = parseInt((screen.availWidth/2) - (width/2));
    var top = parseInt((screen.availHeight/2) - (height/2));
    var windowFeatures = "width=" + width + ",height=" + height + 
        ",status,resizable,left=" + left + ",top=" + top + 
        ",screenX=" + left + ",screenY=" + top+",scrollbars";
    if (!newWindow || newWindow.closed) {
        newWindow = window.open(url, "newWindow", windowFeatures);
        setTimeout("", 50);
    }else if (newWindow.focus){
        newWindow.focus( );
    }
}