title: Convert Image Map Area Coords to Absolutely Positioned Div
body: <p>I have an image map with areas that I would like to try and automatically convert to an absolutely positioned div.</p>
  
  <p>I want to convert this:</p>
  
  <pre><code>&lt;area shape="rect" coords="662,346,937,426" href="#" /&gt;
  </code></pre>
  
  <p>to this (which is wrapped in an absolute div):</p>
  
  <pre><code>&lt;a style="left:662px; top:346px; width:275px; height:80px;" href="#" /&gt;
  </code></pre>
  
  <p>Basically it boils down to converting this:</p>
  
  <pre><code>&lt;area shape="rect" coords="A,B,C,D" href="#" /&gt;
  </code></pre>
  
  <p>to this (which is wrapped in an absolute div):</p>
  
  <pre><code>&lt;a style="left:Apx; top:Bpx; width:C-Apx; height:D-Bpx;" href="#" /&gt;
  </code></pre>
  
  <p>I would like to find a way to automate this via a script and/or find/replace. I don't think regular expressions would work because they don't do any calculations (feel free to prove me wrong). It probably could be done with Javascript, but I don't know much :/</p>