home *** CD-ROM | disk | FTP | other *** search
/ Online Praxis 1998 March / Image.iso / CD-ROM / NETSCAPE / CCK / ASE.Z / nsetting.js < prev    next >
Encoding:
Text File  |  1997-08-21  |  23.5 KB  |  564 lines

  1. <!--  to hide script contents from old browsers
  2.  
  3.  
  4. //    THIS IS THE API for functions you will want to access from outside of this javascript file:
  5. //    you probably want to use these functions in the OnLoad and OnUnload event handlers of your htmls files,
  6. //    in order     (1) Get all the appropriate information from the config files and set the appropriate form fields on load
  7. //    and            (2)    To write the data from your form fields back out to the config files on unload    
  8.  
  9. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  10. //    these functions interface with the config files (e.g., ACCTSET.INI)
  11. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  12.  
  13. //    function GetNameValuePair(fileName, sectionName, flagName)            //    looks in the file fileName for a line that looks like "flagName=value"
  14.                                                                         //    under the section called "[sectionName]".  If it finds one, returns value.
  15.                                                                         
  16. //    function SetNameValuePair(fileName, sectionName, flagName, data)    //    in the file fileName, writes a line that looks like "flagname=data" under
  17.                                                                         //    the section called "[sectionName]" -will create the file and/or section name
  18.                                                                         //    if necessary    
  19.  
  20. //    function getFileListFromConfigFolder(fileSuffix)                    //    returns a list of files with the specified suffix that live
  21.                                                                         //    in the Config Folder
  22.                                                                         
  23.                                                                         
  24. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  25. //    these functions set the elements of your form    (all return nothing)
  26. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  27. //    function setCheckBox(formName, boxName, inValue)    //    if inValue = 0 sets checkbox to off, else to on
  28. //    function setRadio(formName, radioName, inValue)        //    inValue is yes or no - yes is first, no is second radio.  If inValue is a number, sets
  29.                                                         //    the inValueth radio with that name to on.  (0 < inValue < 33, jsut for sanity checking0
  30. //    function setText(formName, textFieldName, inValue)    //    sets the specified textField to the input value
  31.  
  32. //    function setCardTypes(formName, cardTypesString)        // cardTypesString is a string of the form "AX,MC,DC,VI" as per ACCTSET.INI requirements, this sets
  33.                                                 // four checkboxes whose names MUST be: "AX", "MC", "DC", and "VI"
  34. //    function fillSelectListWithConfigFiles(formName, selectListName, fileSuffix, offerNew)    // finds all files with the suffix fileSuffix
  35.                                                                                     // (should look like ".NCI") and fills in the specified list
  36.                                                                                     // this is used by the following two functions
  37.                                                                                     // if offerNew is true, an option will be provided with name
  38.                                                                                     // "New Configuration" and value "_new_"
  39.  
  40. //    function fillNCIFileList(formName, selectListName)    //will fill the specified select list with the names of all NCI files in the Config folder
  41. //    function fillIASFileList(formName, selectListName)    //will fill the specified select list with the names of all IAS files in the Config folder
  42.                                                         //selects RegServ.SR if that file exists
  43. //    function setSelectList(formName, selectListName, inValue)    // sets the selectlist to select the option whose text is inValue, if it exists
  44.                                                                 // used internally to set the value of the NCI file list, for example
  45.                                                                 
  46. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  47. //    these functions get the values of elements of your form and return text suitable for writing into Config files (all return strings)
  48. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  49. //    function getRadio(formName, radioName)            //     returns "yes" if first radio is selected, "no" if second is selected, else returns
  50.                                                     //    index of selected radio (-1 if none selected)
  51. //    function getText(formName, textFieldName)        //    returns the text inside a text field
  52. //    function getCheckBox(formName, selectListName)    //    returns true if checkbox is checked, false if not
  53. //    function getSelectListSelection(formName, selectListName)
  54.  
  55. ////////these are specific functions which get specfic information using the above functions//////////////////
  56. //    function getCardTypes(formName)        // returns a string of the form "AX,MC,DC,VI", based on the values of the four checkboxes in
  57.                                         // the specified form, whose names MUST be: "AX", "MC", "DC", and "VI"
  58.                                         
  59. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  60. //    Other Functions
  61. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  62.  
  63. //function yesNoToNoYes(inValue)    // if inValue == "yes" returns "no".  if invalue == "no" returns yes, else nothing
  64.  
  65. //function getAcctSetupFilename()    //returns the name of ACCTSET.INI
  66.  
  67. //function debug(theString)    // writes the string to the java console, using the setUpPlugin
  68.  
  69. //these should be overriden if this file is included from within another javascript file
  70. //    function checkData()        // this should return true in most cases, you can add checks in here for determining if any necessary fields
  71.                                 // have been left empty, etc. - if it returns false, account setup's global navigation won't proceed when next is clicked
  72. //    function getAcctSetFlags()    // this is an example of a function that would be used as an onLoad handler in a file where the form name is
  73.                                 // "acctsetForm", and it has form elements for all the flags in ACCTSET.INI 
  74. //    function saveAcctSetFlags()    // this is an example of a function that would be used as an onUnLoad handler in a file where the form name is
  75.                                 // "acctsetForm", and it has form elements for all the flags in ACCTSET.INI 
  76.  
  77. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  78. //    LOCATION DEPENDENT FUNCTIONS
  79. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  80. // The following functions are dependent on the LOCATION OF THIS FILE and the LOCATION OF THE globals.js FILE
  81. //    actually, they are really dependent on the part of the frameset heirarchy in which this file is included
  82. //    right now we assume it is included two framesets deep, and the outermost frameset contains a frame called "globals", 
  83. //    which includes the "globals.js" file which is the meat of the account setup javascript universe - it interfaces with the plugin
  84. //  SO, if the heirarchy changes, the path of the "globals" frame should be updated
  85.  
  86. //    function getGlobalsLocation()
  87.  
  88.  
  89. //this is the function that determines where access to the globals is
  90. //from the document that is including this file.
  91. //it's made out of ugly hacks and ricotta cheese
  92. function getGlobalsLocation()
  93. {
  94.     var loc = ""; 
  95.  
  96.     //this stuff is no longer necessary, since we now do everything in the same window,
  97.     //and the globals are always in the same relative location.    
  98.     //if (top.name == "addnci")
  99.     //{    
  100.     //    //alert("addnci!");
  101.     //    loc = ("top.opener.top.globals");
  102.     //}
  103.     
  104.     //else if (top.name == "addias")
  105.     //{
  106.     //    loc = ("top.window.opener.globals");
  107.     //}
  108.     //else
  109.     //{
  110.         //standard case, globals is in the same window
  111.         var loc = "top.globals";
  112.         
  113.     //}
  114.     return loc;
  115. }
  116.  
  117.  
  118.  
  119. function getAcctSetupFilename()
  120. {
  121.     return     "ACCTSET.INI";
  122. }
  123.  
  124. function completeConfigFilePath(inFileName)
  125. {
  126.     var outFileName = top.globals.getConfigFolder(top.globals) + inFileName;
  127.     return outFileName;
  128. }
  129.  
  130.  
  131. ///WARNING THE LOCATION OF THE GLOBALS IS HARDCODED IN THIS FCN - it can only be accessed by children windows
  132. function saveNewConfigFile(fileName, inValue, doPrompt)
  133. {
  134.     // Request privilege
  135.     netscape.security.PrivilegeManager.enablePrivilege("AccountSetup");
  136.  
  137.     if ((doPrompt != true) && (doPrompt != false))
  138.         doPrompt = false;    //should we really assume false?
  139.     
  140.     if ((fileName != null) && (fileName != ""))
  141.     {
  142.         var cFileName = completeConfigFilePath(fileName);
  143.         
  144.         if ((cFileName != null) && (inValue != null) && (cFileName != "") && (inValue != ""))
  145.             top.globals.document.setupPlugin.SaveTextToFile(cFileName, inValue, doPrompt);
  146.         
  147.     }
  148. }
  149.  
  150. function debug(theString)
  151. {
  152.     top.globals.debug(theString);
  153. }
  154.  
  155.  
  156. function GetNameValuePair(inFileName, sectionName, flagName)
  157. {
  158.     // Request privilege
  159.     netscape.security.PrivilegeManager.enablePrivilege("AccountSetup");
  160.  
  161.     var fileName = completeConfigFilePath(inFileName);
  162.     
  163.     var data = top.globals.document.setupPlugin.GetNameValuePair(fileName, sectionName, flagName);
  164.     
  165.     
  166.     debug("\tGetNameValuePair: (" + inFileName + ") [" +sectionName+ "] " +flagName+ "=" + data);
  167.     return data;
  168. }
  169.  
  170. function SetNameValuePair(inFileName, section, variable, data)
  171. {
  172.     // Request privilege
  173.     netscape.security.PrivilegeManager.enablePrivilege("AccountSetup");
  174.  
  175.     var fileName = completeConfigFilePath(inFileName);
  176.  
  177.     top.globals.document.setupPlugin.SetNameValuePair(fileName, section, variable, data);
  178.     debug("\tSetNameValuePair: (" + fileName + ")[" +section+ "] " +variable+ "=" + data);
  179. }
  180.  
  181. function getFileListFromConfigFolder(fileSuffix)
  182. {
  183.     // Request privilege
  184.     netscape.security.PrivilegeManager.enablePrivilege("AccountSetup");
  185.  
  186.     var pathName = top.globals.getConfigFolder(top.globals);
  187.     var theList = top.globals.document.setupPlugin.GetFolderContents(pathName, fileSuffix);
  188.     return theList;
  189. }
  190.  
  191. function fillSelectListWithConfigFiles(formName, selectListName, fileSuffix, offerNew)
  192. {
  193.     var curConfigName = "";
  194.     var curConfigDescription = "";
  195.  
  196.     //blank out old list
  197.     for (var i = (parent.tabs.tabbody.document[formName][selectListName].length -1); i >= 0 ; i--)
  198.     {
  199.         parent.tabs.tabbody.document[formName][selectListName].options[i] = null;
  200.     }    
  201.     
  202.     //make a blank so the user can choose nothing
  203.     parent.tabs.tabbody.document[formName][selectListName].options[0] = new Option("< None Selected >","",false, false); 
  204.     
  205.     //Only offer a new if we said so
  206.     if (offerNew == true)
  207.         parent.tabs.tabbody.document[formName][selectListName].options[1] = new Option("< New Configuration >","_new_",false, false); 
  208.  
  209.     // Get a list of the files in the Config folder
  210.     fileList = getFileListFromConfigFolder(fileSuffix);
  211.     
  212.     //debug( "filelist: " + fileList);
  213.     
  214.     if (fileList != null)    {
  215.         for (var i=0; i<fileList.length; i++)    {
  216.                 curConfigName             = GetNameValuePair(fileList[i], "Dial-In Configuration", "SiteName");
  217.                 curConfigDescription     = GetNameValuePair(fileList[i], "Dial-In Configuration", "Description");
  218.  
  219.                 if ((curConfigName != null)  && (curConfigName != ""))
  220.                     parent.tabs.tabbody.document[formName][selectListName].options[parent.tabs.tabbody.document[formName][selectListName].length] = new Option(curConfigName,fileList[i], false, false);
  221.                 else if ((curConfigDescription != null) && (curConfigDescription != ""))
  222.                     parent.tabs.tabbody.document[formName][selectListName].options[parent.tabs.tabbody.document[formName][selectListName].length] = new Option(curConfigDescription,fileList[i], false, false);
  223.                 else
  224.                     parent.tabs.tabbody.document[formName][selectListName].options[parent.tabs.tabbody.document[formName][selectListName].length] = new Option(fileList[i],fileList[i], false, false);
  225.                     
  226.             }
  227.         }
  228. }
  229.  
  230.  
  231. //this is a helper function that converts "yes" to 0 and "no" to 1 - but leaves integers alone
  232. function ynToZeroOne(inValue)
  233. {
  234.     var ynValue = new String(inValue);
  235.     var intValue = -1;
  236.     
  237.     if (ynValue == "yes") 
  238.     {
  239.         intValue = 0;    
  240.     }
  241.     
  242.     else if (ynValue == "no")
  243.     {
  244.         intValue = 1;        
  245.     }
  246.     
  247.     else
  248.     {
  249.     if (!isNaN(parseInt(inValue)))
  250.         {
  251.                 intValue = inValue;
  252.         }
  253.     }
  254.     return intValue;    
  255. }
  256.  
  257.  
  258. function yesNoToNoYes(inValue)
  259. {
  260.     var tempValue = new String(inValue);
  261.     
  262.     if ((tempValue != null))
  263.     {
  264.         if (tempValue == "yes")
  265.         {
  266.             return "no";    
  267.         }        
  268.         else if (tempValue == "no")
  269.         {
  270.             return "yes";
  271.         }    
  272.         else
  273.             return inValue;    
  274.     }
  275. }
  276.  
  277. //set checkbox on if inValue is "yes" or 0, off otherwise
  278. function setCheckBox(formName, boxName, inValue)
  279. {
  280.  
  281.     debug("SetCheckbox: " + inValue);
  282.     var intValue = ynToZeroOne(inValue);
  283.  
  284.     if (intValue == 0)
  285.         parent.tabs.tabbody.document[formName][boxName].checked = 1;
  286.     else
  287.         parent.tabs.tabbody.document[formName][boxName].checked = 0;
  288. }
  289.  
  290. function getCheckBox(formName, boxName)        // returns yes if checked, no if not
  291. {
  292.     var outValue = "no";
  293.     
  294.     var tfValue =    (parent.tabs.tabbody.document[formName][boxName].checked);
  295.         
  296.     if (tfValue == true)
  297.         outValue = "yes";
  298.         
  299.     return outValue;    
  300. }
  301.  
  302. function setRadio(formName, radioName, inValue)
  303. {
  304.     var intValue = ynToZeroOne(inValue);
  305.  
  306.     parent.tabs.tabbody.document[formName][radioName][intValue].checked = 1;
  307.     debug("Setting radio " +radioName + " to " + intValue);
  308. }
  309.  
  310. function getRadio(formName, radioName)
  311. {
  312.     
  313.     var radioIndex = -1;
  314.     //based on the assumption that yes is the first radio, "no" is the second radio
  315.     
  316.     if (parent.tabs.tabbody.document[formName][radioName][0].checked == 1)
  317.     {
  318.         //debug("getRadio: returning yes");
  319.         return ("yes");
  320.     }
  321.     else if (parent.tabs.tabbody.document[formName][radioName][1].checked == 1)
  322.     {    
  323.         //debug("getRadio: returning no");
  324.         return ("no");
  325.     }
  326.     else
  327.     {
  328.         //debug("getRadio: radio[0]" + parent.tabs.tabbody.document[formName][radioName][0].checked);
  329.         //debug("getRadio: radio[1]" + parent.tabs.tabbody.document[formName][radioName][1].checked);
  330.          
  331.         for (var i = 0; i < parent.tabs.tabbody.document[formName][radioName].length; i++)
  332.         {
  333.             if (parent.tabs.tabbody.document[formName][radioName][i].checked == 1)    
  334.                 radioIndex = i;        
  335.         }
  336.         return radioIndex;
  337.     }
  338. }
  339.  
  340. function getText(formName, textFieldName)
  341. {
  342.     //return document[formName][textFieldName].value;
  343.     return parent.tabs.tabbody.document[formName][textFieldName].value;
  344. }
  345.  
  346. function setText(formName, textFieldName, inValue)
  347. {
  348.     debug("Setting Text for " + textFieldName + " to " + inValue);
  349.     //document[formName][textFieldName].value = inValue;
  350.     parent.tabs.tabbody.document[formName][textFieldName].value = inValue;
  351. }
  352.  
  353.  
  354. function setSelectList(formName, selectListName, inValue)
  355. {
  356.     if (inValue != null)
  357.     { 
  358.          for (var i = (parent.tabs.tabbody.document[formName][selectListName].length - 1); i >= 0 ; i--)
  359.          {
  360.              if(inValue.toString() == (parent.tabs.tabbody.document[formName][selectListName].options[i].value.toString()))
  361.              {
  362.                  //debug("Found select list Match (" + i + ")(" + inValue + ")");
  363.                  parent.tabs.tabbody.document[formName][selectListName].options[i].selected = true;
  364.              }
  365.          }
  366.     }    
  367. }
  368.  
  369.  
  370.  
  371. function fillNCIFileList(formName, listName)
  372. {
  373.         fillSelectListWithConfigFiles(formName, listName, ".NCI", true);
  374.         
  375.         var acctSetupFile = getAcctSetupFilename();
  376.          var selectedNCIFile = GetNameValuePair(acctSetupFile,"Mode Selection","ExistingSRFile");
  377.         setSelectList(formName, listName, selectedNCIFile);
  378. } // fillNCIFileList
  379.  
  380.  
  381.  
  382. function getSelectListSelection(formName, selectListName)
  383. {
  384.     return    parent.tabs.tabbody.document[formName][selectListName].options[parent.tabs.tabbody.document[formName][selectListName].options.selectedIndex].value.toString();
  385. }
  386.  
  387.  
  388. // this is a smaple onLoad event handler - this would be used if the form in question
  389. // had an element for each and every flag in ACCTSET.INI
  390. function getAcctSetFlags()
  391. {
  392.     
  393.  
  394.     var acctSetupFile        =    getAcctSetupFilename();
  395.      var tempFlagValue         =     "";
  396.      var asFormName            =    "acctsetForm";
  397.      
  398.      //parent.parent.parent.status = ("loading data from " + acctSetupFile + "...");
  399.      
  400.      //get all the flags related to mode selection, set the appropriate form fields (4)
  401.     tempFlagValue = GetNameValuePair(acctSetupFile,"Mode Selection","ForceExisting");
  402.     setRadio(asFormName, "ForceExisting", tempFlagValue);
  403.         
  404.     fillNCIFileList(asFormName, "ExistingSRFile");
  405.     
  406.     tempFlagValue = GetNameValuePair(acctSetupFile,"Mode Selection","ForceNew");
  407.     setRadio(asFormName, "ForceNew", tempFlagValue);
  408.     tempFlagValue = GetNameValuePair(acctSetupFile,"Mode Selection","IntlMode");
  409.     setRadio(asFormName, "IntlMode", tempFlagValue);
  410.     
  411.     //get all the flags related to new account mode, set the appropriate form fields (9)
  412.     tempFlagValue = GetNameValuePair(acctSetupFile,"New Acct Mode","ShowNewPathInfo");
  413.     setRadio(asFormName, "ShowNewPathInfo", tempFlagValue);
  414.     tempFlagValue = GetNameValuePair(acctSetupFile,"New Acct Mode","AskSaveAcctInfo");
  415.     setRadio(asFormName, "AskSaveAcctInfo", tempFlagValue);
  416.     tempFlagValue = GetNameValuePair(acctSetupFile,"New Acct Mode","SavePasswords");
  417.     setRadio(asFormName, "SavePasswords", tempFlagValue);
  418.     tempFlagValue = GetNameValuePair(acctSetupFile,"New Acct Mode","AskPersonalInfo");
  419.     setRadio(asFormName, "AskPersonalInfo", tempFlagValue);
  420.     tempFlagValue = GetNameValuePair(acctSetupFile,"New Acct Mode","AskBillingInfo");
  421.     setRadio(asFormName, "AskBillingInfo", tempFlagValue);
  422.     tempFlagValue = GetNameValuePair(acctSetupFile,"New Acct Mode","RegServer");
  423.     setText(asFormName, "RegServer", tempFlagValue);
  424.     tempFlagValue = GetNameValuePair(acctSetupFile,"New Acct Mode","CardTypes");
  425.     setCardTypes(asFormName, tempFlagValue);
  426.     
  427.     //get all the flags related to Existing account mode, set the appropriate form fields (15)
  428.     tempFlagValue = GetNameValuePair(acctSetupFile,"Existing Acct Mode","ShowExistingPathInfo");
  429.     setRadio(asFormName, "ShowExistingPathInfo", tempFlagValue);
  430.     tempFlagValue = GetNameValuePair(acctSetupFile,"Existing Acct Mode","RegPodURL");
  431.     setText(asFormName, "RegPodURL", tempFlagValue);
  432.     tempFlagValue = GetNameValuePair(acctSetupFile,"Existing Acct Mode","ShowIntro2");
  433.     setRadio(asFormName, "ShowIntro2", tempFlagValue);
  434.     tempFlagValue = GetNameValuePair(acctSetupFile,"Existing Acct Mode","ShowPhones");
  435.     setRadio(asFormName, "ShowPhones", tempFlagValue);
  436.     tempFlagValue = GetNameValuePair(acctSetupFile,"Existing Acct Mode","AskName");
  437.     setRadio(asFormName, "AskName", tempFlagValue);
  438.     tempFlagValue = GetNameValuePair(acctSetupFile,"Existing Acct Mode","AskLogin");
  439.     setRadio(asFormName, "AskLogin", tempFlagValue);
  440.     tempFlagValue = GetNameValuePair(acctSetupFile,"Existing Acct Mode","AskTTY");
  441.     setRadio(asFormName, "AskTTY", tempFlagValue);
  442.     tempFlagValue = GetNameValuePair(acctSetupFile,"Existing Acct Mode","AskEmail");
  443.     setRadio(asFormName, "AskEmail", tempFlagValue);
  444.     tempFlagValue = GetNameValuePair(acctSetupFile,"Existing Acct Mode","AskPhone");
  445.     setRadio(asFormName, "AskPhone", tempFlagValue);
  446.     tempFlagValue = GetNameValuePair(acctSetupFile,"Existing Acct Mode","AskDNS");
  447.     setRadio(asFormName, "AskDNS", tempFlagValue);
  448.     tempFlagValue = GetNameValuePair(acctSetupFile,"Existing Acct Mode","AskHosts");
  449.     setRadio(asFormName, "AskHosts", tempFlagValue);
  450.     tempFlagValue = GetNameValuePair(acctSetupFile,"Existing Acct Mode","AskPublishing");
  451.     setRadio(asFormName, "AskPublishing", tempFlagValue);
  452.     tempFlagValue = GetNameValuePair(acctSetupFile,"Existing Acct Mode","AskRegister");
  453.     setRadio(asFormName, "AskRegister", tempFlagValue);
  454.     tempFlagValue = GetNameValuePair(acctSetupFile,"Existing Acct Mode","AskLDAP");
  455.     setRadio(asFormName, "AskLDAP", tempFlagValue);
  456.     tempFlagValue = GetNameValuePair(acctSetupFile,"Existing Acct Mode","AskIMAP");
  457.     setRadio(asFormName, "AskIMAP", tempFlagValue);
  458.     
  459.     //parent.parent.status = ("Loading Data.....Done.");
  460. }//function getAcctSetFlags()
  461.  
  462.  
  463. function checkData()
  464. {
  465.     return true;
  466. }
  467.  
  468.  
  469. //sample onUnload event handler - this would be used if the form in question
  470. // had an element for each and every flag in ACCTSET.INI
  471. function saveAcctSetFlags()
  472. {
  473.     // save globals here
  474.  
  475.     var modeSectionName        =     "Mode Selection";
  476.     var existingSectionName    =    "Existing Acct Mode";
  477.     var newSectionName        =    "New Acct Mode";
  478.     var    asFormName            =    "acctsetForm";
  479.  
  480.     //debug("trying to save...");
  481.  
  482.     // Request privilege
  483.     netscape.security.PrivilegeManager.enablePrivilege("AccountSetup");
  484.  
  485.     if (top.globals.document.setupPlugin == null)    return;
  486.  
  487.     var acctSetupFile = getAcctSetupFilename();
  488.     
  489.     debug("writing data to " + acctSetupFile);
  490.     
  491.     if (acctSetupFile != null && acctSetupFile != "")    {
  492.  
  493.         SetNameValuePair(acctSetupFile,modeSectionName,"ForceExisting", getRadio("acctsetForm", "ForceExisting"));
  494.         SetNameValuePair(acctSetupFile,modeSectionName,"ExistingSRFile", getSelectListSelection("acctsetForm", "ExistingSRFile"));
  495.         SetNameValuePair(acctSetupFile,modeSectionName,"ForceNew", getRadio(asFormName,"ForceNew"));
  496.         SetNameValuePair(acctSetupFile,modeSectionName,"IntlMode", getRadio(asFormName,"IntlMode"));
  497.         
  498.         
  499.         SetNameValuePair(acctSetupFile,newSectionName,"ShowNewPathInfo", getRadio(asFormName,"ShowNewPathInfo"));
  500.         SetNameValuePair(acctSetupFile,newSectionName,"AskSaveAcctInfo", getRadio(asFormName,"AskSaveAcctInfo"));
  501.         SetNameValuePair(acctSetupFile,newSectionName,"SavePasswords", getRadio(asFormName,"SavePasswords"));
  502.         SetNameValuePair(acctSetupFile,newSectionName,"AskPersonalInfo", getRadio(asFormName,"AskPersonalInfo"));
  503.         SetNameValuePair(acctSetupFile,newSectionName,"AskBillingInfo", getRadio(asFormName,"AskBillingInfo"));
  504.         SetNameValuePair(acctSetupFile,newSectionName,"RegServer", getText(asFormName, "RegServer"));
  505.  
  506.         SetNameValuePair(acctSetupFile,newSectionName,"CardTypes", getCardTypes(asFormName));
  507.         
  508.         
  509.         SetNameValuePair(acctSetupFile,existingSectionName,"ShowExistingPathInfo", getRadio(asFormName,"ShowExistingPathInfo"));
  510.         SetNameValuePair(acctSetupFile,existingSectionName,"RegPodURL", getText(asFormName, "RegPodURL"));
  511.         SetNameValuePair(acctSetupFile,existingSectionName,"ShowIntro2", getRadio(asFormName,"ShowIntro2"));
  512.         SetNameValuePair(acctSetupFile,existingSectionName,"ShowPhones", getRadio(asFormName,"ShowPhones"));
  513.         SetNameValuePair(acctSetupFile,existingSectionName,"AskName", getRadio(asFormName,"AskName"));
  514.         SetNameValuePair(acctSetupFile,existingSectionName,"AskLogin", getRadio(asFormName,"AskLogin"));
  515.  
  516.         SetNameValuePair(acctSetupFile,existingSectionName,"AskTTY", getRadio(asFormName,"AskTTY"));
  517.         SetNameValuePair(acctSetupFile,existingSectionName,"AskEmail", getRadio(asFormName,"AskEmail"));
  518.         SetNameValuePair(acctSetupFile,existingSectionName,"AskPhone", getRadio(asFormName,"AskPhone"));
  519.  
  520.         SetNameValuePair(acctSetupFile,existingSectionName,"AskDNS", getRadio(asFormName,"AskDNS"));
  521.         SetNameValuePair(acctSetupFile,existingSectionName,"AskHosts", getRadio(asFormName,"AskHosts"));
  522.         SetNameValuePair(acctSetupFile,existingSectionName,"AskPublishing", getRadio(asFormName,"AskPublishing"));
  523.         SetNameValuePair(acctSetupFile,existingSectionName,"AskRegister", getRadio(asFormName,"AskRegister"));
  524.         SetNameValuePair(acctSetupFile,existingSectionName,"AskLDAP", getRadio(asFormName,"AskLDAP"));
  525.  
  526.         SetNameValuePair(acctSetupFile,existingSectionName,"AskIMAP", getRadio(asFormName,"AskIMAP"));
  527.         }
  528. }
  529.  
  530.  
  531.  //    For easy reference, this is the list of flags that ACCTSET.INI currently supports
  532.  //    ForceExisting
  533.  // ExistingSRFile
  534.  //    ForceNew
  535.  //    IntlMode
  536.  //    ShowNewPathInfo
  537.  //    AskSaveAcctInfo
  538.  //    SavePasswords
  539.  //    AskPersonalInfo
  540.  //    //AskSurvey        //defunct
  541.  //    //AskShareInfo    //defunct
  542.  //    AskBillingInfo
  543.  //    RegServer
  544.  //    CardTypes
  545.  //    ShowExistingPathInfo
  546.  //    RegPodURL
  547.  //    ShowIntro2
  548.  // ShowPhones
  549.  //    AskName
  550.  //    AskLogin
  551.  //    AskTTY
  552.  //    AskEmail
  553.  //    AskPhone
  554.  //    AskDNS
  555.  //    AskHosts
  556.  // AskPublishing
  557.  //    AskRegister
  558.  //    AskLDAP
  559.  //    AskIMAP
  560.  
  561.  
  562.  
  563. // end hiding contents from old browsers  -->
  564.