function wincentersize(winURL, wsize, hsize) {
	wsize -= 12;
	hsize -= 32;
	pos = ", top=" + (getVertPos(hsize)-16).toString() + ", left=" +(getHorzPos(wsize)-6).toString();
	size = ", width=" + 	wsize.toString() + ", height=" + hsize.toString();
	features = "center=yes, help=no, resizable=yes, scrollbars=auto, status=no" + pos + size;
	win = window.open(winURL, '', features)
}

function windialogsize(winURL, dlgWidth, dlgHeight) {
	dlgWidth -= 12;
	dlgHeight -= 32;
	params = null;
	features = "dialogWidth: " + dlgWidth.toString() + "px; dialogHeight: " + dlgHeight.toString() + "px; center: yes; help: no; resizable: no; scroll: no; status: no;";
	dlg = window.showModalDialog(winURL, params, features)
}

function getHorzPos(wsize) {
	var halfScreen = window.screen.width / 2;
	var halfWin = wsize / 2;
	var hGap = 6;
	var hPos = halfScreen - halfWin// - hGap;
	return hPos;
}
function wincentersizeBars(winURL, wsize, hsize) {
	wsize -= 12;
	hsize -= 32;
	pos = ", top=" + (getVertPos(hsize)-16).toString() + ", left=" +(getHorzPos(wsize)-6).toString();
	size = ", width=" + 	wsize.toString() + ", height=" + hsize.toString();
	features = "center=yes, help=no, resizable=yes, scrollbars=yes, status=yes" + pos + size;
	win = window.open(winURL, '', features)
}
