/*
from ua.js revision 0.200 2001-12-03

scan2.js revision 2002-June-15

Contributor(s): Bob Clary, Netscape Communications, Copyright 2001

Modified by: Sebastien Dartevelle, 2002-June-15 <sebastien@granular-volcano-group.org>

Netscape grants you a royalty free license to use, modify and 
distribute this software provided that this copyright notice 
appears on all copies.  This software is provided "AS IS," 
without a warranty of any kind.
*/

<!--
function xbDetectBrowser()
{
  var oldOnError = window.onerror;
  var element = null;

  window.onerror = null;
  
  // work around bug in xpcdom Mozilla 0.9.1
  window.saveNavigator = window.navigator;

  navigator.OS    = '';
  navigator.version  = parseFloat(navigator.appVersion);
  navigator.org    = '';
  navigator.family  = '';

  var platform;
  if (typeof(window.navigator.platform) != 'undefined')
  {
    platform = window.navigator.platform.toLowerCase();
    if (platform.indexOf('win') != -1)
      navigator.OS = 'win';
    else if (platform.indexOf('mac') != -1)
      navigator.OS = 'mac';
    else if (platform.indexOf('unix') != -1 || platform.indexOf('linux') != -1 || platform.indexOf('sun') != -1)
      navigator.OS = 'nix';
  }

  var i = 0;
  var ua = window.navigator.userAgent.toLowerCase();
  
  if (ua.indexOf('opera') != -1)
  {
    i = ua.indexOf('opera');
    navigator.family  = 'opera';
    navigator.org    = 'opera';
    navigator.version  = parseFloat('0' + ua.substr(i+6), 10);

alert("Opera Browser does not handle DHTML and standard CSS level1" + 
"\nYou will not be able to navigate through this website" +
"\nThis website will not be displayed correctly" +
"\nPlease, use a more standard Browser (see bottom of this page)" +
"\nThanks.");
  }
  else if ((i = ua.indexOf('msie')) != -1)
  {
    navigator.org    = 'microsoft IE';
    navigator.version  = parseFloat('0' + ua.substr(i+5), 10);
    navigator.family = 'ie';    
    if (navigator.version < 4)
      navigator.family = 'ie3';
    else if ( (navigator.version >= 4) && (navigator.version < 5) )
      navigator.family = 'ie4';
    else if ( (navigator.version >= 5) && (navigator.version < 6) )
      navigator.family = 'ie5';
    else if (navigator.version >= 6)
      navigator.family = 'ie6';

    if (navigator.version < 5) {
alert("Your Microsoft IE Browser version " + navigator.version + " is completely outdated!" + 
"\nYou will not be able to navigate through this website" +
"\nThis website will not be displayed correctly" +
"\nPlease, download the latest version of Internet Explorer (see bottom of this page)." +
"\nThanks.");
                               }
  }
  else if (ua.indexOf('gecko') != -1)
  {
    navigator.family = 'gecko';
    var rvStart = navigator.userAgent.indexOf('rv:') +3;
    var rvEnd = navigator.userAgent.indexOf(')', rvStart);
    var rv = navigator.userAgent.substring(rvStart, rvEnd);
    var decIndex = rv.indexOf('.');
    if (decIndex != -1)
    {
      rv = rv.replace(/\./g, '')
//      rv = rv.substring(0, decIndex-1) + '.' + rv.substr(decIndex)
      rv = rv.substring(1, decIndex-1) + '.' + rv.substr(decIndex)
    }
    navigator.version = parseFloat(rv);

    if (ua.indexOf('netscape') != -1)
      navigator.org = 'netscape';
    else if (ua.indexOf('compuserve') != -1)
      navigator.org = 'compuserve';
    else
      navigator.org = 'mozilla';
  }
  else if ((ua.indexOf('mozilla') !=-1) && (ua.indexOf('spoofer')==-1) && (ua.indexOf('compatible') == -1) && (ua.indexOf('opera')==-1)&& (ua.indexOf('webtv')==-1) && (ua.indexOf('hotjava')==-1))
  {
    var is_major = parseFloat(navigator.appVersion);
    
    if (is_major < 4)
      navigator.version = is_major;
    else
    {
      i = ua.lastIndexOf('/')
      navigator.version = parseFloat('0' + ua.substr(i+1), 10);
    }
    navigator.org = 'netscape';
    navigator.family = 'nn' + parseInt(navigator.appVersion);

    if (is_major < 5) {
alert("Your Browser version " + is_major + " is completely outdated!" + 
"\nYou will not be able to navigate through this website" +
"\nThis website will not be displayed correctly" +
"\nPlease, download the latest version of Internet Explorer (see bottom of this page)." +
"\nThanks.");
                               }
  }
  else if ((i = ua.indexOf('aol')) != -1 )
  {
    navigator.org    = 'aol';
    navigator.version  = parseFloat('0' + ua.substr(i+4), 10);
    navigator.family = 'aol';
    if (navigator.version < 5)
      navigator.family = 'aol3/4';
    else if ( (navigator.version >= 5) && (navigator.version < 6) )
      navigator.family = 'aol5';
    else (navigator.version >= 6)
      navigator.family = 'aol6';

    if (navigator.version < 5) {
alert("Your AOL Browser version " + navigator.version + " is completely outdated!" + 
"\nYou will not be able to navigate through this website" +
"\nThis website will not be displayed correctly" +
"\nPlease, download the latest version of Internet Explorer (see bottom of this page)." +
"\nThanks.");
                               }
  }
  else if ((i = ua.indexOf('hotjava')) != -1 )
  {
    navigator.org    = 'sun';
    navigator.version  = parseFloat(navigator.appVersion);
    navigator.family  = 'hotjava';
    if (navigator.version <= 3)
      navigator.family = 'HotJava3';
    else (navigator.version >= 3)
      navigator.family = 'HotJava3_and_up';

    if (navigator.version < 3) {
alert("Your Sun HotJava Browser version " + navigator.version + " is completely outdated!" +
"\nYou will not be able to navigate through this website" +
"\nThis website will not be displayed correctly" +
"\nPlease, download the latest version of Internet Explorer (see bottom of this page)." +
"\nThanks.");
                               }
  }

  window.onerror = oldOnError;
}
xbDetectBrowser();