rem: if (readonly) { element.setAttribute("disabled", "disabled"); xformsAddClass(element, "xforms-readonly"); } else { element.removeAttribute("disabled"); xformsRemoveClass(element, "xforms-readonly"); } 
add: xformsUpdateReadonlyFormElement(element, readonly); 
context: function xformsUpdateStyleRelevantReadonly(element, relevant, readonly, required) {    if (xformsIsDefined(relevant)) {        if (relevant) xformsRemoveClass(element, "xforms-disabled")        else xformsAddClass(element, "xforms-disabled");    }    if (xformsIsDefined(readonly)) {        var classes = element.className.split(" ");        if (xformsArrayContains(classes, "xforms-input")) {            // XForms input            var displayValue = element.childNodes[0];            if (readonly) xformsAddClass(displayValue, "xforms-readonly");            else xformsRemoveClass(displayValue, "xforms-readonly");            var textField = element.childNodes[1];            if (readonly) textField.setAttribute("disabled", "disabled");            else textField.removeAttribute("disabled");            var showCalendar = element.childNodes[2];            if (readonly) xformsAddClass(showCalendar, "xforms-showcalendar-readonly");            else xformsRemoveClass(showCalendar, "xforms-showcalendar-readonly");        } else if (xformsArrayContains(classes, "xforms-output") || xformsArrayContains(classes, "xforms-group")) {            // XForms output and group            if (readonly) xformsAddClass(element, "xforms-readonly");            else xformsRemoveClass(element, "xforms-readonly");        } else {            // Other controls            if (readonly) {                element.setAttribute("disabled", "disabled");                xformsAddClass(element, "xforms-readonly");            } else {                element.removeAttribute("disabled");                xformsRemoveClass(element, "xforms-readonly");            }        }    }    if (xformsIsDefined(required)) {        var classes = element.className.split(" ");        if (required) {            xformsAddClass(element, "xforms-required");            if (element.value == "") {                xformsAddClass(element, "xforms-required-empty");                xformsRemoveClass(element, "xforms-required-filled");            } else {                xformsAddClass(element, "xforms-required-filled");                xformsRemoveClass(element, "xforms-required-empty");            }        } else {            xformsRemoveClass(element, "xforms-required");            xformsRemoveClass(element, "xforms-required-filled");            xformsRemoveClass(element, "xforms-required-empty");        }    }}
meta: 7801	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/7801/63ac80406e15d25207d5b264347f1c6f59e7098b/xforms-style.js/buggy/src/examples/web/config/theme/javascript/xforms-style.js