function popupWindowURL(url, winname, w, h, menu, resize, scroll)
{
    var x = (screen.width-w)/2;
    var y = (screen.height-h)/3;

	if (winname == null)
		winname = "newWindow";
	
// 		w = 520;
//  		h = 350;
	
	if (resize == null)
		resize = 1;

	menutype   = "nomenubar";
	resizetype = "noresizable";
	scrolltype = "noscrollbars";
	
	if (menu)
		menutype = "menubar";
	
	if (resize)
		resizetype = "resizable";
	
	if (scroll)
		scrolltype = "scrollbars";
	
    cwin = window.open(url,winname,"top=" + y + ",left=" + x + ",screenX=" + x + ",screenY=" + y + "," + "status," + menutype + "," + scrolltype + "," + resizetype + ",width=" + w + ",height=" + h);

	if (!cwin.opener)
		cwin.opener = self;

	cwin.focus();

	return true;
}

