er.className = "container";

	document.body.appendChild( container );
	container.appendChild(canvas);	

	resetCanvas(); 
	
	c.strokeStyle = "#ffffff";
	c.lineWidth =2;	
}

function mouseOver(minX, minY, maxX, maxY){
	return(mouseX>minX&&mouseY>minY&&mouseX<maxX&&mouseY<maxY);
}

function sendControls(){
	if(sendFlag == true){
		if(rotate){
			socket.emit('rot', parseFloat(leftVector.x/100), parseFloat(leftVector.y/100), parseFloat(rightVector.x/100));
		}
		else{ 
			socket.emit('mov', parseFloat(leftVector