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