   </cfif>
 </cfif>
 
-<cfif isdefined("dimensions") and len(dimensions) gt 0>
-  <cfset mapurl = "#mapurl#&dimensions=#dimensions#">
-  <cfset basJoin = " #basJoin# INNER JOIN v_attributes tbl_dimensions ON (#session.flatTableName#.collection_object_id = tbl_dimensions.collection_object_id)">
-  <cfset basQual = " #basQual# AND tbl_dimensions.attribute_type = 'dimensions'">
-  <cfif session.flatTableName is not "flat"><cfset basQual = " #basQual# AND tbl_dimensions.is_encumbered = 0"></cfif>
-  <cfif dimensions neq "_">
-    <cfset oper=left(dimensions,1)>
-    <cfif listfind(charattrschops,oper)>
-      <cfset schTerm=ucase(right(dimensions,len(dimensions)-1))>
-    <cfelse>
-      <cfset oper="like"><cfset schTerm=ucase(dimensions)>
-    </cfif>
-    <cfif oper is "!"><cfset oper="!="></cfif>
-    <cfif oper is "like">
-      <cfset basQual = " #basQual# AND upper(tbl_dimensions.attribute_value) #oper# '%#ucase(escapeQuotes(schTerm))#%'">
-	<cfelse>
-      <cfset basQual = " #basQual# AND upper(tbl_dimensions.attribute_value) #oper# '#ucase(escapeQuotes(schTerm))#'">
-	</cfif>
-  </cfif>
-</cfif>
-
 <cfif isdefined("diploid_number") and len(diploid_number) gt 0>
   <cfset mapurl = "#mapurl#&diploid_number=#diploid_number#">
   <cfset basJoin = " #basJoin# INNER JOIN v_attributes tbl_diploid_number ON (#session.flatTableName#.collection_object_id = tbl_diploid_number.collection_object_id)">

  </cfif>
</cfif>

<cfif isdefined("feature") and len(feature) gt 0>
  <cfset mapurl = "#mapurl#&feature=#feature#">
  <cfset basJoin = " #basJoin# INNER JOIN v_attributes tbl_feature ON (#session.flatTableName#.collection_object_id = tbl_feature.collection_object_id)">
  <cfset basQual = " #basQual# AND tbl_feature.attribute_type = 'feature'">
  <cfif session.flatTableName is not "flat"><cfset basQual = " #basQual# AND tbl_feature.is_encumbered = 0"></cfif>
  <cfif feature neq "_">
    <cfset oper=left(feature,1)>
    <cfif listfind(charattrschops,oper)>
      <cfset schTerm=ucase(right(feature,len(feature)-1))>
    <cfelse>
      <cfset oper="like"><cfset schTerm=ucase(feature)>
    </cfif>
    <cfif oper is "!"><cfset oper="!="></cfif>
    <cfif oper is "like">
      <cfset basQual = " #basQual# AND upper(tbl_feature.attribute_value) #oper# '%#ucase(escapeQuotes(schTerm))#%'">
	<cfelse>
      <cfset basQual = " #basQual# AND upper(tbl_feature.attribute_value) #oper# '#ucase(escapeQuotes(schTerm))#'">
	</cfif>
  </cfif>
</cfif>

<cfif isdefined("forearm_length") and len(forearm_length) gt 0>
  <cfset mapurl = "#mapurl#&forearm_length=#forearm_length#">
  <cfset basJoin = " #basJoin# INNER JOIN v_attributes tbl_forearm_length ON (#session.flatTableName#.collection_object_id = tbl_forearm_length.collection_object_id)">

    <cfelse>
      <cfset basQual = " #basQual# AND tbl_hind_limb_length.attribute_value #oper# '#schTerm#'">
    </cfif>
  </cfif>
</cfif>

