function OpenBrowseWindow(aURL,aMatterID)
{
	var wOpen;
	var Row;
	var TheseOptions;
	var CurrentType;

	TheseOptions = 'status=yes,menubar=yes,scrollbars=yes,resizable=yes,toolbar=yes';
	TheseOptions = TheseOptions + ',width=750';
	TheseOptions = TheseOptions + ',height=' + (screen.availHeight - 112).toString();
	TheseOptions = TheseOptions + ',screenX='+ (screen.availWidth - 750).toString() + ',screenY=0,left='+ (screen.availWidth - 750).toString() + ',top=0';
	var CurrentMatterID = aMatterID ;
	if (CurrentMatterID == 0) {
		Row = obj.getCurrentRow();	
		CurrentMatterID = obj.getCellText(10, Row) ;
		CurrentType = obj.getCellText(9, Row) ;
	} else {
		CurrentType = '' ;
	}
	if (CurrentMatterID !== "") {
		wOpen = window.open( '', 'BrowseWindow', TheseOptions );
		if (aURL == "ProgressReport") {
			if ((CurrentType == "TRN") || (CurrentType == "BON") || (CurrentType == "CAN")) {
			   wOpen.location = 'ProgressReport.php?MatterID='+CurrentMatterID;
			} else {
			   wOpen.location = 'BrowseFileNote.php?MatterID='+CurrentMatterID;
			}
		} else {
		   wOpen.location = aURL + '.php?MatterID='+CurrentMatterID;
		}
		wOpen.focus();
//		wOpen.moveTo( screen.availWidth - 750, 0 );
//		wOpen.resizeTo( 750, screen.availHeight );
	} 
}
function OpenFormWindow5(aURL)
{
	var wOpen;
	var Row;
	var TheseOptions;


	TheseOptions = 'status=yes,menubar=yes,scrollbars=yes,resizable=yes,toolbar=yes';
	TheseOptions = TheseOptions + ',width=750';
	TheseOptions = TheseOptions + ',height=' + (screen.availHeight - 112).toString();
	TheseOptions = TheseOptions + ',screenX='+ (screen.availWidth - 750).toString() + ',screenY=0,left='+ (screen.availWidth - 750).toString() + ',top=0';

    Row = obj.getCurrentRow();	
//	var RecordID = obj.getCellText(4, Row) ;
	var FirmCode = obj.getCellText(5, Row) ;

	wOpen = window.open( '', 'BrowseWindow', TheseOptions );
//    wOpen.location = aURL + '.php?RecordID='+RecordID;
    wOpen.location = aURL + '.php?FirmCode='+FirmCode;
	wOpen.focus();
	
}

function OpenChildWindow(aURL)
{
	var wOpen;
	var TheseOptions;

	TheseOptions = 'status=yes,menubar=yes,scrollbars=yes,resizable=yes,toolbar=yes';
	TheseOptions = TheseOptions + ',width=750';
	TheseOptions = TheseOptions + ',height=' + (screen.availHeight - 112).toString();
	TheseOptions = TheseOptions + ',screenX='+ (screen.availWidth - 750).toString() + ',screenY=0,left='+ (screen.availWidth - 750).toString() + ',top=0';
		wOpen = window.open( '', 'ChildWindow', TheseOptions );
    	wOpen.location = aURL;
		wOpen.focus();
}


function OpenChildWindowWithFirmCode(aURL)
{
	var wOpen;
	var Row;
	var TheseOptions;


	TheseOptions = 'status=yes,menubar=yes,scrollbars=yes,resizable=yes,toolbar=yes';
	TheseOptions = TheseOptions + ',width=750';
	TheseOptions = TheseOptions + ',height=' + (screen.availHeight - 112).toString();
	TheseOptions = TheseOptions + ',screenX='+ (screen.availWidth - 750).toString() + ',screenY=0,left='+ (screen.availWidth - 750).toString() + ',top=0';

    Row = obj.getCurrentRow();	
	var CurrentFirmCode = obj.getCellText(0, Row) ;

	wOpen = window.open( '', 'BrowseWindow', TheseOptions );
    wOpen.location = aURL + '.php?FirmCode='+CurrentFirmCode;
	wOpen.focus();
	
}

function OpenFormWindow(aURL)
{
	var wOpen;
	var Row;
	var TheseOptions;


	TheseOptions = 'status=yes,menubar=yes,scrollbars=yes,resizable=yes,toolbar=yes';
	TheseOptions = TheseOptions + ',width=750';
	TheseOptions = TheseOptions + ',height=' + (screen.availHeight - 112).toString();
	TheseOptions = TheseOptions + ',screenX='+ (screen.availWidth - 750).toString() + ',screenY=0,left='+ (screen.availWidth - 750).toString() + ',top=0';

    Row = obj.getCurrentRow();	
	var RecordID = obj.getCellText(5, Row) ;

	wOpen = window.open( '', 'BrowseWindow', TheseOptions );
    wOpen.location = aURL + '.php?RecordID=' + RecordID;
	wOpen.focus();
	
}

function OpenFormWindow3(aURL)
{
	var wOpen;
	var Row;
	var TheseOptions;


	TheseOptions = 'status=yes,menubar=yes,scrollbars=yes,resizable=yes,toolbar=yes';
	TheseOptions = TheseOptions + ',width=750';
	TheseOptions = TheseOptions + ',height=' + (screen.availHeight - 112).toString();
	TheseOptions = TheseOptions + ',screenX='+ (screen.availWidth - 750).toString() + ',screenY=0,left='+ (screen.availWidth - 750).toString() + ',top=0';

    Row = obj.getCurrentRow();	
	var RecordID = obj.getCellText(3, Row) ;

	wOpen = window.open( '', 'BrowseWindow', TheseOptions );
    wOpen.location = aURL + '.php?RecordID=' + RecordID;
	wOpen.focus();
	
}

function OpenFormWindow2(aURL)
{
	var wOpen;
	var Row;
	var TheseOptions;


	TheseOptions = 'status=yes,menubar=yes,scrollbars=yes,resizable=yes,toolbar=yes';
	TheseOptions = TheseOptions + ',width=750';
	TheseOptions = TheseOptions + ',height=' + (screen.availHeight - 112).toString();
	TheseOptions = TheseOptions + ',screenX='+ (screen.availWidth - 750).toString() + ',screenY=0,left='+ (screen.availWidth - 750).toString() + ',top=0';

    Row = obj.getCurrentRow();	
	var RecordID = obj.getCellText(4, Row) ;

	wOpen = window.open( '', 'BrowseWindow', TheseOptions );
    wOpen.location = aURL + '.php?RecordID=' + RecordID;
	wOpen.focus();
	
}

function OpenBigWindow(aURL,aWinName)
{
	
   var wOpen;
   var sOptions;

   sOptions = 'status=yes,menubar=yes,scrollbars=yes,resizable=yes,toolbar=yes';
   sOptions = sOptions + ',width=' + (screen.availWidth - 10).toString();
   sOptions = sOptions + ',height=' + (screen.availHeight - 122).toString();
   sOptions = sOptions + ',screenX=0,screenY=0,left=0,top=0';

   wOpen = window.open( '', 'MaxWindow', sOptions );
   wOpen.location = aURL;
   wOpen.focus();
   wOpen.moveTo( 0, 0 );
   wOpen.resizeTo( screen.availWidth, screen.availHeight );

}