title: Add click event to canvas or make area map
body: <p>I write this html code :</p>
  
  <pre><code>&lt;div id="container"&gt;
          &lt;canvas id="imageView" width="1181" height="1181"&gt;
              &lt;p&gt;Unfortunately, your browser is currently unsupported by our web 
                  application.&lt;/p&gt;
          &lt;/canvas&gt;
          &lt;script type="text/javascript"&gt;
              window.onload = function() {
                  var c = document.getElementById('imageView');
                  var cxt = c.getContext('2d');
                  var img = new Image();
                  img.src = "map.jpg";
                  cxt.drawImage(img, 0, 0);
              };
          &lt;/script&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>And write this javascript :</p>
  
  <pre><code>this.mousemove = function(ev) {
                          if (!tool.started) {
                              return;
                          }
  
                          var x = Math.min(ev._x, tool.x0),
                                  y = Math.min(ev._y, tool.y0),
                                  w = Math.abs(ev._x - tool.x0),
                                  h = Math.abs(ev._y - tool.y0);
                          context.clearRect(0, 0, canvas.width, canvas.height);
                          if (!w || !h) {
                              return;
                          }
                          context.clearRect(x, y, w, h);
                          context.strokeRect(x, y, w, h);
  </code></pre>
  
  <p>this code is make a rectangle . I want change this rectangle to a area map , that when I click on the area do something , (for example open google.com) .</p>