print implode($va_related_entities, "\n");
            ?>
				</div><!-- end unit -->
<?php 
        }
    }
    # --- occurrences
    $va_occurrences = array();
    if (sizeof($this->getVar('occurrences'))) {
        $t_occ = new ca_occurrences();
        $va_item_types = $t_occ->getTypeList();
        foreach ($this->getVar('occurrences') as $va_occurrence) {
            $t_occ->load($va_occurrence['occurrence_id']);
            $vs_venue = "";
            $va_venues = array();
            $va_venues = $t_occ->getRelatedItemsForDisplay('ca_entities', array('restrict_to_relationship_types' => array('venue')));
            if (sizeof($va_venues) > 0) {
                $va_venue_name = array();
                foreach ($va_venues as $va_venue_info) {
                    $va_venue_name[] = $va_venue_info["displayname"];
                }
                $vs_venue = implode($va_venue_name, ", ");
            }
            $va_occurrences[$va_occurrence['item_type_id']][$va_occurrence['occurrence_id']] = array("label" => $va_occurrence['label'], "date" => $t_occ->getAttributesForDisplay("date", '^display_date'), "year_published" => $t_occ->getAttributesForDisplay("bib_year_published "), "venue" => $vs_venue, "relationship_type_id" => $va_occurrence['relationship_type_id'], "bib_full_citation" => $t_occ->getAttributesForDisplay("bib_full_citation"));
        }
        $va_occ_rel_types = $t_rel_types->getRelationshipInfo('ca_objects_x_occurrences');
        foreach ($va_occurrences as $vn_occurrence_type_id => $va_occurrence_list) {
            ?>
						<div class="unit"><H3><?php 
            print $va_item_types[$vn_occurrence_type_id]['name_singular'] . (sizeof($va_occurrence_list) > 1 ? "s" : "");
            ?>