Javascript construction: variable *is set* but must be *null*
<p>Problem is: context variable <em>_curIndex</em> is set when there is first call of switchTo (<em>at point a</em>):</p>

<pre><code>function ShowSwitcherObject( id, switchIds )
{

    this._id = id;

    this._isInited = false;

    this.isInited = function()
    {
        return this._isInited;
    };

    this._visible = false;

    this.show = function()
    {
        if( this._visible == false )
        {
            $( '#' + this._id ).show();
            this._visible = true;
            this._isInited = true;
        }
    };

    this._showSwitch = function()
    {
        $( '#' + this._switchIds[ this._curIndex ] ).show();
    };

    this._hideSwitch = function()
    {
        $( '#' + this._switchIds[ this._curIndex ] ).hide();
    };

    this.switchTo = function( index )
    {       
        if( index != this._curIndex ) // point a
        {
            if( this._curIndex != null )
            {
                this._hideSwitch();
            }

            this._curIndex = index; // point b
            this._showSwitch();
        }
    };
    this._switchIds = switchIds;
    return this;
}
</code></pre>

<p>It's interesting that if we comment <em>point b</em> the variable is <em>null</em> at point a.
There are no external sets of <em>_curIndex</em>. It could be only set by <em>switchTo</em>. Is it firefox bug or something else?</p>
