add:  var now = new Date();  if( now.getTime() > dueDate.getTime() ) { /* for setting some css */ treeItem.setAttribute( "overdue", "true" ); } 
context: function refreshToDoTree( eventArray ){   // get the old tree children item and remove it      var oldTreeChildren = document.getElementById( ToDoUnifinderTreeName );   var elementsToRemove = document.getElementsByAttribute( "taskitem", "true" );      for( var i = 0; i < elementsToRemove.length; i++ )   {      elementsToRemove[i].parentNode.removeChild( elementsToRemove[i] );   }   // add: tree item, row, cell, box and text items for every event   for( var index = 0; index < eventArray.length; ++index )   {      var calendarToDo = eventArray[ index ];            // make the items      var oldTreeItems = document.getElementsByAttribute( "name", "sample-todo-listitem" );      var oldTreeItem = oldTreeItems[0];            var treeItem = oldTreeItem.cloneNode( true );            treeItem.toDo = calendarToDo;      var completed = calendarToDo.completed.getTime();      if( completed > 0 )         treeItem.getElementsByTagName( "checkbox" )[0].checked = true;      treeItem.getElementsByAttribute( "name", "title-listcell" )[0].setAttribute( "label", calendarToDo.title );      var dueDate = new Date( calendarToDo.due.getTime() );      var FormattedDueDate = formatUnifinderEventDate( dueDate );      treeItem.getElementsByAttribute( "name", "due-date-listcell" )[0].setAttribute( "label", FormattedDueDate );      treeItem.removeAttribute( "collapsed" );      treeItem.setAttribute( "taskitem", "true" );      oldTreeChildren.appendChild( treeItem );   }  }
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/1aa365db1e1cec6db7eff25be7ba2c6a9367c093/unifinderToDo.js/clean/calendar/resources/content/unifinderToDo.js