      if(args.job) {   var self = this;   args.job.finalize = function() {   self.onAccept();  var item = window.calendarItem;   window.close();  return item; } }  
function onLoad(){  //gConsoleService = Components.classes["@mozilla.org/consoleservice;1"].getService(Components.interfaces.nsIConsoleService);  // first of all retrieve the array of  // arguments this window has been called with.  var args = window.arguments[0];    window.fbWrapper = args.fbWrapper;  // the most important attribute we expect from the  // arguments is the item we'll edit in the dialog.  var item = args.calendarEvent;  // new items should have a non-empty title.  if (item.isMutable) {    if(!item.title || item.title.length <= 0) {      if (isEvent(item)) {        item.title = getString("sun-calendar-event-dialog","newEvent");      } else {        item.title = getString("sun-calendar-event-dialog","newTask");      }    }  }  window.onAcceptCallback = args.onOk;    // we store the item in the window to be able  // to access this from any location. please note  // that the item is either an occurrence [proxy]  // or the stand-alone item [single occurrence item].  window.calendarItem = item;  // we store the array of attendees in the window.  // clone each existing attendee since we still suffer  // from the 'lost x-properties'-bug.  window.attendees = [];  var attendees = item.getAttendees({});  if(attendees && attendees.length) {    for each (var attendee in attendees) {      window.attendees.push(attendee.clone());    }  }    // we store the organizer of the item in the window.  // TODO: we clone the object since foreign X-props get lost  // during the roundtrip. In order to detect whether or not  // the item has been changed by the dialog we clone the organizer  // in any case to get rid of the X-props.  window.organizer = item.organizer ? item.organizer.clone() : null;  window.isOccurrence = (item != item.parentItem);    // we store the recurrence info in the window so it  // can be accessed from any location. since the recurrence  // info is a property of the parent item we need to check  // whether or not this item is a proxy or a parent.  var parentItem = item;  if(parentItem.parentItem != parentItem) {    parentItem = parentItem.parentItem;  }  window.recurrenceInfo = parentItem.recurrenceInfo;    document.getElementById("sun-calendar-event-dialog").getButton("accept").setAttribute("collapsed","true");  document.getElementById("sun-calendar-event-dialog").getButton("cancel").setAttribute("collapsed","true");  document.getElementById("sun-calendar-event-dialog").getButton("cancel").parentNode.setAttribute("collapsed","true");  var prefService = Components.classes["@mozilla.org/preferences-service;1"]                              .getService(Components.interfaces.nsIPrefService);  gPrefs = prefService.getBranch(null);  loadDialog(window.calendarItem);    opener.setCursor("auto");  document.getElementById("item-title").focus();  document.getElementById("item-title").select();}
5459	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/5459/8a8fb1e50f1a74dbb1713b031761c84e92fa5b69/sun-calendar-event-dialog.js/clean/calendar/prototypes/wcap/sun-calendar-event-dialog.js