//-------------------------------------------------------------------------------------
//BROWSER CHECK
//version:2.0
//author :duncan ion
//company:interactive1.com
//date   :06/02/01
//required:nothing

//BROWSER CHECK 
function i1_BrowserCheck(){
	this.ver   = navigator.appVersion.toLowerCase();
	this.agent = navigator.userAgent.toLowerCase();
	this.dom   = document.getElementById?1:0;
	
    this.op    = window.opera?1:0;
    this.op5   = (this.agent.indexOf("opera 5")>-1)||(this.agent.indexOf("opera/5")>-1)?1:0;
   
    this.ie5   = (this.ver.indexOf("msie 5")>-1 && this.dom && !this.op5)?1:0;
	this.ie6   = (this.ver.indexOf("msie 6")>-1 && this.dom && !this.op5)?1:0;
	this.ie4   = (document.all && !this.dom)?1:0;
	this.ie    = (this.ie4||this.ie5||this.ie6)?1:0;
	
	this.win   = (this.agent.indexOf("win")>-1)?1:0;
	this.mac   = (this.agent.indexOf("mac")>-1)?1:0;
	this.linux = (this.agent.indexOf("linux")>-1)?1:0;
	
	this.ns6   = (this.agent.indexOf("netscape6/6")>-1)||(this.agent.indexOf("netscape 6")>-1)?1:0;
	this.ns7   = (this.agent.indexOf("netscape/7")>-1) ||(this.agent.indexOf("netscape 7")>-1)?1:0;
	this.ns4   = (document.layers && !this.dom)?1:0;
	this.ns    = (this.ns4||this.ns6||this.ns7)?1:0;
	
	this.comp  = (this.ns||this.ie);
		
	return this;
}

i1_BrowserCheck.prototype.details = function()
{
	var str  = '';
	    str += 'this.ver= '     +this.ver;
	    str += '\nthis.agent= ' +this.agent;
	    str += '\nthis.dom= '   +this.dom;
	    str += '\nthis.op= '    +this.op;
	    str += '\nthis.op5= '   +this.op5;
	    str += '\nthis.ie5= '   +this.ie5;
	    str += '\nthis.ie6= '   +this.ie6;
	    str += '\nthis.ie4= '   +this.ie4;
	    str += '\nthis.ie= '    +this.ie;
	    str += '\nthis.mac= '   +this.mac;
		str += '\nthis.linux '  +this.linux;
		str += '\nthis.ns4= '   +this.ns4;
	    str += '\nthis.ns6= '   +this.ns6;
	    str += '\nthis.ns7= '   +this.ns7;
	    str += '\nthis.ns= '    +this.ns;
	    alert(str);
}

//CREATE BROWSER CHECK OBJECT
var is = new i1_BrowserCheck();

//alert(is)
