title: Finding the offset client position of an element
body: <p>How to find the offset client position of an element using Javascript? (I assume the same code can be written in a BHO or Gecko/NPAPI). </p>
  
  <p>The problem I am facing is a way to find out the offset client position of the element. The <code>e.srcElement.offsetX/Y</code> does not give the correct value always (same goes for clientX/Y). In some cases we also need to consider the parent element scroll. </p>
  
  <p>How do we do this in general? Is there an easy way for this?</p>