rem:  for each (var view in this.availableViews) { var command = document.getElementById(view+"_view_command"); if (view == newView) { command.setAttribute("checked", true); } else { command.removeAttribute("checked"); } }  
context: CalendarWindow.prototype.switchToView = function calWin_switchToView( newView ){    // Set up the commands    for each (var view in this.availableViews) {        var command = document.getElementById(view+"_view_command");        if (view == newView) {            command.setAttribute("checked", true);        } else {            command.removeAttribute("checked");        }    }    var mwWeeksCommand = document.getElementById("menu-numberofweeks-inview")    if (newView == "multiweek") {        mwWeeksCommand.removeAttribute("disabled");    } else {        mwWeeksCommand.setAttribute("disabled", true);    }    // Disable the orientation menuitem on non multiday views    var mwOrientCommand = document.getElementById("menu-multiday-rotated");    if (newView == "day" || newView == "week") {        mwOrientCommand.removeAttribute("disabled");    } else {        mwOrientCommand.setAttribute("disabled", true);    }    // Call the common view switching code in calendar-views.js    switchToView(newView);    var labelAttribute = "label-"+newView+"-view";    var prevCommand = document.getElementById("calendar-go-menu-previous");    prevCommand.setAttribute("label", prevCommand.getAttribute(labelAttribute));    var nextCommand = document.getElementById("calendar-go-menu-next");    nextCommand.setAttribute("label", nextCommand.getAttribute(labelAttribute));}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/9421/adf8def97c78eca43decf76e12f684786f6bea7d/calendarWindow.js/clean/calendar/resources/content/calendarWindow.js