function openNewWindow(url, windowName, W,H) {
  	if (!windowName) windowName = "default";

	if (!H) heightVar = 400;
	else if (H < 1) heightVar = 1;
	else heightVar = H;

	if (!W) widthVar = 400;
	else if (W < 1) widthVar = 1;
	else widthVar = W;


	Xpos = (screen.width / 2);
	Ypos = (screen.height / 2);

	Xwin = (widthVar / 2);
	Ywin = heightVar / 2;

	X = Xpos - Xwin;
	Y = Ypos - Ywin - 50;

	newWin = window.open(url,windowName,"width="+widthVar+",height="+heightVar+",top="+Y+",left="+X+",location=0,resizable=0,status=1,titlebar=1,directories=0,toolbar=0,menubar=0,scrollbars=1");
	newWin.focus();
	onscreen = true;
}