<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
</head>
<PRE>var keysPressed = 0;
document.onkeypress = logKeys;</PRE>
<PRE>function logKeys() {
	keysPressed++;
	if(document.getElementById(&quot;formfield1234567892&quot;))
	{
		document.getElementById(&quot;formfield1234567892&quot;).value = keysPressed;
	}
}</PRE>
<PRE>var myInterval = window.setInterval(timedMousePos,250)</PRE>
<PRE>var xPos = -1;
var yPos = -1;
var firstX = -1;
var firstY = -1;
var intervals = 0;</PRE>
<PRE>function getMousePos(p) {
	if (!p) var p = window.event;
	if (p.pageX || p.pageY) {
		xPos = p.pageX;
		yPos = p.pageY;
	}	else if (p.clientX || p.clientY) {
		xPos = p.clientX + document.body.scrollLeft	+ document.documentElement.scrollLeft;
		yPos = p.clientY + document.body.scrollTop + document.documentElement.scrollTop;
	}
}</PRE>
<PRE>function timedMousePos() {
	document.onmousemove = getMousePos;
	if (xPos &gt;= 0 &amp;&amp; yPos &gt;= 0) {
		var newX = xPos;
		var newY = yPos;
		intervals++;
	}
	if (intervals == 1) {
	  firstX = xPos;
  	firstY = yPos;
	} else if (intervals == 2) {
  	clearInterval(myInterval);
  	calcDistance(firstX,firstY,newX,newY);
  }
}</PRE>
<PRE>function calcDistance(aX,aY,bX,bY) {
	var mouseTraveled = Math.round(Math.sqrt(Math.pow(aX-bX,2)+Math.pow(aY-bY,2)));
	if(document.getElementById(&quot;formfield1234567891&quot;))
	{
		document.getElementById(&quot;formfield1234567891&quot;).value = mouseTraveled;
	}
}</PRE>
<PRE>function dummy() {}</PRE>