function Sniffer(){
if(window.sniffer!=undefined){
return window.sniffer;
}
this.agent=window.navigator.userAgent;
if(this.agent.match(/MSIE/)){
this.browser="Internet Explorer";
this.servicePack=this.agent.match(/SV1;/)?2:1;
var _1=new RegExp(/MSIE ((?:[0-9]+\.?)+);/);
}else{
if(this.agent.match(/Firefox/)){
this.browser="Firefox";
var _1=new RegExp(/Firefox\/((?:[0-9]+\.?)+)/);
}
}
if(window.document.all!=undefined){
this.behavior="ie";
}else{
if(document.implementation!=undefined){
this.behavior="mozilla";
}
}
if(this.browser!="unknown"){
var _2=_1.exec(this.agent);
this.version=_2[1].replace(/\./,"-");
this.version=this.version.replace(/\./g,"");
this.version=this.version.replace(/\-/g,".");
}
var _3=new Array;
if(this.agent.indexOf("Windows")>-1){
this.os="Windows";
_3["Vista"]="Windows NT 6.0";
_3["Server 2003"]="Windows NT 5.2";
_3["XP"]="Windows NT 5.1";
_3["2000, Service Pack 1"]="Windows NT 5.01";
_3["2000"]="Windows NT 5.0";
_3["NT 4.0"]="Windows NT 4.0";
_3["NT"]="Windows NT";
_3["98"]="Windows 98";
_3["95"]="Windows 95";
_3["Millennium Edition"]="Windows 98; Win 9x 4.90";
for(var _4 in _3){
if(this.agent.indexOf(_3[_4])>-1){
this.os_version=_4;
break;
}
}
}else{
if(this.agent.indexOf("X11")>-1){
var _1=new RegExp(/X11; .; (\w+) (\w+)/);
var _2=_1.exec(this.agent);
this.os=_2[1];
this.os_version=_2[2];
}
}
this.isIE=function(){
return (this.browser=="Internet Explorer");
};
this.isFirefox=function(){
return (this.browser=="Firefox");
};
this.getDOMVersion=function(){
if(!this.isIE()){
return;
}
if(this.domVersion!=undefined){
return this.domVersion;
}
var _5=new Array;
_5[4]="MSXML4.DOMDocument";
_5[3]="MSXML3.DOMDocument";
_5[2]="MSXML2.DOMDocument";
_5[1]="MSXML.DOMDocument";
_5[0]="Microsoft.XmlDom";
for(dom in _5){
try{
new ActiveXObject(_5[dom]);
this.dom=_5[dom];
this.domVersion=dom;
break;
}
catch(e){
}
}
return this.domVersion;
};
}
window.sniffer=new Sniffer;

