// Copyright (C) 2003 Mike Mannakee.  All rights reserved.


useragent = navigator.userAgent;
var os = '';
var indx, indx2 = 0;

indx = useragent.indexOf('Linux');
if (indx > -1)
os = "Linux";
indx = useragent.indexOf('Mac OS X');
if (indx > -1)
os = "Mac OS X";
indx = useragent.indexOf('Mac_PowerPC');
indx2 = useragent.indexOf('PPC');
if (indx > -1 || indx2 > -1)
os = "Mac Power PC";
indx = useragent.indexOf('Sun OS');
indx2 = useragent.indexOf('SunOS');
if (indx > -1 || indx2 > -1)
os = "Sun OS";
indx = useragent.indexOf('HP-UX');
if (indx > -1)
os = "HP-UX";
indx = useragent.indexOf('Windows 95');
indx2 = useragent.indexOf('Win95');
if (indx > -1 || indx2 > -1)
os = "Windows 95";
indx = useragent.indexOf('Windows 98');
indx2 = useragent.indexOf('Win98');
if (indx > -1 || indx2 > -1)
os = "Windows 98";
indx = useragent.indexOf('Windows ME');
if (indx > -1)
os = "Windows ME";
indx = useragent.indexOf('Windows NT 4.0');
indx2 = useragent.indexOf('WinNT');
if (indx > -1 || indx2 > -1)
os = "Windows NT";
indx = useragent.indexOf('Windows NT 5.0');
indx2 = useragent.indexOf('Windows 2000');
if (indx > -1 || indx2 > -1)
os = "Windows 2000";
indx = useragent.indexOf('XP');
indx = useragent.indexOf('Windows NT 5.1');
if (indx > -1 || indx2 > -1)
os = "Windows XP";


if(navigator.product == 'Gecko') // It's a Netscape Geckowser
{                                                                 
	var Name = navigator.vendor;
	var Ver = navigator.vendorSub;
	if(Name == 'Netscape6')
		Name = 'Netscape';
		
	if (!Name)
	{
		var rv = navigator.userAgent.match(/rv:([\w.]+)/)[0];
		rv = rv.substr(3);
		Name = 'Mozilla';
		Ver = rv;
}																								}
else 
{	
	// Get Name
	// Set to Opera, Safari, etc by hand, as needed
	var Name = (useragent.indexOf('Opera') > -1) ? 'Opera' : navigator.appName;
	
	if(Name != 'Opera')
	Name = (useragent.indexOf('Safari') > -1) ? 'Safari' : navigator.appName;
	
	if(Name != 'Opera' && Name != 'Safari')
	Name = (useragent.indexOf('WebTV', 0) > -1) ? 'Web TV' : navigator.appName;
	
	
	// Get Version
	var WebTVpos = useragent.indexOf('WebTV');
	if (WebTVpos > -1)
	{
		var Ver = parseFloat(useragent.substr(WebTVpos + 6));
	}
	var msiePos = useragent.indexOf('MSIE');
	if (msiePos > -1)
	{
		var Ver = "";
		if(useragent.indexOf('MSIE 4') != -1) Ver = '4.0';
		else
		if(useragent.indexOf('MSIE 5.0') != -1) Ver = '5.0';
		else
		if(useragent.indexOf('MSIE 5.1') != -1) Ver = '5.1';
		else
		if(useragent.indexOf('MSIE 5.5') != -1) Ver = '5.5';
		else
		if(useragent.indexOf('MSIE 6.0') != -1) Ver = '6.0';
		
	}
	var pos = useragent.indexOf('Opera');
	if (pos > -1)
	{
		var Ver = useragent.substring(pos + 6);
		var pos = Ver.indexOf(' ');
		Ver = Ver.substring(0, pos);
	}
	var pos = useragent.indexOf('Safari');
	if (pos > -1)
	{
		var Ver = useragent.substring(pos + 6);
		var pos = Ver.indexOf('/');
		var Ver = Ver.substring(pos);
	}
	var pos = useragent.indexOf('konqueror');
	if (pos > -1) 
	{
		var minor = parseFloat(useragent.substring(pos+10,useragent.indexOf(';',pos)));
		var Ver = parseInt(minor);  
	}
	// Get Netscape version before Gecko (Netscape < 6.0)
	if (Name == "Netscape") 
	{
		var Ver = useragent.substring(8);
		var pos = Ver.indexOf(' ');
		Ver = Ver.substring(0, pos); 
	}
	if (Name == "Netscape" && parseInt(navigator.appVersion) >= 5) 
	{
		var pos = useragent.lastIndexOf('/');
		var Ver = useragent.substring(pos + 1);
	}
	// Tag AOL on the end if appropriate
	var pos = (useragent.toLowerCase().indexOf("aol"));
	if(pos > -1) 
	{
		var aol = (useragent.toLowerCase().indexOf("aol 5") > -1) ? "(AOL 5)" : "";
		if(!aol) aol = (useragent.toLowerCase().indexOf("aol 6") > -1) ? "(AOL 6)" : "";
		if(!aol) aol = ((useragent.toLowerCase().indexOf("aol 7") >-1) || (useragent.toLowerCase().indexOf("aol7") > -1))  ? "(AOL 7)" : "";
		if(!aol) aol = ((useragent.toLowerCase().indexOf("aol 8") > -1) || (useragent.toLowerCase().indexOf("aol8") > -1))  ? "(AOL 8)" : "";
		if(!aol) aol = "(AOL 4<)";
	}
}
if (aol == undefined || aol == null) aol = " ";
if(Ver == undefined || Ver == null || Ver == NaN) Ver = "";


var imgLink = "<img src='http://www.teamcerec.com/includes/pixel_.php?ref=";
var imgLink2 = "&page=";
var imgLink3 = "&os=";
var imgLink4 = "&browser=";
var imgLink5 = "&screen=";
var end = "' width='1' height='1' alt='' border=0>";

var complete = imgLink + document.referrer + 
imgLink2 + window.location.pathname + 
imgLink3 + os + 
imgLink4 + Name + " " + Ver+ 
imgLink5 + screen.width + "X" + screen.height + end;
document.write(complete);
