home *** CD-ROM | disk | FTP | other *** search
/ Your Business Pak / BusinessPak2.iso / Netscape / CD / as.z / asw.jar / error.js < prev    next >
Text File  |  1998-10-15  |  2KB  |  94 lines

  1. /* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil -*-
  2.  *
  3.  * The contents of this file are subject to the Netscape Public License
  4.  * Version 1.0 (the "NPL"); you may not use this file except in
  5.  * compliance with the NPL.  You may obtain a copy of the NPL at
  6.  * http://www.mozilla.org/NPL/
  7.  *
  8.  * Software distributed under the NPL is distributed on an "AS IS" basis,
  9.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
  10.  * for the specific language governing rights and limitations under the
  11.  * NPL.
  12.  *
  13.  * The Initial Developer of this code under the NPL is Netscape
  14.  * Communications Corporation.  Portions created by Netscape are
  15.  * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
  16.  * Reserved.
  17.  */
  18. <!--  to hide script contents from old browsers
  19.  
  20. function go( msg )
  21. {
  22.     var theFile = parent.parent.globals.getAcctSetupFilename(self);
  23.     var onestepMode = parent.parent.globals.GetNameValuePair(theFile, "Mode Selection", "OneStepMode");
  24.  
  25.     if ( parent.parent.globals.document.vars.editMode.value != "yes" )
  26.     {
  27.         if ( msg == parent.parent.globals.document.vars.path.value )
  28.         {
  29.             parent.parent.globals.document.vars.tryAgain.value = "yes";
  30.             return checkData();
  31.         }
  32.         else if (msg == "1step")
  33.         {
  34.             if (onestepMode == "yes")
  35.             {
  36.                 return checkData();
  37.             }
  38.         }
  39.         else if (msg == "2step")
  40.         {
  41.             if (onestepMode == "no" || onestepMode == "" || onestepMode == null)
  42.             {
  43.                 return checkData();
  44.             }
  45.         }
  46.         return false;
  47.     }
  48.     else
  49.     {
  50.         if ( msg == parent.parent.globals.document.vars.path.value )
  51.             alert( "Sorry, you cannot connect while in using the Account Setup Editor." );
  52.         return false;
  53.     }
  54. }
  55.  
  56. function checkData()
  57. {
  58.     return true;
  59. }
  60.  
  61. function showErrorLayer()
  62. {
  63.     if ( document.layers[ "IAS Mode" ] && document.layers[ "NCI Mode" ] )
  64.     {
  65.         if ( parent.parent.globals.document.vars.path.value == "Existing Path" )
  66.         {
  67.             document.layers[ "IAS Mode" ].visibility = "hide";
  68.             document.layers[ "NCI Mode" ].visibility = "show";
  69.         }
  70.         else
  71.         {
  72.             document.layers[ "IAS Mode" ].visibility = "show";
  73.             document.layers[ "NCI Mode" ].visibility = "hide";
  74.         }
  75.     }
  76.     else
  77.         setTimeout( "showErrorLayer()", 1000 );
  78. }
  79.  
  80. function loadData()
  81. {
  82.     setTimeout( "showErrorLayer()", 1000 );
  83.     if ( parent.controls.generateControls )
  84.         parent.controls.generateControls();
  85. }
  86.  
  87. function saveData()
  88. {
  89. }
  90.  
  91.  
  92.  
  93. // end hiding contents from old browsers  -->
  94.