var mywindow;

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