var newwin = null;
var hh, ww, xx, yy
function openWindowFocus(url, fullscreen, width, height) {
	if(fullscreen) {
		hh = screen.availHeight;
		ww = screen.availWidth;
		xx = 0;
		yy = 0;
	} else {
		hh = height;
		ww = width;
		xx = (screen.availWidth / 2) - (width / 2);
		yy = (screen.availHeight / 2) - (height / 2);
	}
	newwin = window.open(url, 'newWinObj', 'width=' + ww + ', height=' + hh + ', left=' + xx + ', top=' + yy + ', resizable=yes, toolbar=no, status=no, scrollbars=no, location=no, menubar=no, directories=no');
	if(newwin != null && newwin.opener == null)
	{
		newwin.opener = window;
	}
	newwin.focus();
	newwin.creator = self;
}