home *** CD-ROM | disk | FTP | other *** search
/ Your Business Pak / BusinessPak2.iso / Netscape / CD / as.z / asw.jar / ok.js < prev    next >
Text File  |  1998-10-15  |  2KB  |  90 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. var savedFlag = false;
  21.  
  22. function go( msg )
  23. {
  24.     netscape.security.PrivilegeManager.enablePrivilege( "AccountSetup" );
  25.  
  26.     if (parent.parent.globals.document.vars.editMode.value == "yes")
  27.         return true;
  28.     else
  29.     {
  30.         if ( msg=="Internet" )
  31.         {
  32.             if ( parent.parent.globals.document.setupPlugin.DialerConnect() == false )
  33.                 return false;
  34.     
  35.             // check browser version
  36.             var theAgent=navigator.userAgent;
  37.             var x=theAgent.indexOf("/");
  38.             if (x>=0)    {
  39.                 theAgent=theAgent.substring(x+1,theAgent.length);
  40.                 x=theAgent.indexOf(".");
  41.                 if (x>0)    {
  42.                     theAgent=theAgent.substring(0,x);
  43.                     }            
  44.                 if (parseInt(theAgent)>=4)    {
  45.                 
  46.                     // Navigator 4.x specific features
  47.                 
  48.                     top.toolbar=true;
  49.                     top.menubar=true;
  50.                     top.locationbar=true;
  51.                     top.directory=true;
  52.                     top.statusbar=true;
  53.                     top.scrollbars=true;
  54.                     }
  55.                 }
  56.     
  57.             var theURL = parent.parent.globals.findVariable("HOME_URL");
  58.             if (theURL == "" || theURL ==null)    {
  59.                 theURL = "http://home.netscape.com/";
  60.                 }
  61.             parent.parent.location.replace(theURL);            // jumping to the URL
  62.             }
  63.         return(checkData());
  64.         }
  65. }
  66.  
  67. function checkData()
  68. {
  69.     return true;
  70. }
  71.  
  72. function loadData()
  73. {
  74.     if ( parent.controls.generateControls )
  75.         parent.controls.generateControls();
  76.     if ( parent.parent.globals.document.vars.editMode.value != "yes" )
  77.         saveAccountInfo( false );
  78. }
  79.  
  80. function saveData()
  81. {
  82. }
  83.  
  84. function saveAccountInfo( promptFlag )
  85. {
  86.     savedFlag = parent.parent.globals.saveAccountInfo( promptFlag );
  87. }
  88.  
  89. // end hiding contents from old browsers  -->
  90.