rem: if (visible && this.mode == "radio") { this.map.layers[i].setVisibility(false); } else { visible = this.map.layers[i].getVisibility(); } this.addTab(this.map.layers[i]); 
add: var layer = this.map.layers[i]; var baseLayer = layer.isBaseLayer;    var checked = (baseLayer) ? (layer == this.map.baseLayer) : layer.getVisibility();   var inputElem = document.createElement("input"); inputElem.id = "input_" + layer.name; inputElem.name = (baseLayer) ? "baseLayers" : layer.name; inputElem.type = (baseLayer) ? "radio" : "checkbox"; inputElem.value = layer.name; inputElem.checked = checked; inputElem.layer = layer;   var labelSpan = document.createElement("span"); labelSpan.innerHTML = layer.name; labelSpan.style.verticalAlign = (baseLayer) ? "bottom" : "auto"; Event.observe(labelSpan, "click", this.onLabelClick.bindAsEventListener(inputElem));   var br = document.createElement("br");   var groupArray = (baseLayer) ? this.baseLayerInputs : this.dataLayerInputs; groupArray.push(inputElem);   var groupDiv = (baseLayer) ? this.baseLayersDiv : this.dataLayersDiv; groupDiv.appendChild(inputElem); groupDiv.appendChild(labelSpan); groupDiv.appendChild(br);  
context:     redraw: function() {        //clear out previous incarnation of LayerSwitcher tabs        this.div.innerHTML = "";        var visible = false;        for( var i = 0; i < this.map.layers.length; i++) {            if (visible && this.mode == "radio") {                this.map.layers[i].setVisibility(false);            } else {                visible = this.map.layers[i].getVisibility();            }            this.addTab(this.map.layers[i]);        }                    return this.div;    },
meta: 8310	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8310/f3a072b151fd0fb48097965647921f2ea0396651/LayerSwitcher.js/clean/lib/OpenLayers/Control/LayerSwitcher.js