JavaScript complains about a function I have defined
<p>I am new to JavaScript and I'm trying to write a simple object that calls a few member functions.</p>

<p>Surprisingly, JavaScript complains about a function called <code>uninstallLocalHost</code>.</p>

<pre><code>Error: uninstallLocalHost is not defined
Source File: chrome://custombutton/content/button.js
Line: 39
</code></pre>

<p>Yet, it looks like this function <em>is</em> defined.
What could I be doing wrong?</p>

<pre><code>var katimbaClass=
{       
    installLocalHost:function()
    {
        alert("localhost installed");
    },

    uninstallLocalHost:function()
    {
        alert("localhost uninstalled");
    },

    toggleInstall:function()
    {
        if(bInstalled) uninstallLocalHost();
         else installLocalHost();
    },

    bInstalled: false
};
</code></pre>

<p>When I attempt to call a function of <code>katimbaClass</code> elsewhere like so:</p>

<pre><code>oncommand="katimbaClass.toggleInstall()"
</code></pre>

<p>I don't understand why the following error results:</p>

<pre><code>Error: uninstallLocalHost is not defined
</code></pre>
