
self.document.write("You seem to be running ");

agent = navigator.userAgent;

 	if (agent.lastIndexOf("95")!=-1)
  	{
   	self.document.write(' Windows 95');
  	}
	else if (agent.lastIndexOf("98")!=-1)
  	{
   	self.document.write(' Windows 98');
	}
	else if (agent.lastIndexOf("NT 5.0")!=-1)
  	{
   	self.document.write(' Windows 2000');
	}
	else if (agent.lastIndexOf("NT 5.1")!=-1)
  	{
   	self.document.write(' Windows XP');
  	}
	else if (agent.lastIndexOf("NT 5.2")!=-1)
  	{
   	self.document.write(' 2003 Server');
  	}
	else if (agent.lastIndexOf("NT 6.0")!=-1)
  	{
   	self.document.write(' Vista');
  	}
	else if (agent.lastIndexOf("NT")!=-1)
  	{
   	self.document.write(' Windows NT');
	}
  	else if (agent.lastIndexOf("Win16")!=-1)
  	{
   	self.document.write(' Windows 3.1');
  	}
  	else if (agent.lastIndexOf("Mac")!=-1)
  	{
   	self.document.write(' Macintosh');
  	}
  	else if (agent.lastIndexOf("Unix")!=-1)
  	{
   	self.document.write(' Unix');
  	}
	else if (agent.lastIndexOf("SunOS")!=-1)
  	{
   	self.document.write(' SunOS');
  	}
	else if (agent.lastIndexOf("Solaris")!=-1)
  	{
   	self.document.write(' Solaris');
  	}
  	else if (agent.lastIndexOf("Linux")!=-1)
  	{
   	self.document.write(' Linux');
  	}
	else
	{
	self.document.write(' Unknown OS');
	}

var ua = navigator.userAgent.toLowerCase();
var os,browser,version,data;

if (detect('konqueror')) browser = "Konqueror";
else if (detect('chrome')) browser="Chrome";
else if (detect('safari')) browser="Safari";
else if (detect('omniweb')) browser = "OmniWeb";
else if (detect('firefox')) browser = "Firefox";
else if (detect('opera')) browser = "Opera";
else if (detect('webtv')) browser = "WebTV";
else if (detect('icab')) browser = "iCab";
else if (detect('msie')) browser = "Internet Explorer";
else if (detect('netscape6')) {
	browser = "Netscape Navigator"; 
	if (detect('netscape')) version = ua.charAt(stringposition + 7);
	}
else if (detect('netscape')) {
	browser = "Netscape Navigator"; 
	if (detect('netscape')) version = ua.charAt(stringposition + 8);
	}
else if (detect('mozilla')) {
	browser = "Mozilla";
	if (detect('rv:')) version = ua.charAt(stringposition + 2)+ua.charAt(stringposition + 3)+ua.charAt(stringposition + 4);
	}
else if (!detect('compatible')) {browser = "Netscape Navigator"; version = ua.charAt(8);}
else browser = "an unknown browser";

if (!version) version = ua.charAt(stringposition + data.length) + 
	ua.charAt(stringposition + data.length + 1) + ua.charAt(stringposition + data.length + 2);

self.document.write(" with "+browser+" "+version+". ");

function detect(text) {
   stringposition = ua.indexOf(text) + 1;
   data = text;
   return stringposition;
   }





