var base = "http://www.percevia.com/statcounter/counter.aspx?";
//var base = "http://localhost/statcounter/counter.aspx?";
//var base = "http://projects.thebinarysolution.com:1080/statlogger/counter.aspx?";

if(window.projectID) {
	var url = base + "projectid=" + window.projectID + "&width=" + screen.width + "&height=" + screen.height + "&url=" + escape(document.location) + "&referer=" + escape(document.referrer);
	document.writeln("<IMG SRC=\"" + url + "\" BORDER=\"0\">");
}

		imageloaded = function()
		{
			this.loaded = true;
		}
		unload = function()
		{
			var startdate = new Date();
			var starttime = startdate.getTime()
			var currentdate
			var currenttime
			var diffrence
			var seconds=0
			image = new Image();
			image.src = "http://www.percevia.com/statcounter/OnLeave.aspx"
			//image.src = "http://projects.thebinarysolution.com:1080/statlogger/OnLeave.aspx"
			image.loaded = false;
			image.onload = imageloaded
			while(image.loaded == false && seconds <= 2)
			{ 
				currentdate = new Date()
				currenttime = currentdate.getTime()
				diffrence = currenttime - starttime
				seconds = diffrence / 1000
			}
		}
		onunload = unload
		window.onunload = unload
