var checkbox = element.QueryInterface(Components.interfaces.nsIDOMHTMLInputElement) if (checkbox.type == "checkbox") { var selected = checkbox.checked; 
var inputElement = element.QueryInterface(Components.interfaces.nsIDOMHTMLInputElement) if (inputElement.type == "checkbox" || inputElement.type == "radio") { selected = inputElement.checked; 
FirefoxDriver.prototype.getElementSelected = function(elementId) {    var element = Utils.getElementAt(elementId);    var selected = false;    try {        var option = element.QueryInterface(Components.interfaces.nsIDOMHTMLOptionElement)        selected = option.selected;    } catch(e) {}    try {        var checkbox = element.QueryInterface(Components.interfaces.nsIDOMHTMLInputElement)        if (checkbox.type == "checkbox") {            var selected = checkbox.checked;        }    } catch(e) {}    this.server.respond("getElementSelected", selected);}
4983	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/4983/c4b56f07101be39857ac9213db73f436dd1f8da4/wrappedElement.js/clean/firefox/src/extension/content/wrappedElement.js