// prototype object to be duplicated for each radio button group var radioBlockSupport = { buttons : null, // set of functions, one for updating one radio block each updateButtons : function() { for( var i=0; i0) { e = $(e).next(); if (Element.hasClassName(e,"radio-block-start")) cnt++; if (Element.hasClassName(e,"radio-block-end")) cnt--; } return e; })(); var u = function() { g.updateSingleButton(r,s,e); }; g.buttons.push(u); // apply the initial visibility u(); // install event handlers to update visibility. // needs to use onclick and onchange for Safari compatibility r.onclick = r.onchange = function() { g.updateButtons(); }; });