 				<cfelse>
 					<cfset ob="#item#">
 				</cfif>
-
 			</cfif>
-
 			<cfset basFrom = " FROM #session.flatTableName#">
 			<cfset basJoin = "INNER JOIN cataloged_item ON (#session.flatTableName#.collection_object_id =cataloged_item.collection_object_id)">
 			<cfset basWhere = " WHERE #session.flatTableName#.collection_object_id IS NOT NULL ">
-
 			<cfset basQual = "">
 			<cfset mapurl="">
-			<!---
-			<cfif orderby is "count">
-				<cfset ob="count(#session.flatTableName#.cat_num)">
-			<cfelse>
-				<cfset ob=item>
-			</cfif>
----->
-
 			<cfset basOrder = "ORDER BY #ob# #orderorder#">
 			<cfinclude template="includes/SearchSql.cfm">
 			<cfset SqlString = "#basSelect# #basFrom# #basJoin# #basWhere# #basQual# #basGroup# #basOrder#">
 			<cfquery name="getGraph" datasource="user_login" username="#session.dbuser#" password="#decrypt(session.epw,session.sessionKey)#">
 				#preservesinglequotes(SqlString)#
 			</cfquery>
-
-
-
 			<cfchart format="#chartType#"
 				chartHeight = "#chartHeight#"
 				chartWidth = "#chartWidth#"

	<cfset chartHeight = listfirst(size," x ")>
	<cfset chartWidth = listlast(size," x ")>
	<cfloop list="#graphThis#" index="item">
		<cfset x = "#item#">
		<cfset y="Specimens">
			<cfif listcontains("family,phylorder,genus",#item#)>
				<cfset basSelect = "SELECT count(#session.flatTableName#.cat_num) as y_data,

	</cfloop>
</cfoutput>
</cfif>
<cfinclude template="includes/_footer.cfm">