
var browser = new getBrowser();

//------------------------------------------------
// Get client's browser
//------------------------------------------------

function getBrowser()
{
    var ua, s, i;

    this.IE    = false;  // Internet Explorer
    this.OP    = false;  // Opera
    this.NS    = false;  // Netscape
    this.version = null;

    ua = navigator.userAgent;

    s = "MSIE";
    if ((i = ua.indexOf(s)) >= 0)
    {
        this.IE = true;
        this.version = parseFloat(ua.substr(i + s.length));
        return;
    }

    s = "Opera";
    if ((i = ua.indexOf(s)) >= 0)
    {
        this.OP = true;
        this.version = parseFloat(ua.substr(i + s.length));
        return;
    }

    s = "Netscape6/";
    if ((i = ua.indexOf(s)) >= 0)
    {
        this.NS = true;
        this.version = parseFloat(ua.substr(i + s.length));
        return;
    }

    s = "Gecko";
    if ((i = ua.indexOf(s)) >= 0)
    {
        this.NS = true;
        this.version = 6.1;
        return;
    }
}
// End function


