f18afe8c824a4a4fa7574840d4c283a25a0517bf
larrym
  Mon Jun 21 10:31:43 2010 -0700
fix error message which occurrs when the search tabs aren't defined
diff --git src/hg/js/hgTracks.js src/hg/js/hgTracks.js
index 5b84948..116d489 100644
--- src/hg/js/hgTracks.js
+++ src/hg/js/hgTracks.js
@@ -1191,12 +1191,15 @@
         }
     }
 
+    // Tim, LRM doesn't like the following code (which set's focus to the position box), b/c in many browser (e.g. FF) this means
+    // PgUp/PgDown doesn't work when you load hgTracks (perhaps we should discuss with QA).
     {
         var pos = $("input[name='position']");
         if( pos != undefined)
             $( pos ).focus();
     }
-    if($("#tabs")) {
+    
+    if($("#tabs").length > 0) {
         var val = $('#currentSearchTab').val();
         $("#tabs").tabs({
                             show: function(event, ui) {