issues inserting a div from Javascript
<p>I'm trying to add a div with some text before another div in the document.
Here's my script in a nutshell, assume init() gets called when onload page:</p>

<pre><code>       &lt;head&gt;
            &lt;script type="text/javascript"&gt;
                function init () {
                       var div = document.createElement('div').className = 'title';
                       div.innerHTML = 'Hello';
                       var reference = document.getElementById('content');
                       document.body.insertBefore(div, reference );            
                }
            &lt;/script&gt;
        &lt;/head&gt;
        &lt;body&gt;
            &lt;div id="content"&gt;blah blah&lt;/div&gt;
            &lt;br /&gt;&lt;br /&gt;
        &lt;/body&gt;
</code></pre>

<p>I get a <strong>type mismatch error</strong> on document.body.insertBefore(div, reference), Can someone please let me know what i'm doing wrong?</p>
