title: Random image-background in div
body: <p>I have a "container" DIV that scales to fit the window 100% and I would like to load a random image into the DIV.
  I have a working script that works for the html background, but I can't get it to work on a DIV instead.</p>
  
  <p>Anyn suggestions?</p>
  
  <p>Here is the original script:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      var imgCount = 3;
      var dir = 'images/';
      var randomCount = Math.round(Math.random() * (imgCount - 1)) + 1;
      var images = new Array
              images[1] = "bg-01.jpg",
              images[2] = "bg-02.jpg",
              images[3] = "bg-03.jpg",
      document.body.style.backgroundImage = "url(" + dir + images[randomCount] + ")"; &lt;/script&gt;
  </code></pre>