function LFPopup_open(strURL, strName, nWidth, nHeight, nTop, nLeft, bScroll) {
	if (typeof(nWidth) == "undefined")
		nWidth = 10;
	if (typeof(nHeight) == "undefined")
		nHeight = 10;
		
	var szScroll = "auto"
	if (typeof(bScroll) != "undefined" && bScroll)
		szScroll = "yes"

	if (nWidth > screen.width)
		nWidth = screen.width
	if (nHeight > screen.height)
		nHeight = screen.height

	var strStyle = "width=" + nWidth + ",height=" + nHeight;
	if (typeof(nTop) != "undefined")
		strStyle += ",top=" + nTop;
	if (typeof(nLeft) != "undefined")
		strStyle += ",left=" + nLeft;
	strStyle += ",history=no,status=no,resizable=no,scrollbars=" + szScroll + ",manubar=no";
	
	var objChild = window.open(strURL, strName, strStyle);
	objChild.focus();
	
	return objChild;
}

function LFPopup_openCenter(strURL, strName, nWidth, nHeight, bScroll) {
	nTop = (screen.height) ? (screen.height - nHeight) / 2 : 0;
  	nLeft = (screen.width) ? (screen.width - nWidth) / 2 : 0;

	return LFPopup_open(strURL, strName, nWidth, nHeight, nTop, nLeft, bScroll);
};

function LFPopup_moveCenter(objDlg, nWidth, nHeight)
{
	if (typeof(nWidth) == "undefined")
		nWidth = objDlg.width;
	if (typeof(nHeight) == "undefined")
		nHeight = objDlg.height;
		
	if (nWidth > screen.width)
		nWidth = screen.width
	if (nHeight > screen.height)
		nHeight = screen.height
		
	objDlg.resizeTo(nWidth, nHeight);
	
	var nTop = (screen.height) ? (screen.height - nHeight) / 2 : 0;
  	var nLeft = (screen.width) ? (screen.width - nWidth) / 2 : 0;
  	
  	objDlg.moveTo(nLeft, nTop);
}
