--- share/html/AssetTracker/Elements/SimpleSearch	Wed Dec 13 08:40:03 2006
+++ local/html/AssetTracker/Elements/SimpleSearch	Wed Jan 17 14:13:26 2007
@@ -45,5 +45,12 @@
 %# END BPS TAGGED BLOCK }}}
 <form action="<% $RT::WebPath %>/AssetTracker/index.html">
 <input size="12" name="q" autocomplete="off" accesskey="0">
-<input type="submit" value="<&|/l&>Search</&>">&nbsp;
+<input type="submit" class="button" value="<&|/l&>Find Assets</&>">&nbsp;
+<select name="qtype">
+<option>
+<option value="UFnet">by UFnet
+<option value="serial">by serial
+<option value="mac">by MAC
+</select>
+&nbsp;
 </form>
--- share/html/AssetTracker/index.html	Wed Dec 13 08:40:07 2006
+++ local/html/AssetTracker/index.html	Wed Jan 17 14:16:22 2007
@@ -27,23 +27,37 @@
 if ( $ARGS{'q'} ) {
     my $query = $ARGS{'q'};
 
+    $query =~ s/<[B|b][R|r]>$//;
+
     if ( $query =~ m/^(\d+\.\d+\.\d+\.\d+)$/ ) {
         $m->comp("/AssetTracker/Search/Results.html", Query => "IP = '$query'", AutoForwardSingleResult => 1);
         return();
     }
-    elsif ( $query =~ /^(\d+)$/ ) {
-        Abort("Don't know how to seach for ports (yet)");
-    }
 
     if ($m->comp('/Elements/Callback', _CallbackName => 'SearchPreFilter',
                  query => $query, %ARGS)) {
         return();
     }
 
-    $m->comp("/AssetTracker/Search/Results.html", Query => "Name LIKE '$query' AND Status != 'retired'", AutoForwardSingleResult => 1);
+    if ( $query =~ m/^([S|s|\d]\d\d\d-\d+)$/ ) {
+        $m->comp("/AssetTracker/Search/Results.html", Query => "(Name LIKE '$query') AND Status != 'retired'", AutoForwardSingleResult => 1);
+        return();
+    }
+
+    if ($ARGS{'qtype'} eq 'UFnet') {
+      $m->comp("/AssetTracker/Search/Results.html", Query => "'CF.{UFnet}' LIKE '$query' AND Status != 'retired'", AutoForwardSingleResult => 1);
+    } elsif ($ARGS{'qtype'} eq 'serial') {
+      $m->comp("/AssetTracker/Search/Results.html", Query => "'CF.{Serial}' LIKE '$query' AND Status != 'retired'", AutoForwardSingleResult => 1);
+    } elsif ($ARGS{'qtype'} eq 'mac') {
+      $m->comp("/AssetTracker/Search/Results.html", Query => "MAC LIKE '$query' AND Status != 'retired'", AutoForwardSingleResult => 1);
+    } else {
+      $m->comp("/AssetTracker/Search/Results.html", Query => "Name LIKE '$query' AND Status != 'retired'", AutoForwardSingleResult => 1);
+    }
+    #$m->comp("/AssetTracker/Search/Results.html", Query => "(Name LIKE '$query') AND Status != 'retired'", AutoForwardSingleResult => 1);
     return();
 
 }
+
 
 
 if ($ARGS{'HomeRefreshInterval'}) {
