rem: doSetOKCancel(folderPropsOKButtonCallback); 
context: function folderPropsOnLoad(){  dump("folder props loaded"+'\n');  doSetOKCancel(folderPropsOKButtonCallback);  RDF = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService);  // look in arguments[0] for parameters  if (window.arguments && window.arguments[0]) {    if ( window.arguments[0].title ) {      top.window.title = window.arguments[0].title;    }    if ( window.arguments[0].okCallback ) {      top.okCallback = window.arguments[0].okCallback;    }  }  // fill in folder name, based on what they selected in the folder pane  if (window.arguments[0].preselectedURI) {    try {      gPreselectedFolderURI = window.arguments[0].preselectedURI;    }    catch (ex) {    }  }  else {    dump("passed null for preselectedURI, do nothing\n");  }  if(window.arguments[0].name)  {    var name = document.getElementById("name");    name.value = window.arguments[0].name;//  name.setSelectionRange(0,-1);//  name.focusTextField();  }  gServerTypeFolder = window.arguments[0].serverType;  dump("preselectfolder uri = "+gPreselectedFolderURI+'\n');  dump("serverType = "+gServerTypeFolder+'\n');  if (window.arguments && window.arguments[0]) {    if (window.arguments[0].msgWindow) {      gParentMsgWindow = window.arguments[0].msgWindow;    }  }  // this hex value come from nsMsgFolderFlags.h  var folderResource = RDF.GetResource(gPreselectedFolderURI);      if (folderResource)    gMsgFolder = folderResource.QueryInterface(Components.interfaces.nsIMsgFolder);  if (!gMsgFolder)    dump("no gMsgFolder preselectfolder uri = "+gPreselectedFolderURI+'\n');  if (gMsgFolder) {    if (gMsgFolder.flags & MSG_FOLDER_FLAG_OFFLINE) {      if(gServerTypeFolder == "imap" || gServerTypeFolder == "pop3")        document.getElementById("offline.selectForOfflineFolder").checked = true;      if(gServerTypeFolder == "nntp")        document.getElementById("offline.selectForOfflineNewsgroup").checked = true;    }    else {      if(gServerTypeFolder == "imap" || gServerTypeFolder == "pop3")        document.getElementById("offline.selectForOfflineFolder").checked = false;      if(gServerTypeFolder == "nntp")        document.getElementById("offline.selectForOfflineNewsgroup").checked = false;    }    // select the menu item     var folderCharsetList = document.getElementById("folderCharsetList");    var elements = folderCharsetList.getElementsByAttribute("value", gMsgFolder.charset);    folderCharsetList.selectedItem = elements[0];    // set override checkbox    document.getElementById("folderCharsetOverride").checked = gMsgFolder.charsetOverride;    // set check for new mail checkbox    document.getElementById("folderCheckForNewMessages").checked = gMsgFolder.flags & MSG_FOLDER_FLAG_CHECK_NEW;  }  if (gServerTypeFolder == "imap")  {    var imapFolder = gMsgFolder.QueryInterface(Components.interfaces.nsIMsgImapMailFolder);    if (imapFolder)      imapFolder.fillInFolderProps(gFolderPropsSink);  }    // select the initial tab  if (window.arguments[0].tabID) {    // set index for starting panel on the <tabpanel> element    var folderPropTabPanel = document.getElementById("folderPropTabPanel");    folderPropTabPanel.setAttribute("selectedIndex", window.arguments[0].tabIndex);    try {      var tab = document.getElementById(window.arguments[0].tabID);      tab.setAttribute("selected", "true");    }    catch (ex) {}  }  hideShowControls(gServerTypeFolder);    moveToAlertPosition();}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/fa44c48d34ece3b5bf759b9a3290c25fdac9b30d/folderProps.js/clean/mailnews/base/resources/content/folderProps.js