var browser = null; function Browser() { var ua, s; this.isFF = false; this.isIE = false; this.isOP = false; this.isNS = false; this.version = null; ua = navigator.userAgent; s="Firefox"; if(navigator.userAgent.indexOf(s)!=-1)
{ this.isFF = true; var versionindex=ua.indexOf(s)+ s.length; this.version= parseFloat(ua.substr(versionindex))
return;}
s="MSIE"; if(navigator.userAgent.indexOf(s)!=-1)
{ this.isIE = true; var versionindex=ua.indexOf(s)+ s.length; this.version= parseFloat(ua.substr(versionindex))
return;}
s="Opera"; if(navigator.userAgent.indexOf(s)!=-1)
{ this.isOP = true; var versionindex=ua.indexOf(s)+ s.length; this.version= parseFloat(ua.substr(versionindex))
return;}
s="Netscape/"; if(navigator.userAgent.indexOf(s)!=-1)
{ this.isNS = true; var versionindex=ua.indexOf(s)+ s.length; this.version= parseFloat(ua.substr(versionindex))
return;}
s="Gecko"; if(navigator.userAgent.indexOf(s)!=-1)
{ this.isNS = true; this.version= 6.1; return;}
}
browser = new Browser(); 