is={
    name : navigator.appName.toLowerCase(),
    ua   : navigator.userAgent.toLowerCase(),
    ver  : navigator.appVersion,
    setBrowser : function() {
		// platform type (name)
        this.win=Boolean(this.ua.indexOf('win')>0);
        this.mac=Boolean(this.ua.indexOf('mac')>0);
        this.other=Boolean(!this.win && !this.mac);
        this.v=parseInt(this.ver);
        // browser type (abbr name)
        if (this.name=='netscape') this.ns=true;
        if (this.ns) {
            if (this.ua.indexOf('netscape6')>0) this.ns6=true;
            if (this.v==4) this.ns4=true;
        }
        if (this.ua.indexOf('gecko')>0 && !this.ns4) {
            this.gecko=true;
            if (!this.ns) this.moz=true;
        } else if (!this.ns4) this.ie=true;
        
        // browser type & version (name + ver)
        if (this.ie) {
            if (this.ver.indexOf('MSIE 4')>0) this.ie4=true, this.v=4;
            else if (this.ver.indexOf('MSIE 5')>0) this.ie5=true, this.v=5;
            else if (this.ver.indexOf('MSIE 5.5')>0) this.ie55=true, this.v=5.5;
            else if (this.ver.indexOf('MSIE 6')>0) this.ie6=true, this.v=6;
            this.mac_ie4=(this.mac && this.ie4)
            this.mac_ie5=(this.mac && this.ie5)
            this.mac_ie6=(this.mac && this.ie6)
            this.win_ie4=(this.win && this.ie4)
            this.win_ie5=(this.win && this.ie5)
            this.win_ie6=(this.win && this.ie6)
        }
		if (!this.mac_ie4) this.dom=Boolean(document.createElement|| document.appendChild || document.getElementsByTagName);
    }
}
is.setBrowser();