 			variables.josrch_field_doc.writeLine("delete from ssrch_field_doc where CATEGORY='attribute';#chr(10)#");
 			variables.f_ss_doc = createObject('Component', '/component.FileWriter').init(variables.f_ss_doc, variables.encoding, 32768);
 			variables.f_ss_doc.writeLine(x);
-		</cfscript>	
+		</cfscript>
 		<cfloop query="d">
 			<cfquery name="tctl" datasource="uam_god">
-				select 
+				select
 					CTATTRIBUTE_TYPE.ATTRIBUTE_TYPE,
 					CTATTRIBUTE_TYPE.DESCRIPTION,
 					ctattribute_code_tables.VALUE_CODE_TABLE,
-					ctattribute_code_tables.UNITS_CODE_TABLE 
-				from 
+					ctattribute_code_tables.UNITS_CODE_TABLE
+				from
 					CTATTRIBUTE_TYPE,
 					ctattribute_code_tables
-				where 
+				where
 					CTATTRIBUTE_TYPE.ATTRIBUTE_TYPE=ctattribute_code_tables.ATTRIBUTE_TYPE (+) and
 					CTATTRIBUTE_TYPE.ATTRIBUTE_TYPE='#ATTRIBUTE_TYPE#'
 				group by
 					CTATTRIBUTE_TYPE.ATTRIBUTE_TYPE,
 					CTATTRIBUTE_TYPE.DESCRIPTION,
 					ctattribute_code_tables.VALUE_CODE_TABLE,
-					ctattribute_code_tables.UNITS_CODE_TABLE  
+					ctattribute_code_tables.UNITS_CODE_TABLE
 			</cfquery>
 			<cfset attrvar=lcase(trim(replace(replace(replace(ATTRIBUTE_TYPE,' ','_','all'),'-','_','all'),"/","_","all")))>
 			<cfif len(tctl.VALUE_CODE_TABLE) gt 0>

		<cfset x=x & chr(10) & '      <cfset basQual = " ##basQual## AND tbl_#attrvar#.attribute_value ##oper## ''##schTerm##''">'>
		<cfset x=x & chr(10) & '    </cfif>'>
	<cfelseif asrchlst is "attrWeightUnits">
		<cfset x=x & chr(10) & '    <cfif oper is "between">'>     
		<cfset x=x & chr(10) & '      <cfset basQual = " ##basQual## AND to_grams(tbl_#attrvar#.attribute_value,tbl_#attrvar#.attribute_units) ##oper## to_grams(##low##,''##schunits##'') and to_grams(##high##,''##schunits##'')">'>
		<cfset x=x & chr(10) & '    <cfelseif len(schunits) gt 0>'>
		<cfset x=x & chr(10) & '      <cfset basQual = " ##basQual## AND to_grams(tbl_#attrvar#.attribute_value,tbl_#attrvar#.attribute_units) ##oper## to_grams(##schTerm##,''##schunits##'')">'>

		<cfset x=x & chr(10) & '      <cfset basQual = " ##basQual## AND tbl_#attrvar#.attribute_value ##oper## ''##schTerm##''">'>
		<cfset x=x & chr(10) & '    </cfif>'>
	<cfelseif asrchlst is "attrTimeUnits">
		<cfset x=x & chr(10) & '    <cfif oper is "between">'>
		<cfset x=x & chr(10) & '      <cfset basQual = " ##basQual## AND to_days(tbl_#attrvar#.attribute_value,tbl_#attrvar#.attribute_units) ##oper## to_days(##low##,''##schunits##'') and to_days(##high##,''##schunits##'')">'>
		<cfset x=x & chr(10) & '    <cfelseif len(schunits) gt 0>'>
		<cfset x=x & chr(10) & '      <cfset basQual = " ##basQual## AND to_days(tbl_#attrvar#.attribute_value,tbl_#attrvar#.attribute_units) ##oper## to_days(##schTerm##,''##schunits##'')">'>
