rem: var Start = gAllEvents.length - 10; if( Start < 0 ) Start = 0;   for( var i = Start; i < gAllEvents.length; i++ ) { createAlarmBox( gAllEvents[i] ); }   if( gAllEvents.length > 10 ) { var TooManyDesc = document.getElementById( "too-many-alarms-description" ); TooManyDesc.removeAttribute( "collapsed" ); TooManyDesc.setAttribute( "value", "You have "+ (gAllEvents.length )+" total alarms. We've shown you the last 10. Click Acknowledge All to clear them all." ); } else { var TooManyDesc = document.getElementById( "too-many-alarms-description" ); TooManyDesc.setAttribute( "collapsed", "true" ); 
context: function buildEventBoxes(){   //remove all the old event boxes.   var EventContainer = document.getElementById( "event-container-rows" );   var NumberOfChildElements = EventContainer.childNodes.length;   for( i = 0; i < NumberOfChildElements; i++ )      {      EventContainer.removeChild( EventContainer.lastChild );   }      //start at length - 10 or 0 if that is < 0   var Start = gAllEvents.length - 10;   if( Start < 0 )      Start = 0;   //build all event boxes again.   for( var i = Start; i < gAllEvents.length; i++ )   {      createAlarmBox( gAllEvents[i] );      }      //reset the text   if( gAllEvents.length > 10 )   {      var TooManyDesc = document.getElementById( "too-many-alarms-description" );      TooManyDesc.removeAttribute( "collapsed" );               TooManyDesc.setAttribute( "value", "You have "+ (gAllEvents.length )+" total alarms. We've shown you the last 10. Click Acknowledge All to clear them all." );   }   else   {      var TooManyDesc = document.getElementById( "too-many-alarms-description" );      TooManyDesc.setAttribute( "collapsed", "true" );   }   sizeToContent();}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/672bc5ca90b93bd7ddaf73f02b597786e8643019/alertDialog.js/buggy/calendar/resources/content/alertDialog.js