function Browser()
{
	var userAgent;userAgent=navigator.userAgent.toUpperCase();
	var appName;appName=navigator.appName.toUpperCase();
	try
	{
		if (appName.indexOf("NETSCAPE")>-1) this.Name="NS";
		else if (appName.indexOf("INTERNET EXPLORER")>-1) this.Name="IE";
		else if (appName.indexOf("WEBTV")>-1) this.Name="WebTV";
		else if (appName.indexOf("GOOGLEBOT")>-1) this.Name="GOOGLEBOT";
		else if (appName.indexOf("SPIDER")>-1) this.Name="SPIDER";
		else if (appName.indexOf("CRAWL")>-1) this.Name="CRAWL";
		else if (appName.indexOf("BOT")>-1) this.Name="BOT";
		else if (appName.indexOf("NAVIGATOR")>-1) this.Name="NS";
		else if (userAgent.indexOf("MSIE")>-1) this.Name="IE";
		else if (userAgent.indexOf("NETSCAPE")>-1) this.Name="NS";
		else if (userAgent.indexOf("WEBTV")>-1) this.Name="WebTV";
		else if (userAgent.indexOf("GOOGLEBOT")>-1) this.Name="GOOGLEBOT";
		else if (userAgent.indexOf("SPIDER")>-1) this.Name="SPIDER";
		else if (userAgent.indexOf("CRAWL")>-1) this.Name="CRAWL";
		else if (userAgent.indexOf("BOT")>-1) this.Name="BOT";
		else if (userAgent.indexOf("NAVIGATOR")>-1) this.Name="NS";
		else 
		{
			if (appName.length!=0) this.Name=appName;
			else this.Name="";
		}
		if (this.Name=="IE") 
		{
			
			if (userAgent.indexOf("MSIE 7")>-1) this.Version=7;
			else if (userAgent.indexOf("MSIE 6")>-1) this.Version=6;
			else if (userAgent.indexOf("MSIE 5.5")>-1) this.Version=5.5;
			else if (userAgent.indexOf("MSIE 5.01")>-1) this.Version=5.01;
			else if (userAgent.indexOf("MSIE 5")>-1) this.Version=5;
			else if (userAgent.indexOf("MSIE 4.5")>-1) this.Version=4.5;
			else if (userAgent.indexOf("MSIE 4.01")>-1) this.Version=4.01;
			else if (userAgent.indexOf("MSIE 4")>-1) this.Version=4;
			else if (userAgent.indexOf("MSIE 3")>-1) this.Version=3;
			else this.Version="";
		} 
		else this.Version=parseFloat(navigator.appVersion);	

		if (userAgent.indexOf("WINDOWS")>-1 || userAgent.indexOf("WIN95")>-1 || userAgent.indexOf("WIN98")>-1 || userAgent.indexOf("WIN 95")>-1 || userAgent.indexOf("WIN 98")>-1) this.OS="Windows";
		else if(userAgent.indexOf("WINNT")>-1 || userAgent.indexOf("WIN NT")>-1 || userAgent.indexOf("WINDOWS NT")>-1) this.OS="Windows NT";
		else if(userAgent.indexOf("MACINTOSH")>-1) this.OS="Macintosh";
		else if(userAgent.indexOf("LINUX")>-1) this.OS="Linux";
		else if(userAgent.indexOf("UNIX")>-1) this.OS="Unix";
		else this.OS="";

		if (userAgent.indexOf("WINDOWS 95")>-1 || userAgent.indexOf("WIN 95")>-1 || userAgent.indexOf("WIN95")>-1) this.OSVersion=95;
		else if (userAgent.indexOf("WINDOWS 98")>-1 || userAgent.indexOf("WIN 98")>-1 || userAgent.indexOf("WIN98")>-1) this.OSVersion=98;		
		else if (userAgent.indexOf("WINDOWS NT 4")>-1 || userAgent.indexOf("WINNT 4")>-1 || userAgent.indexOf("WIN NT 4")>-1 || userAgent.indexOf("NT 4")>-1) this.OSVersion=4;
		else if (userAgent.indexOf("WINDOWS NT 5")>-1 || userAgent.indexOf("WINNT 5")>-1 || userAgent.indexOf("WIN NT 5")>-1 || userAgent.indexOf("NT 5")>-1) this.OSVersion=5;
		else if (userAgent.indexOf("WIN32")>-1) {this.OSVersion=32;}
		else this.OSVersion="";
		this.UserAgent=userAgent;
	}
	catch(e)
	{
		alert('An Error occurred: ' + e.message + '\nLocation: Browser');
	}
}
var Browser=new Browser();