Index: src/hg/js/hgTracks.js
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/js/hgTracks.js,v
retrieving revision 1.54
retrieving revision 1.55
diff -b -B -U 4 -r1.54 -r1.55
--- src/hg/js/hgTracks.js	16 Feb 2010 01:28:14 -0000	1.54
+++ src/hg/js/hgTracks.js	17 Feb 2010 21:40:26 -0000	1.55
@@ -111,9 +111,12 @@
 }
 
 function getDb()
 {
-    return document.getElementsByName("db")[0].value;
+    var db = document.getElementsByName("db");
+    if(db == undefined || db.length == 0)
+        return "";
+    return db[0].value;
 }
 
 function checkPosition(img, selection)
 {

