Suppose I have this javascript function. How do I pass the element to it?
<pre><code>function getLeftPos(elm){
  var left = 0;
  while(elm){
    left += elm.offsetLeft;
    elm= elm.offsetParent;
  }
  return left;
}
</code></pre>

<p>How come this doesn't work?</p>

<pre><code>getLeftPos(document.getElementById("#frame"));
</code></pre>

<p>If I alert(elm) inside that function, it is NULL.</p>
