simple Javascript code - toggle function - please explain
<p>Can someone please explain this javascript. 
Maybe give comments for each line explaining how it works?</p>

<p>It works perfectly I would just like to know how it works.</p>

<p>Thanks</p>

<pre><code>function toggleMe(a){
  var e =document.getElementById(a); 
  if(!e)return true;   
  if(e.style.display=="none"){ 
    e.style.display="block"
  } else {
    e.style.display="none"
  }
  return true;
}
</code></pre>
