appendChild doesn't seem to be playing nice in FireFox
<p>I'm trying to learn how to create a  as a child of another  using JavaScript.  My example below is functioning fine in Chrome and IE, but in Firefox I get an error that says "viewport is not defined" for the viewport.appendChild line in the JS.  </p>

<p>The html looks like this:</p>

<pre><code>&lt;body&gt;
&lt;div id="viewport"&gt;&lt;/div&gt;
&lt;/body&gt;
</code></pre>

<p>and the JS looks like this:</p>

<pre><code>function createDiv() {

    var divTag = document.createElement("div");

    divTag.className ="tile";

    viewport.appendChild(divTag);

}
</code></pre>
