var detectSelect = function(tag){}; var selectsCollection = new TagCollection("selectsCollection1"); selectsCollection.SetDetector(detectSelect); function collectSelects(){ var selects = $$('select', 'object', 'embed'); selects.each(function(s){ selectsCollection.Add('selects', s);});} function hideSelects(){ if (selectsCollection.groups['selects'] != undefined) selectsCollection.groups['selects'].each(function(node){ if (node.getAttribute("mode") != "auto") node.style.visibility = 'hidden';});} function showSelects(){ if (selectsCollection.groups['selects'] != undefined) selectsCollection.groups['selects'].each(function(node){ if (node.getAttribute("mode") != "auto") node.style.visibility = 'visible';});} document.observe('dom:loaded', collectSelects);