rem: var wmdata = Components.classes["@mozilla.org/rdf/datasource;1?name=window-mediator"].getService(); var wmediator = wmdata.QueryInterface(Components.interfaces.nsIWindowMediator);  
add: var wmediator = Components.classes["@mozilla.org/appshell/window-mediator;1"].getService(Components.interfaces.nsIWindowMediator);  
context: function openCalendar() {   var wmdata = Components.classes["@mozilla.org/rdf/datasource;1?name=window-mediator"].getService();   var wmediator = wmdata.QueryInterface(Components.interfaces.nsIWindowMediator);   var calendarWindow = wmediator.getMostRecentWindow( "calendarMainWindow" );   //the topWindow is always null, but it loads chrome://calendar/content/calendar.xul into the open window.   if ( calendarWindow )   {      calendarWindow.focus();   }   else      calendarWindow = window.open("chrome://calendar/content/calendar.xul", "calendar", "chrome,extrachrome,menubar,resizable,scrollbars,status,toolbar");}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/f3c2d92ed86f810964734c2cc082eb6c34d0b46c/calendarOverlay.js/buggy/calendar/resources/content/calendarOverlay.js