home *** CD-ROM | disk | FTP | other *** search
/ Your Business Pak / BusinessPak2.iso / Netscape / CD / as.z / asw.jar / okreboot.js < prev    next >
Text File  |  1998-10-15  |  2KB  |  75 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.     if ( parent.parent.globals.document.vars.editMode.value == "yes" )
  23.         return true;
  24.     else
  25.         return checkData();
  26. }
  27.  
  28. function checkData()
  29. {
  30.     // check browser version
  31.     var theAgent=navigator.userAgent;
  32.     var x=theAgent.indexOf("/");
  33.     if (x>=0)    {
  34.         theAgent=theAgent.substring(x+1,theAgent.length);
  35.         x=theAgent.indexOf(".");
  36.         if (x>0)    {
  37.             theAgent=theAgent.substring(0,x);
  38.             }            
  39.         if (parseInt(theAgent)>=4)    {
  40.         
  41.             // Navigator 4.x specific features
  42.         
  43.             top.toolbar=true;
  44.             top.menubar=true;
  45.             top.locationbar=true;
  46.             top.directory=true;
  47.             top.statusbar=true;
  48.             top.scrollbars=true;
  49.             }
  50.         }
  51.  
  52.     return(true);
  53. }
  54.  
  55. function loadData()
  56. {
  57.     if ( parent.controls.generateControls )
  58.         parent.controls.generateControls();
  59.     if ( parent.parent.globals.document.vars.editMode.value != "yes" )
  60.         saveAccountInfo( false );
  61. }
  62.  
  63. function saveData()
  64. {
  65. }
  66.  
  67. var savedFlag = false;
  68.  
  69. function saveAccountInfo( promptFlag )
  70. {
  71.     savedFlag = parent.parent.globals.saveAccountInfo( promptFlag );
  72. }
  73.  
  74. // end hiding contents from old browsers  -->
  75.