rem: var tzStart = document.getElementById('timezone-starttime'); var tzEnd = document.getElementById('timezone-endtime');  if (startTimezone != null) { tzStart.removeAttribute('collapsed'); tzStart.value = timezoneString(startTimezone); if (gIsReadOnly) { tzStart.removeAttribute('class'); tzStart.removeAttribute('onclick'); tzStart.setAttribute('disabled', 'true'); 
add: function updateTimezoneElement(aTimezone,aId,aDateTime,aCollapse) { var element = document.getElementById(aId); if (element) { if (aTimezone != null && !aCollapse) { element.removeAttribute('collapsed'); element.value = timezoneString(aTimezone); if (!aDateTime || !aDateTime.isValid || gIsReadOnly) { if (element.hasAttribute('class')) { element.setAttribute('class-on-enabled', element.getAttribute('class')); element.removeAttribute('class'); } if (element.hasAttribute('onclick')) { element.setAttribute('onclick-on-enabled', element.getAttribute('onclick')); element.removeAttribute('onclick'); } element.setAttribute('disabled', 'true'); } else { if (element.hasAttribute('class-on-enabled')) { element.setAttribute('class', element.getAttribute('class-on-enabled')); element.removeAttribute('class-on-enabled'); } if (element.hasAttribute('onclick-on-enabled')) { element.setAttribute('onclick', element.getAttribute('onclick-on-enabled')); element.removeAttribute('onclick-on-enabled'); } element.removeAttribute('disabled'); } } else { element.setAttribute('collapsed', 'true'); } 
context: function updateTimezone() {    var menuItem = document.getElementById('menu-options-timezone');    // convert to default timezone if the timezone option    // is *not* checked, otherwise keep the specific timezone    // and display the labels in order to modify the timezone.    if (menuItem.getAttribute('checked') == 'true') {        var startTimezone = gStartTimezone;        var endTimezone = gEndTimezone;        var equalTimezones = false;        if (startTimezone && endTimezone) {            if (startTimezone == endTimezone || endTimezone == "UTC") {                equalTimezones = true;            }        }        var tzStart = document.getElementById('timezone-starttime');        var tzEnd = document.getElementById('timezone-endtime');        if (startTimezone != null) {            tzStart.removeAttribute('collapsed');            tzStart.value = timezoneString(startTimezone);            if (gIsReadOnly) {                tzStart.removeAttribute('class');                tzStart.removeAttribute('onclick');                tzStart.setAttribute('disabled', 'true');            }        } else {            tzStart.setAttribute('collapsed', 'true');        }        // we never display the second timezone if both are equal        if (endTimezone != null && !equalTimezones) {            tzEnd.removeAttribute('collapsed');            tzEnd.value = timezoneString(endTimezone);            if (gIsReadOnly) {                tzEnd.removeAttribute('class');                tzEnd.removeAttribute('onclick');                tzEnd.setAttribute('disabled', 'true');            }        } else {            tzEnd.setAttribute('collapsed', 'true');        }    } else {        document.getElementById('timezone-starttime')                .setAttribute('collapsed', 'true');        document.getElementById('timezone-endtime')                .setAttribute('collapsed', 'true');    }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/9421/29e7a56a287ea8a8a0b411906f6d4e983a46130d/sun-calendar-event-dialog.js/buggy/calendar/prototypes/wcap/sun-calendar-event-dialog.js