2
provides most commonly needed browser checking variables
5
// Copyright (C) 1999 Dan Steinman
6
// Distributed under the terms of the GNU Library General Public License
7
// Available at http://www.dansteinman.com/dynapi/
9
function BrowserCheck() {
10
var b = navigator.appName
11
if (b=="Netscape") this.b = "ns"
12
else if (b=="Microsoft Internet Explorer") this.b = "ie"
13
else if (b=="Opera") this.b = "op"
15
this.v = parseInt(navigator.appVersion)
16
this.ns = (this.b=="ns" && this.v>=4)
17
this.ns4 = (this.b=="ns" && this.v==4)
18
this.ns5 = (this.b=="ns" && this.v==5)
19
this.ie = (this.b=="ie" && this.v>=4)
20
this.op = (this.b=="op" && this.v>=7)
21
this.ie4 = (navigator.userAgent.indexOf('MSIE 4')>0)
22
this.ie5 = (navigator.userAgent.indexOf('MSIE 5')>0)
23
this.ie55 = (navigator.userAgent.indexOf('MSIE 5.5')>0)
28
this.mac = (navigator.userAgent.indexOf('Mac')>0);
29
if (this.ie5) this.v = 5
30
this.min = (this.ns||this.ie)
33
// automatically create the "is" object
34
is = new BrowserCheck()