   </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)">

  <cfset basQual = " #basQual# AND tbl_depth.attribute_type = 'depth'">
  <cfif session.flatTableName is not "flat"><cfset basQual = " #basQual# AND tbl_depth.is_encumbered = 0"></cfif>
  <cfif depth neq "_">
    <cfset oper=left(depth,1)>
    <cfif listfind(charattrschops,oper)>
      <cfset schTerm=ucase(right(depth,len(depth)-1))>
    <cfelse>
      <cfset oper="like"><cfset schTerm=ucase(depth)>
    </cfif>
    <cfif oper is "!"><cfset oper="!="></cfif>
    <cfif oper is "like">
      <cfset basQual = " #basQual# AND upper(tbl_depth.attribute_value) #oper# '%#ucase(escapeQuotes(schTerm))#%'">
	<cfelse>
      <cfset basQual = " #basQual# AND upper(tbl_depth.attribute_value) #oper# '#ucase(escapeQuotes(schTerm))#'">
	</cfif>
  </cfif>
</cfif>


  </cfif>
</cfif>

<cfif isdefined("height") and len(height) gt 0>
  <cfset mapurl = "#mapurl#&height=#height#">
  <cfset basJoin = " #basJoin# INNER JOIN v_attributes tbl_height ON (#session.flatTableName#.collection_object_id = tbl_height.collection_object_id)">
  <cfset basQual = " #basQual# AND tbl_height.attribute_type = 'height'">
  <cfif session.flatTableName is not "flat"><cfset basQual = " #basQual# AND tbl_height.is_encumbered = 0"></cfif>
  <cfif height neq "_">
    <cfset schunits="">
    <cfset oper=left(height,1)>
    <cfif listfind(numattrschops,oper)>
      <cfset schTerm=ucase(right(height,len(height)-1))>
    <cfelse>
      <cfset oper="like"><cfset schTerm=ucase(height)>
    </cfif>
    <cfif oper is "!"><cfset oper="!="></cfif>
    <cfset temp=trim(rereplace(schTerm,"[0-9]","","all"))>
    <cfif len(temp) gt 0 and listfindnocase(attrLengthUnits,temp) and isnumeric(replace(schTerm,temp,""))>
      <cfset schTerm=replace(schTerm,temp,"")><cfset schunits=temp>
    <cfelseif left(temp,1) eq "-" and listfindnocase(attrTimeUnits,trim(replace(temp,"-","")))>
      <cfset schunits=trim(replace(temp,"-",""))>
      <cfset low=trim(listgetat(numeric_age,1,"-"))>
      <cfset high=trim(replacenocase(replace(replace(numeric_age,low,"","first"),"-",""),schunits,""))>
      <cfset schTerm=trim(replace(replace(replace(numeric_age,schunits,""),low,""),high,""))>
      <cfif len(low) gt 0 and len(high) gt 0 and len(schunits) gt 0><cfset oper="between"></cfif>
    </cfif>
    <cfif oper is "between">
      <cfset basQual = " #basQual# AND to_days(tbl_height.attribute_value,tbl_height.attribute_units) #oper# to_days(#low#,'#schunits#') and to_days(#high#,'#schunits#')">
    <cfelseif len(schunits) gt 0>
      <cfset basQual = " #basQual# AND to_meters(tbl_height.attribute_value,tbl_height.attribute_units) #oper# to_meters(#schTerm#,'#schunits#')">
    <cfelse>
      <cfset basQual = " #basQual# AND tbl_height.attribute_value #oper# '#schTerm#'">
    </cfif>
  </cfif>
</cfif>

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