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