MouseDown, false );
	canvas.addEventListener( 'mouseup', onMouseUp, false );
}

function resetCanvas (e) {  
 	// resize the canvas - but remember - this clears the canvas too. 
  	canvas.width = window.innerWidth; 
	canvas.height = window.innerHeight;
	
	//halfWidth = canvas.width/2; 
	halfWidth = canvas.width/2;

	halfHeight = canvas.height/2;
	
	//make sure we scroll to the top left. 
	window.scrollTo(0,0); 
}

var rawLeft, rawRight, MaxJoy = 255, MinJoy = -255, MaxValue = 255,
	MinValue = -255, RawLeft,