rem: var nextWeek = new Date( getDateTimeFieldValue( "start-date-text" ).getTime() + ( 1000 * 60 * 60 * 24 * 7 ) ); 
add: var nextWeek = new Date( oldStartTime.getTime() + ( 1000 * 60 * 60 * 24 * 7 ) ); 
context: function getWeekNumberOfMonth(){   //get the day number for today.   var startTime = getDateTimeFieldValue( "start-date-text" );      var dayNumber = startTime.getDay();      var thisMonth = startTime.getMonth();      var monthToCompare = startTime.getMonth();   var weekNumber = 0;   while( monthToCompare == thisMonth )   {      startTime = new Date( startTime.getTime() - ( 1000 * 60 * 60 * 24 * 7 ) );      monthToCompare = startTime.getMonth();            weekNumber++;   }      if( weekNumber > 3 )   {      var nextWeek = new Date( getDateTimeFieldValue( "start-date-text" ).getTime() + ( 1000 * 60 * 60 * 24 * 7 ) );      if( nextWeek.getMonth() != thisMonth )      {         //its the last week of the month         weekNumber = 5;      }   }   return( weekNumber );}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/cbd6f6f689d7f27ecb7965ec5fd33e50cb4ce8b7/calendarEventDialog.js/clean/calendar/resources/content/calendarEventDialog.js