/*
  # browser_check.js                        Version 2.3
  # Copyright (c) 2000-2003 Luca Borrione   write at tiscali dot it
  # Created 26 June 2000                    Last Modified 11 February 2004
  # _________________
  # COPYRIGHT NOTICE:
  # Copyright (c) 2000-2003 Luca Borrione  All Rights Reserved.
  # Permission granted to use and modify free of charge this script so long as this
  # copyright notice above is maintained, modifications are documented,
  # and credit is given for any use of the script.
  # By using this code you agree to indemnify Luca Borrione from any liability that
  # might arise from its use.
  # Selling the code contained in this script without prior written consent is
  # expressly forbidden.
  # Obtain permission before redistributing this script over the Internet or
  # in any other medium.
  # In all cases copyright and header must remain intact.
	# ______
	# NOTES:
	# To edit this code correctly please check the following options in your editor:
	# - TAB Stop: 2
	# - Block Indent Step Size: 2
  # ____________
  # SCRIPT CODE:
*/


function browserCheck() {
  this.js = 0;
  // convert all characters to lowercase to simplify testing
  var agent   = navigator.userAgent.toLowerCase();
  /*
  this.agent  = navigator.userAgent;
  var version = parseFloat(navigator.appVersion);
  this.appVersion = navigator.appVersion;
  */
  
  /*
    # ___________
    # GET VENDOR:
  */
  var vendor = (agent.indexOf("opera")   != -1) ? "opera" :
               (agent.indexOf("msie")    != -1) ? "ie"    :
               (agent.indexOf('mozilla') != -1) ? "nn"    : null;
                                
  if( !vendor ){ return; }
  eval( "this."+ vendor +" = true;" );
  
  // Inizio indecisione sull'utilita'
  if (navigator.vendor) {
    this.vendor    = navigator.vendor;
  }
  if (navigator.vendorSub) {
    this.vendorSub = navigator.vendorSub;
  }
  // Fine indecisione sull'utilita'
  
    
  /*
    # _____________
    # GET VERSION:
  */
  
  function _get_ie_minor() {
    var split = agent.split(" ");
	  for( var i=0; i<split.length; i++ )
	    if( split[i]=="msie" )
        return( parseFloat(split[i+1]) );
  }
  
  function _get_nn_minor() {
    // if( navigator.vendorSub )
    if (navigator.vendorSub && navigator.vendor != 'Phoenix'
		                        && navigator.vendor != 'Firebird'
                            && navigator.vendor != 'Firefox'
		                        && navigator.vendor != 'Camino') {
      return( parseFloat(navigator.vendorSub) );
    } else {
      return( parseFloat(navigator.appVersion) );
    }
  }
  
  function _get_opera_minor() { 
    if(agent.indexOf("opera/") != -1) {
      return( parseFloat(navigator.appVersion) );
    } else {
      var split = agent.split(" ");
  	  for( var i=0; i<split.length; i++ )
  	    if( split[i]=="opera" )
          return( parseFloat(split[i+1]) );
    }
  }
  
  eval( "this._get_"+ vendor +"_minor    = _get_"+ vendor +"_minor;" );
  eval( "this.minor = this._get_"+ vendor +"_minor();" );
  
  /*
  this.as = [];
  if(agent.indexOf("msie") != -1)
  {
    this.as.vendor = "ie";
    this.as.minor  = this._get_ie_minor();
  }
  else if(agent.indexOf("mozilla") != -1)
  {
    this.as.vendor = "nn";
    this.as.minor  = this._get_nn_minor();
  }
  this.as.major  = parseInt(this.as.minor);
  */
  
  this.major = parseInt(this.minor);
  eval( "this."+ vendor +" = "+ this.major );

  var version = 4;  
  while (version) {
    eval( "if(this.major >= "+ version +"){"+
            "if( this.major == "+ version +")"+
              "this."+ vendor + version +"   = this.major;"+
            "this."+ vendor + version +"up = this.major;"+
            "version++;"+
          "} "+
          "else{ version = false; }" );
  }
  
  eval( "delete this._get_"+ vendor +"_minor" );
  
  /*
    # _____________
    # GET PLATFORM:
  */
  
  if (agent.indexOf("win")!=-1 || agent.indexOf("16bit")!=-1) {
    var platform = (agent.indexOf("windows nt 5.1")!=-1 || agent.indexOf("windows xp")!=-1) ? "winXP" :
                   (agent.indexOf("windows nt 5.0")!=-1)                                    ? "win2K" :
                   (agent.indexOf("win 9x 4.90")!=-1)                                       ? "winME" :
                   (agent.indexOf("winnt")!=-1 || agent.indexOf("windows nt")!=-1)          ? "winNT" :
                   (agent.indexOf("win98")!=-1 || agent.indexOf("windows 98")!=-1)          ? "win98" :
                   (agent.indexOf("win95")!=-1 || agent.indexOf("windows 95")!=-1)          ? "win95" : null;
    this.win = platform;
  } else if (agent.indexOf("mac")!=-1) {
    var platform = (agent.indexOf("68k")!=-1 || agent.indexOf("68000")!=-1)   ? "mac68K" :
                   (agent.indexOf("ppc")!=-1 || agent.indexOf("powerpc")!=-1) ? "macPPC" : null;
    this.mac = platform;
  }
  
  if (platform)
    eval( "this."+ platform +" = true;" );
}

is = new browserCheck();

  /*
    # _______________
    # GET JS VERSION:
  */
   
var js = 0.0;

for( var i=0; i<=6; i++ )
  document.write( "<script language=\"JavaScript1."+i+"\">js=1."+i+"<\/script>" );

document.write( ""+
"<script language=\"JavaScript\">"+
  "is.js = "+ js+
"<\/script>" );