var collector = "http://www.whoisd.com/";
initClick();

function initClick() {
	if (document.all) {
		document.body.onclick= doClick;
	} else {
		document.captureEvents(Event.CLICK | Event.MOUSEDOWN);
		document.onmousedown = doClick;
	}
}

function doClick(e) {
	e = e||window.event;
	var tgt = e.target||e.srcElement;
	var typ = tgt.tagName;
	var x,y;
	if (event) {
		x = event.clientX + document.body.scrollLeft;
		y = event.clientY + document.body.scrollTop;
	} else {
		x = e.pageX;
		y = e.pageY;
	}

	x = Math.max(0,Math.min(x,65536));
	y = Math.max(0,Math.min(y,65536));

   	var tag = new Image();
	tag.src = collector + "collect.php?u=Y&p=X&x="+x+"&y="+y+"&w="+screen.width+"&h="+screen.height+"&wh="+document.body.clientWidth+"&wh="+document.body.clientHeight+"&r="+new Date().getTime();

	if (typ!="INPUT" && typ!="BUTTON" && typ!="SELECT" && typ!="TEXTAREA") {
		window.setTimeout ("doClickFail("+x+","+y+","+screen.width+","+screen.height+")", 2000);
	}
	return true;
}

function doClickFail(x,y,w,h) {
	var tag = new Image();
	tag.src = collector + "collect.php?u=Y&p=X&f=1&x="+x+"&y="+y+"&w="+w+"&h="+h+"&wh="+document.body.clientWidth+"&wh="+document.body.clientHeight+"&r="+new Date().getTime();
}

