// getting referrer
var referrer = document.referrer;
// if referrer is empty the user typed the url
if (referrer == "")
	referrer = "Direct";
// if the host name is in the referrer the user is just browsing the site
if (referrer.indexOf(self.location.host) > -1)
	referrer = "Inside";
//alert(referrer);
var curPage = "";
var loc = self.location + "";

// figuring out what page the user is on. and cutting it out of the 
// url string.
if ((location.href.length-1) == location.href.lastIndexOf('/'))
	curPage = "index.php";
else
	curPage = loc.substr(location.href.lastIndexOf('/') + 1, loc.length);

// getting neccessary data about the user screen and browser setting.
var data = '&appName=' + escape(navigator.appName)
		+ '&appVersion=' + escape(navigator.appVersion)
		+ '&ref=' + escape(referrer)
		+ '&curPage=' + escape(curPage)
         + '&s_c=' + screen.colorDepth
         + '&s_w=' + screen.width 
         + '&s_h= '+ screen.height;

// sending the whole thing to the tracker
//alert('http://stats.errolbk.com/tracker.php?table='+ table + '' + data);
document.write('<img border=0 hspace=0 '
                + 'vspace=0 width=1 height=1 src="'
                + 'http://stats.errolbk.com/tracker.php?table='+ table + '' + data + '">');