title: JavaScript removeChild not working
body: <p>I am using this JavaScript code to remove a couple elements from the page, but it's not working. When I inspect the code with Opera Dragonfly it says something like:</p>
  
  <pre><code>Uncaught exception: Error: WRONG_ARGUMENTS_ERR
  </code></pre>
  
  <p>and points to the file and function name.</p>
  
  <p>The weird thing is that I use the exact same code in another function on the same page and it works without problem. The code is very small and simple:</p>
  
  <pre><code>var docBody = document.getElementById("body");
  if(document.getElementById("marginDiv")){
    docBody.removeChild("marginDiv");
  }
  </code></pre>
  
  <p>Both <code>body</code> and <code>marginDiv</code> exist on the page. My goal is to make the thumbnails disappear when one clicks the background.</p>