rem: treeItem.removeAttribute( "completed" ); treeItem.removeAttribute( "started" ); treeItem.removeAttribute( "overdue" ); 
add: if(treeItem.getElementsByTagName( "treerow" )[0]) treeItem.removeChild( treeItem.getElementsByTagName( "treerow" )[0] ); 
context: function setUnifinderToDoTreeItem( treeItem, calendarToDo )   {      treeItem.toDo = calendarToDo;      var now = new Date();            var thisMorning = new Date( now.getFullYear(), now.getMonth(), now.getDate(), 0, 0, 0 );      treeItem.removeAttribute( "completed" );      treeItem.removeAttribute( "started" );      treeItem.removeAttribute( "overdue" );      if( calendarToDo.start.getTime() <= thisMorning.getTime() )      {         //this task should be started         treeItem.setAttribute( "started", "true" );      }      var completed = calendarToDo.completed.getTime();      if( completed > 0 )      {         treeItem.getElementsByTagName( "checkbox" )[0].checked = true;                  /* for setting some css */         treeItem.setAttribute( "completed", "true" );      }      treeItem.getElementsByAttribute( "name", "title-listcell" )[0].setAttribute( "label", calendarToDo.title );      var dueDate = new Date( calendarToDo.due.getTime() );      var now = new Date();      var tonightMidnight = new Date( now.getFullYear(), now.getMonth(), now.getDate(), 23, 59, 59 );      if( now.getTime() > tonightMidnight.getTime() )      {         /* for setting some css */         treeItem.setAttribute( "overdue", "true" );      }      var FormattedDueDate = formatUnifinderEventDate( dueDate );      treeItem.getElementsByAttribute( "name", "due-date-listcell" )[0].setAttribute( "label", FormattedDueDate );      treeItem.removeAttribute( "collapsed" );      treeItem.setAttribute( "taskitem", "true" );}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/766f6b5da18c8697a73c5e9a3b9483cf778d2777/unifinderToDo.js/clean/calendar/resources/content/unifinderToDo.js