/*

    Facility:
        Celeritas Technologies General (ct)
            Copyright 1999 Celeritas Technologies, LLC

    Title:
        ctBrowserSensing.js

    Abstract:
        This module contains a routine that catalogs the browser type and various
        other browser specific attributes.

    Author:
        Celeritas Technologies
        
    Creation Date:
        28-Nov-1999
        
    Modification History:
        08-Mar-2002 (djc)
            Fixed issue with Netscape Version not being determined correctly.

*/

    // Set up boolian variables to record the browser type.
var isNS4 = 0;
var isIE4 = 0;
var isNew = 0;
var is5plus = 0;

is = new BrowserCheck();

function BrowserCheck() {

    /* Determines the browser name and browser version */
    var brow = navigator.appName;

	if ( brow == "Netscape" ) {
        this.brow = "NS";
	} else if ( brow == "Microsoft Internet Explorer" ) {
        this.brow = "IE";
	} else {
        this.brow = brow;
	}

        // Assign variable depending on the browser
	this.version = navigator.appVersion;
	this.ver = parseInt(this.version);
	this.ns  = (this.brow == "NS" && this.ver >= 4);
	this.ns4 = (this.brow == "NS" && this.ver == 4);
	this.ns5 = (this.brow == "NS" && this.ver == 5);
	this.ns6 = (this.brow == "NS" && this.ver == 6);
	this.ie  = (this.brow == "IE" && this.ver >= 4);
	this.ie4 = (this.version.indexOf('MSIE 4') > 0);
	this.ie5 = (this.version.indexOf('MSIE 5') > 0);
	this.ie6 = (this.version.indexOf('MSIE 6') > 0);
	this.is5plus = this.ie5 || this.ie6 || (this.ns && (this.ver > 4));

	this.min = (this.ns || this.ie);
    
        // Set variables used by other applications using a different convention.
	isIE    = this.ie;
	isNS    = this.ns;
    isNS4   = this.ns4;
    isIE4   = this.ie4;
	is5plus = this.is5plus;
    isNew   = is5plus;
	
}


