function start_measure_dist(evt){
	
	
    evt = (evt) ? evt : ((window.event) ? event : null);
    if (evt) {
        if ((evt.button && evt.button == 2) || (evt.which && evt.which == 3)) {
            rightButton = true;
        }
        if (rightButton) {
            // process right-click here
            //return false;
        } else {
		
	var x = getX(evt);
	var y = getY(evt);
	if (!drawFlg) {
	// 始点クリック
		drawFlg = true;
		canvas_start_x = x;
		canvas_start_y = y;
		canvas.startLine(x, y);
	} else {
		canvas.lineTo(x, y);
		if (!continueFlg) {
		// 終点クリック
			drawFlg = false;
			canvas.endLine();
			var pixel_val = Math.sqrt((canvas_start_x - x)*(canvas_start_x - x) + (canvas_start_y - y)*(canvas_start_y - y));
			var mm_val = pixel_to_mm_change(pixel_val);
			//alert(pixel_val + 'px');
			//alert(mm_val +'mm');
			mm_val = Math.round(mm_val);
			document.getElementById('distance').innerHTML = mm_val +'mm' ;
		}
	}
	if (evt.preventDefault) {
    evt.preventDefault();
    }
        }
    }
}