Can't access object method
<p>I've created a quasi namespace/class called NewsCalendar. My intent is to avoid polluting the global namespace as well as hide functions that should be private. But when I try to call what should be a public method I get "Object does not support this property or method."</p>

<pre><code>function NewsCalendar()
{
    var privatevar; //private vars

    this.onLoad = function () //public method
    {
        //Do Stuff
    };

    function getWeekStart(date) //private function
    {
        //Do Stuff
    }
}
</code></pre>

<p>The comments are there to indicate how I'm intending each item to behave.</p>

<p>I tried calling the onLoad function like this:</p>

<pre><code>NewsCalendar.onLoad();
</code></pre>

<p>But that causes the "object does not support this property or method" error. I want to be able to use NewsCalendar like a namespace and be able to call any variables/methods attached to its this object by using NewsCalendar.propertyname or NewsCalendar.methodname().</p>
