javascript error: object not defined
<p>I'm trying to reuse some script that I have working on another page, but am consistently getting an error with this one. </p>

<p>I have a .js file called CalendarPopup.js. It's linked to my HTML like this:</p>

<pre><code>&lt;script type="text/javascript" src="/administrator/components/com_arrcard/js/CalendarPopup.js"&gt;&lt;/script&gt;
</code></pre>

<p>It's a javascript library that displays a popup calendar the user can choose a date from when they click a link. The value then gets put into a field. Here's the code that displays the field and link:</p>

<pre><code>&lt;tr id="birthDate"&gt;
&lt;td align="left" valign="top"&gt;
    &lt;script type="text/javascript"&gt;
    var calStart = new CalendarPopup("calendar");
    calStart.showNavigationDropdowns();
    &lt;/script&gt;
    Birth Date:
&lt;/td&gt;

  &lt;td&gt;
    &lt;input style="width:124px;" type="text" name="birthdate" value="" /&gt;
    &lt;a href="#" onclick="calStart.select(document.instantForm.birthdate,'anchorBirthdate','MM/dd/yyyy'); return false;" id="anchorBirthdate"&gt;select&lt;/a&gt;
  &lt;/td&gt;
&lt;/tr&gt;
</code></pre>

<p>Then there's a div that actually holds the calendar:</p>

<pre><code>&lt;div id="calendar" style="position:absolute;visibility:hidden; background-color:white; layer-background-color:white;"&gt;&lt;/div&gt;
</code></pre>

<p>All of this works flawlessly on one page, but on this new one, I'm getting the error</p>

<pre><code>CalendarPopup is not defined
</code></pre>

<p>on this line:</p>

<pre><code>var calStart = new CalendarPopup("calendar");
</code></pre>

<p>What am I missing? I'm sure it's something really obvious, but I've been staring at it for too long and just can't see it.</p>
