add:  if (gAvailDirectories.length < 1) directoriesList.setAttribute("disabled", true); 
context: function enableAutocomplete(){  var autocompleteLDAP = document.getElementById("autocompleteLDAP");    var directoriesList =  document.getElementById("directoriesList");   var directoriesListPopup = document.getElementById("directoriesListPopup");  var editButton = document.getElementById("editButton");//  var autocompleteSkipDirectory = document.getElementById("autocompleteSkipDirectory");  if (autocompleteLDAP.checked) {    directoriesList.removeAttribute("disabled");    directoriesListPopup.removeAttribute("disabled");    editButton.removeAttribute("disabled");//    autocompleteSkipDirectory.removeAttribute("disabled");  }  else {    directoriesList.setAttribute("disabled", true);    directoriesListPopup.setAttribute("disabled", true);    editButton.setAttribute("disabled", true);//    autocompleteSkipDirectory.setAttribute("disabled", true);  }  gFromGlobalPref = true;  LoadDirectories(directoriesListPopup);}
meta: 5459	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5459/5d4fcedc835b42876be9eb37c124d24c7c99dfa9/pref-directory.js/clean/mailnews/addrbook/prefs/resources/content/pref-directory.js