function openWindow(url, w, h) {
    var left = parseInt((screen.availWidth/2) - (w/2));
    var top = parseInt((screen.availHeight/2) - (h/2));
    var wFeatures = "width=" + w + ",height=" + h + ",status,resizable,scrollbars=yes,left=" + left + ",top=" + top + "screenX=" + left + ",screenY=" + top;
    window.open(url, "_blank", wFeatures);
}