function showPatientAssoc($attributes, $clsRpt, $volRec, $lVolID, $volClient)
{
    //---------------------------------------------------------------------
    //
    //---------------------------------------------------------------------
    $bActive = $volRec->bActive;
    $attributes->bCloseDiv = false;
    $attributes->divID = 'pAssoc';
    $attributes->divImageID = 'pAssocDivImg';
    $attributes->lUnderscoreWidth = 400;
    if ($bActive) {
        $strLinkAddNewA = strLinkAdd_PatientAssociation($lVolID, 'Add patient association', true) . ' ' . strLinkAdd_PatientAssociation($lVolID, 'Add patient association', false);
    } else {
        $strLinkAddNewA = '';
    }
    openBlock('Volunteer/Patient Associations', $strLinkAddNewA, $attributes);
    if (count($volClient) == 0) {
        echoT('<i>No associated patients</i>');
    } else {
        echoT('
            <table class="enpRpt">
               <tr>
                  <td class="enpRptLabel">
                     Patient ID
                  </td>
                  <td class="enpRptLabel">
                     Patient
                  </td>
                  <td class="enpRptLabel">
                     Status
                  </td>');
        if ($bActive) {
            echoT('
                  <td class="enpRptLabel">
                     &nbsp;
                  </td>
                  <td class="enpRptLabel">
                     &nbsp;
                  </td>');
        }
        echoT('
               </tr>');
        foreach ($volClient as $vc) {
            $bVCActive = $vc->bActive;
            if ($bVCActive) {
                $strALabel = 'Set inactive';
                $lRowSpan = 3;
                $strNameColor = '#000';
            } else {
                $strALabel = 'Set active';
                $lRowSpan = 2;
                $strNameColor = '#999';
            }
            $lAssocID = $vc->lKeyID;
            $lPatientID = $vc->lPatientID;
            echoT('
               <tr class="makeStripe">
                  <td style="vertical-align: top; color: ' . $strNameColor . ';" class="enpRpt">' . strLinkView_PatientRecord($lPatientID, 'View patient record', true) . '&nbsp;' . str_pad($lPatientID, 5, '0', STR_PAD_LEFT) . '
                  </td>');
            echoT('
                  <td style="vertical-align: top; padding-right: 8px; color: ' . $strNameColor . ';" class="enpRpt">' . htmlspecialchars($vc->patient->strLName . ', ' . $vc->patient->strFName) . '
                  </td>');
            echoT('
                  <td style="vertical-align: top; padding-right: 8px; color: ' . $strNameColor . ';" class="enpRpt">' . ($bVCActive ? '<b>Active</b>' : 'Inactive') . '
                  </td>');
            if ($bActive) {
                if ($bVCActive) {
                    echoT('
                     <td style="vertical-align: top;" class="enpRpt">' . strLinkAdd_HospicePVist($lVolID, $vc->lPatientID, 'Add patient visit', true) . '&nbsp;' . strLinkAdd_HospicePVist($lVolID, $vc->lPatientID, 'Add patient visit', false) . '
                     </td>');
                } else {
                    echoT('
                     <td style="vertical-align: top;" class="enpRpt">&nbsp;</td>');
                }
                echoT('
                     <td style="vertical-align: top;" class="enpRpt">' . strLink_VolAssocActiveInactive($lVolID, $lAssocID, !$bActive, $strALabel, true) . '&nbsp;' . strLink_VolAssocActiveInactive($lVolID, $lAssocID, !$bActive, $strALabel, false) . '
                     </td>');
            }
            echoT('
               </tr>');
        }
        echoT('</table>');
    }
    $attributes->bCloseDiv = true;
    closeBlock($attributes);
}
} else {
    foreach ($vols as $vol) {
        $bInactive = $vol->bInactive;
        $lVolID = $vol->lKeyID;
        $lAcctID = $vol->lAcctID;
        if ($bInactive) {
            $strColor = ' color: #888;';
        } else {
            $strColor = '';
        }
        if ($bInactive) {
            $strLinkResetPW = $strLinkAddMiscAct = $strLinkAddNewAssoc = $strLinkTraining = '';
        } else {
            $strLinkResetPW = strLinkEdit_ResetPWord($lAcctID, true, 'Password') . '&nbsp;' . strLinkEdit_ResetPWord($lAcctID, false, 'Password') . '<br>';
            $strLinkAddMiscAct = strLinkAdd_VolMgrAddMiscVolActivity($lVolID, 'Vol. activity', true, ' id="otherVAct_' . $lVolID . '" ') . '&nbsp;' . strLinkAdd_VolMgrAddMiscVolActivity($lVolID, 'Vol. activity', false) . '<br>';
            $strLinkAddNewAssoc = strLinkAdd_PatientAssociation($lVolID, 'Add association', true, ' id="pvAssoc_' . $lVolID . '" ') . '&nbsp;' . strLinkAdd_PatientAssociation($lVolID, 'Add association', false) . '<br>';
            $strLinkTraining = strLinkView_VMgrViewVolTraining($lVolID, 'Training Log', true, ' id="vTrain_' . $lVolID . '" ') . '&nbsp;' . strLinkView_VMgrViewVolTraining($lVolID, 'Training Log', false);
        }
        echoT($clsRpt->openRow(true));
        echoT($clsRpt->writeCell(strLinkView_VolRecord($lVolID, 'View record', true, ' id="vvolRec_' . $lVolID . '" ') . '&nbsp;' . str_pad($lVolID, 5, '0', STR_PAD_LEFT), 60, 'text-align: center;' . $strColor));
        echoT($clsRpt->writeCell(($vol->bInactive ? 'No' : 'Yes') . '&nbsp;' . strLink_VolActiveInactive($lVolID, $bInactive, 'Set to ' . ($bInactive ? 'active' : 'inactive'), true), 60, 'text-align: center;' . $strColor));
        //---------------------------
        // name
        //---------------------------
        echoT($clsRpt->writeCell($vol->strSafeNameLF . '<br><br>' . strLinkView_VMgrViewVolLog($lVolID, 'Volunteer Log', true) . '&nbsp;' . strLinkView_VMgrViewVolLog($lVolID, 'Volunteer Log', false) . '<br>', 220, $strColor));
        //---------------------------
        // address
        //---------------------------
        $strPC = trim(strPhoneCell($vol->strPhone, $vol->strCell, true, true));
        if ($strPC != '') {
            $strPC .= '<br>';