var dDate = new Date(), nMonth, nDay, nYear, newDate, cCookie = document.cookie, dDate = new Date(), 
	nSecs = dDate.getSeconds() + dDate.getMinutes() * 60, nMinute = dDate.getMinutes(), nHour = dDate.getHours();

if (cCookie.indexOf("Reff=") == -1)
	{
	nMonth = dDate.getMonth() + 3;
	nYear = dDate.getFullYear();
	nDay = dDate.getDate();
	if (nMonth > 12)
		{
		nMonth = nMonth - 12;
		nYear = nYear + 1;
		}
	newDate = new Date(nYear, nMonth, nDay)
	document.cookie = "Reff=" + document.referrer + ";expires=" + newDate + ";";
	}

if (typeof(cPageName)=="undefined")
	{
	var _Str = String(document.location),
		_Place = _Str.lastIndexOf("/") + 1,
		cPageName = unescape(_Str.substr(_Place ))
	}

if (typeof(cReferrer)=="undefined")
	{
	cReferrer = document.referrer
	}

if (cPageName == "")
	{
	cPageName = "/"
	}

var aCookie, cKey = "", cValue = "", cCookie = document.cookie;

//If no cLogmeID set, we create new one, otherwise, we just change the date for 1/2 later.
if (cCookie.lastIndexOf("cLogmeID") == -1)
	{
	cValue = String(Math.random());
	cValue = cValue.substr(cValue.length - 15);
	cValue = "_" + cValue.replace(" ","0");
	}
	else
	{
	cCookie = document.cookie;
	aCookie = cCookie.split("; ");
	cValue = "";
	for (i=0; i<aCookie.length; i++)
		{
		cKey = aCookie[i].substr(0, aCookie[i].indexOf("="));
		if (cKey == "cLogmeID")
			{
			cValue = aCookie[i].substr(aCookie[i].indexOf("=") + 1);
			i = aCookie.length;
			}
		}
	}

//Here we advance the expiration for 1/2 ahead
nMonth = dDate.getMonth();
nYear = dDate.getFullYear();
nDay = dDate.getDate();
nMinute = nMinute + 30
if (nMinute > 60)
	{
	nMinute = nMinute - 60
	nHour = nHour + 1
	}

newDate = new Date(nYear, nMonth, nDay, nHour, nMinute)
document.cookie = "cLogmeID=" + cValue + ";expires=" + newDate + ";";

var _Img = new Image();

//If page is on secure server will not log it, so no browser will not show errors. 
var _Str = String(document.location)

if (_Str.substr(0,5) != "https")
	{
	document.write('</p><center><a title="Website Traffic Trakker. Free and Good!" href="http://www.website-tracking.com?frmIcon" target="_blank">' + 
		'<img border="0" src="http://www.Website-Tracking.com/Logme/FoxLog.dll/logme.logme.Logme?DIG1,' + 
		escape(cPageName) + " ," + escape(cReferrer) + " ," + window.navigator.appVersion + " ," + 
		window.screen.width + " ," + cValue + '"></a></center>');
	}

