fcccdfc15c15096674cea4176724ad95a340b3d4
tdreszer
  Tue Aug 2 15:48:52 2011 -0700
More incremental work on subCfg
diff --git src/hg/js/utils.js src/hg/js/utils.js
index 5894a57..eebe7ce 100644
--- src/hg/js/utils.js
+++ src/hg/js/utils.js
@@ -101,47 +101,45 @@
         $(trs).each(function (ix) {
             var subCB = $(this).find('input.subCB');
             if (subCB.length > 0 && subCB[0].checked && subCB[0].disabled == false)
                 $(this).show();
             else
                 $(this).hide();
         });
     }
 }
 
 function hideOrShowSubtrack(obj)
 {
 // This can show/hide a tablerow that contains a specific object
 // Containing <tr>'s must be id'd with 'tr_' + obj.id
 // Also, this relies upon the "displaySubtracks" radio button control
-    var tblRow = document.getElementById("tr_"+obj.id);
+    var tr = $(obj).parents('tr#tr_'+obj.id);
+    if (tr != undefined && tr.length == 1) {
+        tr = tr[0];
 
-    if(!obj.checked || obj.disabled)
-    {
-        var list = document.getElementsByName("displaySubtracks");
-        for (var ix=0;ix<list.length;ix++) {
-            if(list[ix].value == "selected") {
-                if(list[ix].checked)
-                    tblRow.style.display = 'none';  // hides
-                else
-                    tblRow.style.display = ''; //'table-row' doesn't work in some browsers (ie: IE)
-                break;
+        if(!obj.checked || obj.disabled)  {
+            var radio = $('input.allOrOnly');
+            for (var ix=0;ix<radio.length;ix++) {
+                if(radio[ix].checked && radio[ix].value == "selected") {
+                    $(tr).hide();
+                    return;
             }
         }
     }
-    else
-        tblRow.style.display = '';
+        $(tr).show();
+    }
 }
 
 function waitCursor(obj)
 {
     //document.body.style.cursor="wait"
     obj.style.cursor="wait";
 }
 
 function endWaitCursor(obj)
 {
     obj.style.cursor="";
 }
 
 function getURLParam()
 {