// The listed functions helps to get the user system information

function isUserAgent() {

// Read browser type and browser version. Also detects Mac user.

 var agent = navigator.userAgent.toLowerCase();
 this.major = parseInt(navigator.appVersion);
 this.minor = parseFloat(navigator.appVersion);
 this.ns = ((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.ns4 = (this.ns && (this.major == 4));
 this.ns5 = (this.ns && (this.major > 4));
 this.ns6 = (this.ns && (agent.indexOf('netscape6')!=-1) );
 this.ns7 = (this.ns && (agent.indexOf('netscape/7')!=-1) );
 this.ns7pr = (this.ns && (agent.indexOf('netscape/7.0b1')!=-1) );
 this.ns71 = (this.ns && (agent.indexOf('netscape/7.1')!=-1) );
 this.ns72 = (this.ns && (agent.indexOf('netscape/7.2')!=-1) );
 this.ie = (agent.indexOf("msie") != -1);
 this.ie3 = (this.ie && (this.major == 2));
 this.ie4 = (this.ie && (this.major >= 4));
 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 && (agent.indexOf("msie 6.0")!=-1));
 this.op3 = (agent.indexOf("opera") != -1);
 this.pc  = (agent.indexOf("win") != -1);
 this.mac = (agent.indexOf("mac")!=-1); // Mac detect
 this.macie517 = (this.mac && this.ie && (agent.indexOf("5.17") != -1))
 this.client = ( (navigator.userAgent.indexOf('AOL')!=-1) || (navigator.userAgent.indexOf('CS 2000')!=-1) )? 1 : 0;
 this.moz = ( this.ns && (agent.indexOf("netscape/") == -1) );

}

function resolution()
{
	// Read client screen resolution
	
	var w = screen.width;		
	if (w < 800) this.less = true;
	if (w == 800) this.medium = true;
	if (w > 800) this.high = true;
}


/*
		var agent = navigator.userAgent.toLowerCase();
		document.write("Resolution Width " + screen.width + "<br>");
		document.writeln(navigator.userAgent.toLowerCase() + "<br>");
		document.writeln("Major Ver" + is.major+ "<br>");
		document.writeln("Minor " + is.Minor+ "<br>");
		document.writeln("ns " + is.ns+ "<br>");
		document.writeln("ns2 " + is.ns2+ "<br>");
		document.writeln("ns3 " + is.ns3+ "<br>");
		document.writeln("ns4 " + is.ns4+ "<br>");
		document.writeln("ns5 " + is.ns5 + "<br>");
		document.writeln("ns6 " + is.ns6 + "<br>");
		document.writeln("ns7 " + is.ns7 + "<br>");
		document.writeln("ns7pr " + is.ns7pr + "<br>");
		document.writeln("ns71 " + is.ns71 + "<br>");
		document.writeln("ns72 " + is.ns72 + "<br>");
		document.writeln("ie " + is.ie + "<br>");
		document.writeln("ie3 " + is.ie3 + "<br>");
		document.writeln("ie4 " + is.ie4 + "<br>");
		document.writeln("ie5 " + is.ie5 + "<br>");
		document.writeln("ie55 " + is.ie55 + "<br>");
		document.writeln("ie6 " + is.ie6 + "<br>");
		document.writeln("op3 " + is.op3 + "<br>");
		document.writeln("pc " + is.pc + "<br>");
		document.writeln("mac " + is.mac + "<br>");
		document.writeln("macIEVer " + is.macie517 + "<br>");
		document.writeln("client " + is.client + "<br>");
		document.writeln("moz " + is.moz );
*/
