 <cfset resTypeIcon = request.requestState.resTypeIcon>
 <cfset resourceTypeInfo = request.requestState.resourceTypeInfo>
 <cfset startRow = request.requestState.startRow>
+<cfset searchTerm = request.requestState.searchTerm>
+
+<!--- sort/filter resources  --->
+<cfquery name="qryResources" dbtype="query">
+	SELECT *
+		FROM qryResources
+		<cfif searchTerm neq "">
+			WHERE upper(package) LIKE <cfqueryparam cfsqltype="cf_sql_varchar" value="%#ucase(searchTerm)#%">
+				OR upper(name) LIKE  <cfqueryparam cfsqltype="cf_sql_varchar" value="%#ucase(searchTerm)#%">
+				OR upper(id) LIKE  <cfqueryparam cfsqltype="cf_sql_varchar" value="%#ucase(searchTerm)#%">
+		</cfif>
+		ORDER BY package,name,id
+</cfquery>
+
 
 <cfscript>
 	// page for when viewing in details mode

<cfparam name="request.requestState.resTypeIcon" default="">
<cfparam name="request.requestState.resourceTypeInfo" default="">
<cfparam name="request.requestState.startRow" default="1">

<cfset resourceType = request.requestState.resourceType>
<cfset qryResources = request.requestState.qryResources>

	lastPageStartRow = (numPages-1)*rowsPerPage;
</cfscript>


<cfoutput>
	<table style="width:100%;border:1px solid silver;background-color:##ebebeb;" cellpadding="0" cellspacing="0">
		<tr>
			<td nowrap="yes" style="width:200px;">
				<div style="margin:10px;">
					<cfif resTypeIcon neq "">
						<img src="images/#resTypeIcon#" align="absmiddle">
