- var showclass = classname ? ' '+classname+'(?!\\w)' : '^$';
- var parentskip = /^keys/;
- var row = document.getElementById('rows').firstChild;
- do {
- if (row.tagName == 'LI' && row.firstChild.tagName == 'UL'
- && !row.firstChild.className.match(parentskip)) {
- var el = row.firstChild.firstChild;
- if (el) do {
- if (el.tagName == 'LI') {
- el.style.display = el.className.match(showclass) ? 'block' : 'none';
- }
- } while (el = el.nextSibling);
- }
- } while (row = row.nextSibling);
-
- // update H2 to reflect the first part of a currently active (but hidden) H3
- var h3s = document.getElementsByTagName('H3');
+ var showclass = classname ? '^mode '+classname+'(?!\\w)' : '^(?!mode)';
+ var rows = document.getElementById('rows').getElementsByTagName('TR');
+ for (var i = 0; i < rows.length; i++) {
+ var el = rows[i];
+ el.style.display = el.className.match(showclass) ? 'block' : 'none';
+ }
+
+ // update H2 to reflect the first part of a currently active (but hidden) row header
+ var h3s = document.getElementsByTagName('TH');