home *** CD-ROM | disk | FTP | other *** search
/ Online Praxis 1998 March / Image.iso / CD-ROM / NETSCAPE / CCK / ASE.Z / connect2.js < prev    next >
Encoding:
Text File  |  1998-02-26  |  20.2 KB  |  546 lines

  1. <!--  to hide script contents from old browsers
  2.  
  3.  
  4.  
  5. function configureDialer()
  6. {
  7.     netscape.security.PrivilegeManager.enablePrivilege("AccountSetup");
  8.  
  9.     var theFile = parent.parent.globals.getAcctSetupFilename(self);
  10.     var intlFlag = parent.parent.globals.GetNameValuePair(theFile,"Mode Selection","IntlMode");
  11.     intlFlag = intlFlag.toLowerCase();
  12.  
  13.  
  14.     var theFolder = parent.parent.globals.getConfigFolder(self);
  15.     var theRegFile = theFolder + parent.parent.globals.document.vars.regServer.value;
  16.     var theNCIFile = parent.parent.globals.document.vars.providerFilename.value;
  17.  
  18.     // platform check
  19.     var thePlatform = new String(navigator.userAgent);
  20.     var x=thePlatform.indexOf("(")+1;
  21.     var y=thePlatform.indexOf(";",x+1);
  22.     thePlatform=thePlatform.substring(x,y);
  23.  
  24.  
  25. /*
  26.     // determine name of scripting file
  27.     var scriptEnabledFlag = parent.parent.globals.GetNameValuePair(theRegFile,"Script","ScriptEnabled");
  28.     scriptEnabledFlag = scriptEnabledFlag.toLowerCase();
  29.     var theScriptFile = "";
  30.     if (scriptEnabledFlag == "yes")    {
  31.         theScriptFile = parent.parent.globals.GetNameValuePair(theRegFile,"Script","ScriptFileName");
  32.         if (theScriptFile != null && theScriptFile != "")    {
  33.             theScriptFile = theFolder + theScriptFile;
  34.             scriptEnabledFlag = "TRUE";
  35.             }
  36.         else    {
  37.             theScriptFile="";
  38.             scriptEnabledFlag = "FALSE";
  39.             }
  40.         }
  41.     else    {
  42.         scriptEnabledFlag = "FALSE";
  43.         }
  44. */
  45.  
  46.  
  47.     // determine outside line access string
  48.     
  49.     var outsideLineAccessStr = "";
  50.     if (parent.parent.globals.document.vars.prefixData.value != "")    {
  51.         outsideLineAccessStr = parent.parent.globals.document.vars.prefixData.value;
  52.         x = outsideLineAccessStr.indexOf(",");
  53.         if (x<0)    outsideLineAccessStr = outsideLineAccessStr + ",";
  54.         }
  55.  
  56.  
  57.     // build TAPI phone number
  58.  
  59.     if (intlFlag == "yes")    {
  60.         var thePhone = parent.parent.globals.document.vars.accountPhoneNumber.value;
  61.         var theCountry = "";
  62.         var theCountryCode="";                    // XXX
  63.         var longDistanceAccess="";
  64.         var dialAsLongDistanceFlag="FALSE";
  65.         var    dialAreaCodeFlag="FALSE";
  66.         var userAreaCode="";
  67.         }
  68.     else    {
  69.         var thePhone = "(" + parent.parent.globals.document.vars.accountAreaCode.value + ") " + parent.parent.globals.document.vars.accountPhoneNumber.value;
  70.         var theCountry = "USA";
  71.         var theCountryCode="1";
  72.         var longDistanceAccess="1";                // XXX
  73.         var userAreaCode=parent.parent.globals.document.vars.modemAreaCode.value;
  74.  
  75.         // Fix #75735
  76.         // Allow NCI files to specify DialAsLongDistance and DialAreaCode flags
  77.         // Else check international mode and turn them off
  78.         // Else check against ISP & user area codes and turn them off it they match
  79.         var dialAsLongDistance =  parent.parent.globals.GetNameValuePair(theNCIFile,"Dial-In Configuration","DialAsLongDistance");
  80.         dialAsLongDistance = dialAsLongDistance.toLowerCase();
  81.  
  82.         var dialAreaCode = parent.parent.globals.GetNameValuePair(theNCIFile,"Dial-In Configuration","DialAreaCode");
  83.         dialAreaCode = dialAreaCode.toLowerCase();
  84.  
  85.         if ((dialAsLongDistance != null && dialAsLongDistance!="") || (dialAreaCode != null && dialAreaCode!="") ) {
  86.             // compare these dialer flags against "no" because the default we want is "TRUE"
  87.             var dialAsLongDistanceFlag = (dialAsLongDistance=="no") ? "FALSE":"TRUE";
  88.             var dialAreaCodeFlag   = (dialAreaCode == "no") ? "FALSE":"TRUE";
  89.             }
  90.         else if (userAreaCode == parent.parent.globals.document.vars.accountAreaCode.value)    {
  91.             var dialAsLongDistanceFlag = "FALSE";
  92.             var dialAreaCodeFlag   = "FALSE";
  93.             }
  94.         else {
  95.             var dialAsLongDistanceFlag ="TRUE";
  96.             var dialAreaCodeFlag   = "TRUE";
  97.             }
  98.  
  99.         }
  100.  
  101.  
  102.     // determine new profile name (used for Account in dialer & profile name, save info default filename)
  103.  
  104.     var    newProfileName = parent.parent.globals.document.vars.accountName.value;
  105.     if (newProfileName=="")    {
  106.         newProfileName = parent.parent.globals.document.vars.first.value;
  107.         if (parent.parent.globals.document.vars.last.value != "")    {
  108.             newProfileName = newProfileName + " " + parent.parent.globals.document.vars.last.value;
  109.             }
  110.         }
  111.     if (newProfileName!="")    newProfileName = newProfileName + "'s";
  112.     if (parent.parent.globals.document.vars.providername.value != "")    {
  113.         newProfileName = newProfileName + " " + parent.parent.globals.document.vars.providername.value;
  114.         }
  115.     newProfileName = newProfileName + " Account";
  116.     if (newProfileName.length > 240)    newProfileName=newProfileName.substring(0,240);
  117.  
  118.  
  119.     if (thePlatform == "Win16")    {
  120.         if (newProfileName.length > 40)    newProfileName=newProfileName.substring(0,40);
  121.         }
  122.  
  123.     
  124.     // On WIN32 platforms, check if newProfileName contains any invalid characters, such as '/'
  125.     // On Mac, disallow invalid characters such as ':'
  126.  
  127.     if ((thePlatform == "WinNT") || (thePlatform == "Win95")) {
  128.         var x=0;
  129.         x = newProfileName.indexOf('/');
  130.         while ((x >= 0) && (newProfileName.length != 0)) {
  131.             newProfileName = newProfileName.substring(x+1, newProfileName.length);            
  132.             x = newProfileName.indexOf('/');
  133.             }
  134.         x = newProfileName.indexOf('\\');
  135.         while ((x >= 0) && (newProfileName.length != 0)) {
  136.             newProfileName = newProfileName.substring(x+1, newProfileName.length);            
  137.             x = newProfileName.indexOf('\\');
  138.             }
  139.         x = newProfileName.indexOf(':');
  140.         while ((x >= 0) && (newProfileName.length != 0)) {
  141.             newProfileName = newProfileName.substring(x+1, newProfileName.length);            
  142.             x = newProfileName.indexOf(':');
  143.             }
  144.         x = newProfileName.indexOf('\"');
  145.         while ((x >= 0) && (newProfileName.length != 0)) {
  146.             newProfileName = newProfileName.substring(x+1, newProfileName.length);            
  147.             x = newProfileName.indexOf('\"');
  148.             }
  149.         x = newProfileName.indexOf('?');
  150.         while ((x >= 0) && (newProfileName.length != 0)) {
  151.             newProfileName = newProfileName.substring(x+1, newProfileName.length);            
  152.             x = newProfileName.indexOf('?');
  153.             }
  154.         x = newProfileName.indexOf('<');
  155.         while ((x >= 0) && (newProfileName.length != 0)) {
  156.             newProfileName = newProfileName.substring(x+1, newProfileName.length);            
  157.             x = newProfileName.indexOf('<');
  158.             }
  159.         x = newProfileName.indexOf('>');
  160.         while ((x >= 0) && (newProfileName.length != 0)) {
  161.             newProfileName = newProfileName.substring(x+1, newProfileName.length);            
  162.             x = newProfileName.indexOf('>');
  163.             }
  164.         x = newProfileName.indexOf('|');
  165.         while ((x >= 0) && (newProfileName.length != 0)) {
  166.             newProfileName = newProfileName.substring(x+1, newProfileName.length);            
  167.             x = newProfileName.indexOf('|');
  168.             }
  169.         x = newProfileName.indexOf('&');
  170.         while ((x >= 0) && (newProfileName.length != 0)) {
  171.             newProfileName = newProfileName.substring(0, x) + newProfileName.substring(x+1, newProfileName.length);
  172.             x = newProfileName.indexOf('&');
  173.             }
  174.         }
  175.     else if (thePlatform == "Macintosh")    {
  176.         var x=0;
  177.         x = newProfileName.indexOf(':');
  178.         while ((x >= 0) && (newProfileName.length != 0)) {
  179.             newProfileName = newProfileName.substring(x+1, newProfileName.length);            
  180.             x = newProfileName.indexOf(':');
  181.             }
  182.         }
  183.     else if (thePlatform == "Win31") {
  184.         var x=0;
  185.         x = newProfileName.indexOf('(');
  186.         while ((x >= 0) && (newProfileName.length != 0)) {
  187.             newProfileName = newProfileName.substring(0, x) + newProfileName.substring(x+1, newProfileName.length);
  188.             x = newProfileName.indexOf('(');
  189.             }
  190.         x = newProfileName.indexOf(')');
  191.         while ((x >= 0) && (newProfileName.length != 0)) {
  192.             newProfileName = newProfileName.substring(0, x) + newProfileName.substring(x+1, newProfileName.length);
  193.             x = newProfileName.indexOf(')');
  194.             }
  195.         }
  196.  
  197.  
  198.     // configure dialer
  199.  
  200.     dialerData = parent.parent.globals.document.setupPlugin.newStringArray(28);        // increment this # as new dialer strings are added
  201.     dialerData[0]  = "FileName=" + theRegFile;
  202.     dialerData[1]  = "AccountName=" + newProfileName;                                // parent.parent.globals.document.vars.providername.value;
  203.     dialerData[2]  = "ISPPhoneNum=" + thePhone;
  204.     dialerData[3]  = "LoginName=" + parent.parent.globals.document.vars.accountName.value;
  205.     dialerData[4]  = "Password=" + parent.parent.globals.document.vars.accountPassword.value;
  206.     dialerData[5]  = "DNSAddress=" + parent.parent.globals.document.vars.primaryDNS.value;
  207.     dialerData[6]  = "DNSAddress2=" + parent.parent.globals.document.vars.secondaryDNS.value;
  208.     dialerData[7]  = "DomainName=" + parent.parent.globals.document.vars.domainName.value;
  209.     dialerData[8]  = "IPAddress=" + parent.parent.globals.document.vars.ipAddress.value;
  210.     dialerData[9]  = "IntlMode=" + ((intlFlag=="yes") ? "TRUE":"FALSE");
  211.     dialerData[10] = "DialOnDemand=TRUE";
  212.     dialerData[11] = "ModemName=" + parent.parent.globals.document.vars.modem.value;
  213.     dialerData[12] = "ModemType=" + parent.parent.globals.document.setupPlugin.GetModemType(parent.parent.globals.document.vars.modem.value);
  214.     dialerData[13] = "DialType=" + parent.parent.globals.document.vars.dialMethod.value;
  215.     dialerData[14] = "OutsideLineAccess=" + outsideLineAccessStr;
  216.     dialerData[15] = "DisableCallWaiting=" + ((parent.parent.globals.document.vars.cwData.value != "") ? "TRUE":"FALSE");
  217.     dialerData[16] = "DisableCallWaitingCode=" + parent.parent.globals.document.vars.cwData.value;
  218.     dialerData[17] = "UserAreaCode=" + userAreaCode;
  219.     dialerData[18] = "CountryCode=" + theCountryCode;
  220.     dialerData[19] = "LongDistanceAccess=" + longDistanceAccess;
  221.     dialerData[20] = "DialAsLongDistance=" + dialAsLongDistanceFlag;
  222.     dialerData[21] = "DialAreaCode=" + dialAreaCodeFlag;
  223.     dialerData[22] = "ScriptEnabled=" + parent.parent.globals.document.vars.scriptEnabled.value;
  224.     dialerData[23] = "ScriptFileName=" + parent.parent.globals.document.vars.scriptFile.value;
  225.     dialerData[24] = "NeedsTTYWindow=" + (parent.parent.globals.document.vars.ttyWindow.checked ? "TRUE":"FALSE");                                    // XXX
  226.     dialerData[25] = "Location=Home";
  227.     dialerData[26] = "DisconnectTime=" + parent.parent.globals.GetNameValuePair(theFile,"Mode Selection","Dialer_Disconnect_After");
  228.     dialerData[27] = "Path=Existing";
  229.  
  230.  
  231.     // write out dialer data to Java Console
  232.  
  233.     if (parent.parent.globals.document.vars.debugMode.value.toLowerCase() == "yes")    {
  234.         parent.parent.globals.debug("\nDialer data (ISP: '" + parent.parent.globals.document.vars.providername.value + "'): ");
  235.         var numElements = dialerData.length;
  236.         for (var x=0; x<numElements; x++)    {
  237.             parent.parent.globals.debug("        " + x + ": " + dialerData[x]);
  238.             }
  239.         }
  240.  
  241.     parent.parent.globals.document.setupPlugin.DialerConfig(dialerData,false);
  242.  
  243.  
  244.     // configure desktop (Windows)
  245.  
  246.     var iconFilename = theNCIFile.toUpperCase();
  247.     if (iconFilename == "")    {
  248.         iconFilename = theFolder + "DEFAULT.ICO";
  249.         }
  250.     else    {
  251.         var x = iconFilename.lastIndexOf(".NCI");
  252.         if (x>0)    {
  253.             iconFilename = iconFilename.substring(0,x) + ".ICO";
  254.             }
  255.         else    {
  256.             iconFilename = "";
  257.             }
  258.         }
  259.  
  260.     parent.parent.globals.document.setupPlugin.DesktopConfig(newProfileName, iconFilename, theFile);
  261.  
  262.  
  263.     // set up Navigator preferences
  264.  
  265.     var userName = parent.parent.globals.document.vars.first.value;
  266.     if (parent.parent.globals.document.vars.last.value != "")    {
  267.         userName = userName + " " + parent.parent.globals.document.vars.last.value;
  268.         }
  269.  
  270.     navigator.preference("network.hosts.smtp_server",        parent.parent.globals.document.vars.SMTP.value);
  271.     navigator.preference("network.hosts.nntp_server",        parent.parent.globals.document.vars.NNTP.value);
  272.  
  273.     navigator.preference("network.hosts.pop_server",    parent.parent.globals.document.vars.mailServer.value);
  274.     if (parent.parent.globals.document.vars.mailProtocol.value.toUpperCase() == "IMAP")    {
  275.         navigator.preference("mail.server_type",            1);
  276.         }
  277.     else    {
  278.         navigator.preference("mail.server_type",            0);
  279.         }
  280.  
  281.     var mailID=""
  282.     var mailAccount = parent.parent.globals.document.vars.emailName.value;
  283.  
  284.     // Fix #97404
  285.     // If email.htm screen was not shown emailName won't be filled in.
  286.     // In that case, do the same defaulting here that email.js does.
  287.     if (mailAccount == "")
  288.         mailAccount = parent.parent.globals.document.vars.accountName.value;
  289.  
  290.     x = mailAccount.indexOf("@");
  291.     if (x>=0)    {
  292.         mailID=mailAccount.substring(0,x);
  293.         }
  294.     else    {
  295.         mailID=mailAccount;
  296.         if (parent.parent.globals.document.vars.domainName.value != "")    {
  297.             mailAccount = mailID + "@" + parent.parent.globals.document.vars.domainName.value;
  298.             }
  299.         }
  300.  
  301.     navigator.preference("mail.pop_name",                    mailID);
  302.     navigator.preference("mail.identity.organization",        parent.parent.globals.document.vars.company.value);
  303.     navigator.preference("mail.identity.reply_to",            mailAccount);
  304.     navigator.preference("mail.identity.username",            userName);
  305.     navigator.preference("mail.identity.useremail",            mailAccount);
  306.  
  307.     navigator.preference("mail.remember_password",    false);
  308.     navigator.preference("mail.pop_password",        "");
  309.     var theMailPassword=parent.parent.globals.document.vars.emailPassword.value;
  310.     if (theMailPassword != null && theMailPassword != "")    {
  311.         theMailPassword = parent.parent.globals.document.setupPlugin.EncryptString(theMailPassword);
  312.         if (theMailPassword != null && theMailPassword != "")    {
  313.             navigator.preference("mail.remember_password",    true);
  314.             navigator.preference("mail.pop_password",        theMailPassword);
  315.             }
  316.         }
  317.  
  318.     navigator.preference("editor.author",                    userName);
  319.     navigator.preference("editor.publish_username",            parent.parent.globals.document.vars.accountName.value);
  320.     navigator.preference("editor.publish_location",            parent.parent.globals.document.vars.publishURL.value);
  321.     navigator.preference("editor.publish_browse_location",    parent.parent.globals.document.vars.viewURL.value);
  322.  
  323.     navigator.preference("editor.publish_password",            "");
  324.     navigator.preference("editor.publish_save_password",    false);
  325.     var thePublishPassword=parent.parent.globals.document.vars.publishPassword.value;
  326.     if (thePublishPassword != "")    {
  327.         thePublishPassword = parent.parent.globals.document.setupPlugin.EncryptString(thePublishPassword);
  328.         if (thePublishPassword != null && thePublishPassword != "")    {
  329.             navigator.preference("editor.publish_password",            thePublishPassword);
  330.             navigator.preference("editor.publish_save_password",    true);
  331.             }
  332.         }
  333.  
  334.  
  335.     navigator.preference("browser.mac.use_internet_config", false);
  336.  
  337.  
  338.     var profileDir = parent.parent.globals.document.setupPlugin.GetCurrentProfileDirectory();
  339.     if (profileDir != null && profileDir != "")    {
  340.  
  341.         // write MUC Configuration file
  342.  
  343.         var thePlatform = new String(navigator.userAgent);
  344.         var x=thePlatform.indexOf("(")+1;
  345.         var y=thePlatform.indexOf(";",x+1);
  346.         thePlatform=thePlatform.substring(x,y);
  347.     
  348.         var configFile="";
  349.         if (thePlatform == "Macintosh")    {                // Macintosh support
  350.             configFile = profileDir + "Configuration";
  351.             }
  352.         else    {                                        // Windows support
  353.             configFile = profileDir + "CONFIG.INI";
  354.             }
  355.         
  356.         parent.parent.globals.document.setupPlugin.SetNameValuePair(configFile,"Account", "Account", newProfileName);        // parent.parent.globals.document.vars.providername.value);
  357.         parent.parent.globals.document.setupPlugin.SetNameValuePair(configFile,"Modem", "Modem", parent.parent.globals.document.vars.modem.value);
  358.         parent.parent.globals.document.setupPlugin.SetNameValuePair(configFile,"Location", "Location", "Home");
  359.         
  360.  
  361.         // write out default Bookmark file (if one doesn't exist yet)
  362.         
  363.         var currentBookmarkFilename="";
  364.         if (thePlatform == "Macintosh")    {                // Macintosh support
  365.             currentBookmarkFilename = profileDir + "Bookmarks.html";
  366.             }
  367.         else    {                                        // Windows support
  368.             currentBookmarkFilename = profileDir + "BOOKMARK.HTM";
  369.             }
  370.  
  371.         var bookmarkData = parent.parent.globals.document.setupPlugin.GetNameValuePair(currentBookmarkFilename,null,null);
  372.         if ((bookmarkData == null) || (bookmarkData == "") || (bookmarkData.indexOf("HREF")<0))    {
  373.             var defaultBookmarkFilename = parent.parent.globals.getConfigFolder(self) + "bookmark.htm";
  374.             bookmarkData = parent.parent.globals.document.setupPlugin.GetNameValuePair(defaultBookmarkFilename,null,null);
  375.             if (bookmarkData != null && bookmarkData != "")    {
  376.                 parent.parent.globals.document.setupPlugin.SaveTextToFile(currentBookmarkFilename,bookmarkData,false);
  377.                 }
  378.             }
  379.  
  380.         // copy profile lock file (if one is specified in selected .NCI file)
  381.         
  382.         theProviderFilename = parent.parent.globals.document.vars.providerFilename.value;
  383.         if (theProviderFilename != "")    {
  384.             var configLockFile = parent.parent.globals.document.setupPlugin.GetNameValuePair(theProviderFilename,"Configuration","ConfigurationFileName");
  385.             if (configLockFile != null && configLockFile != "")    {
  386.  
  387.                 // read in .CFG file (from Config folder)
  388.  
  389.                 configLockFile = theFolder + configLockFile;
  390.                 var cfgData = parent.parent.globals.document.setupPlugin.ReadFile(configLockFile);
  391.                 if (cfgData != null && cfgData != "")    {
  392.  
  393.                     // write out PROFILE.CFG file (inside of current profile directory)
  394.  
  395.                     var profileLockfilename = profileDir + "PROFILE.CFG";
  396.                     parent.parent.globals.document.setupPlugin.WriteFile(profileLockfilename,cfgData);
  397.                     }
  398.                 }
  399.             }
  400.         }
  401.  
  402.  
  403.     // rename profile
  404.  
  405.     if (thePlatform == "Macintosh") {
  406.         if (newProfileName.length > 31)    newProfileName=newProfileName.substring(0,31);
  407.         }
  408.  
  409.     parent.parent.globals.document.setupPlugin.SetCurrentProfileName(newProfileName);
  410.     if (parent.parent.globals.document.vars.debugMode.value.toLowerCase() == "yes")    {
  411.         parent.parent.globals.debug("\nSetting profile name: " + newProfileName);
  412.         }
  413. }
  414.  
  415.  
  416.  
  417. function showWindowBars()
  418. {
  419.     netscape.security.PrivilegeManager.enablePrivilege("AccountSetup");
  420.  
  421.     // check browser version
  422.     var theAgent=navigator.userAgent;
  423.     var x=theAgent.indexOf("/");
  424.     if (x>=0)    {
  425.         theVersion=theAgent.substring(x+1,theAgent.length);
  426.         x=theVersion.indexOf(".");
  427.         if (x>0)    {
  428.             theVersion=theVersion.substring(0,x);
  429.             }            
  430.         if (parseInt(theVersion)>=4)    {
  431.             top.statusbar.visible=true;
  432.             top.scrollbars.visible=true;
  433.             top.toolbar.visible=true;
  434.             top.menubar.visible=true;
  435.             top.locationbar.visible=true;
  436.             top.personalbar.visible=true;
  437.             }
  438.         }
  439.     parent.parent.globals.document.setupPlugin.SetKiosk(false);
  440. }
  441.  
  442.  
  443.  
  444. function setLocation(theURL)
  445. {
  446.     netscape.security.PrivilegeManager.enablePrivilege("AccountSetup");
  447.     
  448.     var theWindow=window.open(theURL,"__BLANK","toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes");
  449.  
  450. //    parent.parent.location.replace(theURL);                                        // jumping to the URL
  451.     top.close();
  452. }
  453.  
  454.  
  455.  
  456. function go(msg)
  457. {
  458.     netscape.security.PrivilegeManager.enablePrivilege("AccountSetup");
  459.  
  460.     if (msg=="Connect Now")    {
  461.  
  462.         if (parent.parent.globals.document.vars.editMode.value != "yes")    {
  463.             configureDialer();
  464.  
  465.             if (parent.parent.globals.document.setupPlugin.NeedReboot() == true)    {
  466.                 parent.parent.globals.forceReboot("connect2.htm");                // XXX hardcode in name of next screen???
  467.                 return(false);
  468.                 }
  469.  
  470.             if (parent.parent.globals.document.setupPlugin.DialerConnect() == false)    {
  471.                 window.location.replace("error.htm");                            // XXX hardcode in name of next screen???
  472.                 return(false);
  473.                 }
  474.     
  475. //            showWindowBars();
  476.     
  477.             var theFile = parent.parent.globals.getAcctSetupFilename(self);
  478.             var theURL = parent.parent.globals.GetNameValuePair(theFile,"Existing Acct Mode","RegPodURL");
  479.             if (theURL == null || theURL == "")    {
  480.                 theURL = "http://home.netscape.com/";
  481.                 }
  482.             setTimeout("setLocation(\'" + theURL + "\')", 1000);
  483.             }
  484.         else    {
  485.             alert("You cannot connect while in edit mode.");
  486.             return(false);
  487.             }
  488.         }
  489.     else if (msg == "error.htm")    {
  490.         if (parent.parent.globals.document.vars.editMode.value == "yes")    {    // only do this if editMode is false
  491.                 return (confirm("Since you are in edit mode, would you like to edit the error screen that users will see if the connection fails?"));
  492.                 }
  493.         else    {
  494.             return(false);
  495.             }
  496.         }
  497.     else if ((msg=="Later") && (parent.parent.globals.document.vars.editMode.value != "yes"))    {    
  498.         configureDialer();
  499.         //showWindowBars();
  500.         return(true);
  501.         }
  502.     else if (msg=="Back")    {
  503.         history.back();
  504.         }
  505.     return(false);
  506. }
  507.  
  508.  
  509.  
  510. function checkData()
  511. {
  512.     return(true);
  513. }
  514.  
  515.  
  516.  
  517. function doGo()
  518. {
  519.     netscape.security.PrivilegeManager.enablePrivilege("AccountSetup");
  520.     parent.controls.go("Next");
  521. }
  522.  
  523.  
  524.  
  525. function loadData()
  526. {
  527.     netscape.security.PrivilegeManager.enablePrivilege("AccountSetup");
  528.  
  529.     if (parent.parent.globals.document.vars.tryAgain.value == "yes")    {
  530.         parent.parent.globals.document.vars.tryAgain.value = "no";
  531.         setTimeout("doGo()",1);
  532.         }
  533.  
  534.     if (parent.controls.generateControls)    parent.controls.generateControls();
  535. }
  536.  
  537.  
  538.  
  539. function saveData()
  540. {
  541. }
  542.  
  543.  
  544.  
  545. // end hiding contents from old browsers  -->
  546.