rem: var weekNumberText = getWeekNumberText( weekNumber ); var dayOfWeekText = getDayOfWeek( dayNumber ); var ofTheMonthText = document.getElementById( "ofthemonth-text" ).getAttribute( "value" ); var lastText = document.getElementById( "last-text" ).getAttribute( "value" ); var onTheText = document.getElementById( "onthe-text" ).getAttribute( "value" ); var dayNumberWithOrdinal = dayNumber + dayExtension; var repeatSentence = calStrings.getFormattedString( "weekDayMonthLabel", [onTheText, dayNumberWithOrdinal, ofTheMonthText] );  document.getElementById( "advanced-repeat-dayofmonth" ).setAttribute( "label", repeatSentence );  if( weekNumber == 4 && isLastDayOfWeekOfMonth() ) { document.getElementById( "advanced-repeat-dayofweek" ).setAttribute( "label", calStrings.getFormattedString( "weekDayMonthLabel", [weekNumberText, dayOfWeekText, ofTheMonthText] ) );  document.getElementById( "advanced-repeat-dayofweek-last" ).removeAttribute( "collapsed" );  document.getElementById( "advanced-repeat-dayofweek-last" ).setAttribute( "label", calStrings.getFormattedString( "weekDayMonthLabel", [lastText, dayOfWeekText, ofTheMonthText] ) ); } else if( weekNumber == 4 && !isLastDayOfWeekOfMonth() ) { document.getElementById( "advanced-repeat-dayofweek" ).setAttribute( "label", calStrings.getFormattedString( "weekDayMonthLabel", [weekNumberText, dayOfWeekText, ofTheMonthText] ) );  document.getElementById( "advanced-repeat-dayofweek-last" ).setAttribute( "collapsed", "true" ); } else { document.getElementById( "advanced-repeat-dayofweek" ).setAttribute( "label", calStrings.getFormattedString( "weekDayMonthLabel", [weekNumberText, dayOfWeekText, ofTheMonthText] ) );  document.getElementById( "advanced-repeat-dayofweek-last" ).setAttribute( "collapsed", "true" ); } 
add: if( weekNumber == 4 && isLastDayOfWeekOfMonth() ) { document.getElementById( "advanced-repeat-dayofweek" ).setAttribute( "label", calStrings.getFormattedString( "weekDayMonthLabel", [weekNumberText, dayOfWeekText, ofTheMonthText] ) ); showElement("advanced-repeat-dayofweek-last"); document.getElementById( "advanced-repeat-dayofweek-last" ).setAttribute( "label", calStrings.getFormattedString( "weekDayMonthLabel", [lastText, dayOfWeekText, ofTheMonthText] ) ); } else if( weekNumber == 4 && !isLastDayOfWeekOfMonth() ) { document.getElementById( "advanced-repeat-dayofweek" ).setAttribute( "label", calStrings.getFormattedString( "weekDayMonthLabel", [weekNumberText, dayOfWeekText, ofTheMonthText] ) ); hideElement("advanced-repeat-dayofweek-last"); } else { document.getElementById( "advanced-repeat-dayofweek" ).setAttribute( "label", calStrings.getFormattedString( "weekDayMonthLabel", [weekNumberText, dayOfWeekText, ofTheMonthText] ) ); hideElement("advanced-repeat-dayofweek-last"); } 
context: function updateAdvancedRepeatDayOfMonth(){   //get the day number for today.   var dayNumber = document.getElementById( "start-datetime" ).value.getDate();      var dayExtension = getDayExtension( dayNumber );   var weekNumber = getWeekNumberOfMonth();      var calStrings = document.getElementById("bundle_calendar");   var weekNumberText = getWeekNumberText( weekNumber );   var dayOfWeekText = getDayOfWeek( dayNumber );   var ofTheMonthText = document.getElementById( "ofthemonth-text" ).getAttribute( "value" );   var lastText = document.getElementById( "last-text" ).getAttribute( "value" );   var onTheText = document.getElementById( "onthe-text" ).getAttribute( "value" );   var dayNumberWithOrdinal = dayNumber + dayExtension;   var repeatSentence = calStrings.getFormattedString( "weekDayMonthLabel", [onTheText, dayNumberWithOrdinal, ofTheMonthText] );   document.getElementById( "advanced-repeat-dayofmonth" ).setAttribute( "label", repeatSentence );      if( weekNumber == 4 && isLastDayOfWeekOfMonth() )   {      document.getElementById( "advanced-repeat-dayofweek" ).setAttribute( "label", calStrings.getFormattedString( "weekDayMonthLabel", [weekNumberText, dayOfWeekText, ofTheMonthText] ) );      document.getElementById( "advanced-repeat-dayofweek-last" ).removeAttribute( "collapsed" );      document.getElementById( "advanced-repeat-dayofweek-last" ).setAttribute( "label", calStrings.getFormattedString( "weekDayMonthLabel", [lastText, dayOfWeekText, ofTheMonthText] ) );   }   else if( weekNumber == 4 && !isLastDayOfWeekOfMonth() )   {      document.getElementById( "advanced-repeat-dayofweek" ).setAttribute( "label", calStrings.getFormattedString( "weekDayMonthLabel", [weekNumberText, dayOfWeekText, ofTheMonthText] ) );      document.getElementById( "advanced-repeat-dayofweek-last" ).setAttribute( "collapsed", "true" );   }   else   {      document.getElementById( "advanced-repeat-dayofweek" ).setAttribute( "label", calStrings.getFormattedString( "weekDayMonthLabel", [weekNumberText, dayOfWeekText, ofTheMonthText] ) );      document.getElementById( "advanced-repeat-dayofweek-last" ).setAttribute( "collapsed", "true" );   }}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/7cf8f4a5a133269c8abdbc4d7ed791799ba534d2/eventDialog.js/clean/calendar/resources/content/eventDialog.js