function Is() {
 agent = navigator.userAgent.toLowerCase();
 this.major = parseInt(navigator.appVersion);
 this.minor = parseFloat(navigator.appVersion);
 this.op   = (agent.indexOf("opera") != -1);
 this.ns    = ((!this.op) && (agent.indexOf('mozilla')!=-1) && ((agent.indexOf('spoofer')==-1) && (agent.indexOf('compatible') == -1)));
 this.ns2   = (this.ns && (this.major == 2));
 this.ns3   = (this.ns && (this.major == 3));
 this.ns4b  = (this.ns && (this.major == 4) && (this.minor <= 4.03));
 this.ns4   = (this.ns && (this.major >= 4));
 this.ns6   = (this.ns && (this.major >= 5));    
 this.ie    = (agent.indexOf("msie") != -1 && (!this.op));
 this.ie3   = (this.ie && (this.major == 2));
 this.ie4   = ((this.ie && (this.major >= 4)) || this.op);
 this.ie5   = (this.ie && (this.major >= 4) && (agent.indexOf("msie 5.0") != -1));
 this.ie55  = (this.ie && (this.major >= 4) && (agent.indexOf("msie 5.5") != -1)); 
 this.ie6  = (this.ie && (this.major >= 4) && (agent.indexOf("msie 6") != -1)); 
 this.dom2 = (this.ns6 || this.ie6 || this.ie5 || this.ie55);    
 this.win   = (agent.indexOf("win")!=-1);
 this.mac   = (agent.indexOf("mac")!=-1);
 this.unix  = (agent.indexOf("x11")!=-1);
}

is = new Is();
browser = "";
OS = "";

if(is.op) browser = "Opera Version: " + navigator.userAgent; 
if(is.ns) browser = "Netscape compatible";
if(is.ns2) browser = "Netscape Version 2"; 
if(is.ns3) browser = "Netscape Version 3"; 
if(is.ns4b) browser = "Netscape Version 4b"; 
if(is.ns4) browser = "Netscape Version 4"; 
if(is.ns6) browser = "Netscape Version 6"; 
if(is.ie) browser = "Internet Explorer Version 2"; 
if(is.ie3) browser = "Internet Explorer Version 3"; 
if(is.ie4) browser = "Internet Explorer Version 4"; 
if(is.ie5) browser = "Internet Explorer Version 5"; 
if(is.ie55) browser = "Internet Explorer Version 5.5"; 
if(is.ie6) browser = "Internet Explorer Version 6"; 

if(is.win) OS = "Windows";
else if(is.mac) OS = "Mac OS";
else if(is.unix) OS = "Unix";
 
function onerror() {
 document.location.href = "javascript:";
}