title: Check if a CSS class exists without jQuery
body: <p>Using vanilla javascript or prototype can someone show me how I could run a check to see if a class exists?  For example I am adding a class called hideIt with this code :</p>
  
  <pre><code>var overlay = document.getElementById("overlay_modal");
  overlay.className += " hideIt";
  </code></pre>
  
  <p>I also need a script that later can check to see if hideIt exists.  I have tried things like :</p>
  
  <pre><code>if (overlay.className == "hideIt")
  </code></pre>
  
  <p>But that is no good.  Any ideas?</p>