rem: var tree = document.getElementById('moduleList'); 
add: var tree = document.getElementById('moduleList'); 
context: function ImportDialogOKButton(){	var tree = document.getElementById('moduleList');  var deck = document.getElementById("stateDeck");  var header = document.getElementById("header");  var progressMeterEl = document.getElementById("progressMeter");  var progressStatusEl = document.getElementById("progressStatus");  var progressTitleEl = document.getElementById("progressTitle");  // better not mess around with navigation at this point  var nextButton = document.getElementById("forward");  nextButton.setAttribute("disabled", "true");  var backButton = document.getElementById("back");  backButton.setAttribute("disabled", "true");  	if ( tree && tree.selectedItems && (tree.selectedItems.length == 1) )	{    var importTypeRadioGroup = document.getElementById("importFields");    importType = importTypeRadioGroup.selectedItem.getAttribute("data");		var index = tree.selectedItems[0].getAttribute('list-index');		var module = importService.GetModule(importType, index);		var name = importService.GetModuleName(importType, index);		selectedModuleName = name;		if (module) 		{			var meterText = "";			switch(importType)			{				case "mail":					top.successStr = Components.classes["@mozilla.org/supports-wstring;1"].createInstance();					if (top.successStr) {						top.successStr = top.successStr.QueryInterface( Components.interfaces.nsISupportsWString);					}					top.errorStr = Components.classes["@mozilla.org/supports-wstring;1"].createInstance();					if (top.errorStr)						top.errorStr = top.errorStr.QueryInterface( Components.interfaces.nsISupportsWString);										if (ImportMail( module, top.successStr, top.errorStr) == true) 					{						// We think it was a success, either, we need to 						// wait for the import to finish						// or we are done!						if (top.progressInfo.importInterface == null) {							ShowImportResults(true, 'Mail');							return( true);						}						else {							meterText = gImportMsgsBundle.getFormattedString('MailProgressMeterText',                                                               [ name ]);              header.setAttribute("description", meterText);                            progressStatusEl.setAttribute("value", "");              progressTitleEl.setAttribute("value", meterText);                            deck.setAttribute("index", "2");              progressInfo.progressWindow = top.window;              progressInfo.intervalState = setInterval("ContinueImportCallback()", 100);							return( true);						}					}					else 					{						ShowImportResults(false, 'Mail');						return( false);					}					break;									case "addressbook":					top.successStr = Components.classes["@mozilla.org/supports-wstring;1"].createInstance();					if (top.successStr)						top.successStr = top.successStr.QueryInterface( Components.interfaces.nsISupportsWString);					top.errorStr = Components.classes["@mozilla.org/supports-wstring;1"].createInstance();					if (top.errorStr)						top.errorStr = top.errorStr.QueryInterface( Components.interfaces.nsISupportsWString);										if (ImportAddress( module, top.successStr, top.errorStr) == true) {						// We think it was a success, either, we need to 						// wait for the import to finish						// or we are done!						if (top.progressInfo.importInterface == null) {							ShowImportResults(true, 'Address');							return( true);						}						else {							meterText = gImportMsgsBundle.getFormattedString('MailProgressMeterText',                                                               [ name ]);              header.setAttribute("description", meterText);                            progressStatusEl.setAttribute("value", "");              progressTitleEl.setAttribute("value", meterText);                            deck.setAttribute("index", "2");              progressInfo.progressWindow = top.window;              progressInfo.intervalState = setInterval("ContinueImportCallback()", 100);            							return( true);						}					}					else 					{						ShowImportResults(false, 'Address');						return( false);					}					break;				case "settings":					var error = new Object();					error.value = null;					var newAccount = new Object();					if (!ImportSettings( module, newAccount, error)) 					{						if (error.value)              ShowImportResultsRaw(gImportMsgsBundle.getString('ImportSettingsFailed'), null);						// the user canceled the operation, shoud we dismiss						// this dialog or not?						return false;					}					else            ShowImportResultsRaw(gImportMsgsBundle.getFormattedString('ImportSettingsSuccess', [ name ]), null);					break;			}		}	}		return true;}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/eaa6754a0a946375badf1165b3e4af3999e4b03c/importDialog.js/buggy/mailnews/import/resources/content/importDialog.js