function openCenteredWindow(url,ww,hh) {
    var width = ww;
	var height;
	if ( hh==0 ) {
		height = screen.availHeight-200;
	} else { 
		height = hh;
	}
    var left = parseInt((screen.availWidth/2) - (width/2));
    var top = parseInt((screen.availHeight/2) - (height/2));
	var scrolls;
	if (hh == 0) { scrolls = 'yes' } else { scrolls = 'no' };
	var windowFeatures = "width=" + width + ",height=" + height + ",status=no, location=no, toolbar=no, menubar=no, scrollbars="+scrolls+", resizable=no,left=" + left + ",top=" + top + "screenX=" + left + ",screenY=" + top;
    myWindow = window.open(url, "subWind", windowFeatures);
}