	document.write("<img src=\"/images/spacer.gif\" ID=\"imageStats\" border=\"0\" width=\"1\" height=\"1\">");
	
	function LogWebsiteStats(uniqueCode)
	{
		if(referrerPage == ""){
			referrerPage = StringEncrypt(parent.document.referrer);
		}
//		referrerPage = StringDecrypt(referrerPage);
		
		locationPage = "" + parent.location + "";
		
		if (locationPage.indexOf("&referrer=")!=-1)
		{
			locationPage = locationPage.substring(0, locationPage.indexOf("&referrer="));
		}

		locationPage = escape(locationPage);

		referrerPage = replace(referrerPage,"http%3A//www.cvgkmw.com/index2.html%3Furl%3Dhttp%253A","http%3A");
		locationPage = replace(locationPage,"http%3A//www.cvgkmw.com/index2.html%3Furl%3Dhttp%253A","http%3A");
		
		referrerPage = replace(referrerPage,"http%3A//","");
		locationPage = replace(locationPage,"http%3A//","");
		
		if (locationPage.indexOf("%3Freferrer") != -1)
		{
			locationPage = locationPage.substring(0, locationPage.indexOf("%3Freferrer"));
		}

		var url = "/cgi-bin/stats.pl";
		url += "?mode=website";
		url += "&uniquecode=" + uniqueCode;
		url += "&referrer=" + referrerPage;
		url += "&width=" + escape(screen.width);
		url += "&height=" + escape(screen.height);
		url += "&colordepth=" + escape(screen.colorDepth);
		url += "&location=" + locationPage;
		
		document.getElementById("imageStats").setAttribute("src",url);
		
		document.getElementById("Chris").value = url + "\n" +  parent.document.referrer;
	}

	function replace(string,text,by) {// Replaces text with by in string
		var strLength = string.length, txtLength = text.length;
		if ((strLength == 0) || (txtLength == 0)) return string;
		var i = string.indexOf(text);
		if ((!i) && (text != string.substring(0,txtLength))) return string;
		if (i == -1) return string;    var newstr = string.substring(0,i) + by;
		if (i+txtLength < strLength)
				newstr += replace(string.substring(i+txtLength,strLength),text,by);
		return newstr;
	}	
	