title: DOM style change waiting for pause
body: <p>When this function is called, the style change on the "gif" element does not show up until "lotsOfProcessing()" finishes. However, when I uncomment the alert("test"), the style change is shown before the alert pops up.</p>
  
  <p>What I am trying to do is have an animated gif displayed while lotsOfProcessing is running. This seemed pretty straight forward solution but it is clearly not working. Any suggestions / solutions?</p>
  
  <pre><code>function nameOfFuntion()
      {
          document.getElementById("gif").style.display = "inline";
          //alert("test");
          lotsOfProcessing();
      }
  </code></pre>