 			MEMBER_AGENT_ID=#agent_id#
 		order by agent_name
 	</cfquery>
-	<ul>
-		<cfloop query="group_member">
-			<li><a href="agentActivity.cfm?agent_id=#GROUP_AGENT_ID#">#agent_name#</a></li>
-		</cfloop>
-	</ul>
-
-
-
-Collected or Prepared specimens:
+	<cfif group_member.recordcount gt 0>
+		<br />Groups:
+		<ul>
+			<cfloop query="group_member">
+				<li><a href="agentActivity.cfm?agent_id=#GROUP_AGENT_ID#">#agent_name#</a></li>
+			</cfloop>
+		</ul>
+	</cfif>
+
 	<cfquery name="collector" datasource="uam_god">
 		select
 			count(distinct(collector.collection_object_id)) cnt,

			media_relations.media_relationship='shows cataloged_item' AND
			collector.agent_id=#agent_id#
	</cfquery>
	<ul>

		<li>
			<a href="/MediaSearch.cfm?action=search&collected_by_agent_id=#agent_id#">
				Media from #collectormedia.c# collected/prepared specimens
			</a>
		</li>
	</ul>
	<cfquery name="project_agent" datasource="uam_god">
			select
				project_name,
				project.project_id
			from
				project_agent,
				project
			where
				 project.project_id=project_agent.project_id and
				 project_agent.agent_id=#agent_id#
			group by
				project_name,
				project.project_id
		</cfquery>
		<cfif len(project_agent.project_name) gt 0>
			Projects
			<ul>
				<cfloop query="project_agent">
					<li><a href="/ProjectDetail.cfm?project_id=#project_id#">#project_name#</a></li>
				</cfloop>
			</ul>
		</cfif>
		<cfquery name="publication_agent" datasource="uam_god">
			select
				publication.PUBLICATION_ID,
				full_citation
			from
				publication,
				publication_agent
			where
				publication.publication_id=publication_agent.publication_id and
				publication_agent.agent_id=#agent_id#
			group by
				publication.PUBLICATION_ID,
				full_citation
		</cfquery>
		<cfif len(publication_agent.full_citation) gt 0>
			Publications
			<ul>
				<cfloop query="publication_agent">
					<li>
						<a href="/Publication.cfm?PUBLICATION_ID=#PUBLICATION_ID#">#full_citation#</a>
						<cfquery name="citn" datasource="uam_god">
							select count(*) c from citation where publication_id=#publication_id#
						</cfquery>
						<ul><li>#citn.c# citations</li></ul>
					</li>
				</cfloop>
			</ul>
		</cfif>

</cfoutput>
<cfinclude template = "/includes/_footer.cfm">
		</cfif>
	</cfif>
	<!--- if we don't have an ID here, abort ---->
	<cfif not isdefined("agent_id") or len(agent_id) is 0>
		<cfabort>
	</cfif>
	<div class="importantNotification">
		Please note: your login may prevent you from accessing some linked data. The summary data below are accurate.
	</div>
	<cfquery name="agent" datasource="uam_god">
		select
			agent.preferred_agent_name,
			agent.agent_type,
			agent_name.agent_name,
			agent_name.agent_name_type
		FROM
			agent,
			agent_name
		where
			agent.agent_id=#agent_id#
		order by agent_name
	</cfquery>
	<cfquery name="name" datasource="uam_god">
		select agent_name_id, agent_name, agent_name_type FROM agent_name where agent_id=#agent_id#
	</cfquery>
	<p>
		Activity Summary for #agent.preferred_agent_name# (#agent.agent_type#)
	</p>
	Agent Names:
	<table border>
		<tr>
			<th>Agent Name</th>
			<th>Agent Name Type</th>
		</tr>
		<cfloop query="agent">
			<tr>
				<td>#agent_name#</td>
				<td>#agent_name_type#</td>
			</tr>
		</cfloop>
	</table>
	<cfif agent.agent_type is "group">
		<cfquery name="grpagnt" datasource="uam_god">
			select MEMBER_AGENT_ID,getPreferredAgentName(MEMBER_AGENT_ID) name from group_member where GROUP_AGENT_ID=#agent_id#
