home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 January / 01_02.iso / software / netscape62win / mail.xpi / bin / chrome / messenger.jar / content / messenger / pref-mailnews.js < prev    next >
Text File  |  2001-10-11  |  950b  |  33 lines

  1. function Startup()
  2. {
  3.   var startupFunc;
  4.   try {
  5.     startupFunc = document.getElementById("mailnewsEnableMapi").getAttribute('startFunc');
  6.   }
  7.   catch (ex) {
  8.     startupFunc = null;
  9.   }
  10.   if (startupFunc)
  11.     eval(startupFunc);
  12. }
  13.  
  14. function setColorWell(menu) 
  15. {
  16.     // Find the colorWell and colorPicker in the hierarchy.
  17.     var colorWell = menu.firstChild.nextSibling;
  18.     var colorPicker = menu.firstChild.nextSibling.nextSibling.firstChild;
  19.  
  20.     // Extract color from colorPicker and assign to colorWell.
  21.     var color = colorPicker.getAttribute('color');
  22.     colorWell.style.backgroundColor = color;
  23. }
  24.  
  25. function setHomePageToDefaultPage(folderFieldId)
  26. {
  27.   var homePageField = document.getElementById(folderFieldId);
  28.   var prefs = Components.classes["@mozilla.org/preferences;1"].getService(Components.interfaces.nsIPref);
  29.   var url = prefs.getDefaultLocalizedUnicharPref("mailnews.start_page.url");
  30.   homePageField.value = url;
  31. }
  32.  
  33.