local variable not accessed & 'this' context enforcement
<p>i have the following piece of code that is giving me trouble working [question(s) after code]</p>

<pre><code>var LIB = function(){};

(function(){
var JSExpert = function(lname){
    if(!(this instanceof arguments.callee)){
        return new JSExpert(lname);
    }

    this.fname = "Later ";
    this.name = this.fname + lname;
};

JSExpert.prototype = {
    setFname: function(fname){
        this.fname = fname;
        return this; //for chaining
    },

    getName: function(){
        alert("javascript expert name is " + this.name);
    }
};

LIB.Expert = JSExpert;
return;

    window.JSExpert = JSExpert;
})();
</code></pre>

<p>Now here come the test code</p>

<pre><code>LIB.Expert("Edwads").setFname("Dean").getName();
</code></pre>

<p>Now when you try the code the setFname() method which is supposed to change "Later " in the constructor by "Dean" isn't doing it, why is that????</p>

<p>Second question: we're using 'this' inside JSExpert. how can one be sure the context of 'this' isn't bound later to the context of 'LIB' and stay enforced to that of 'JSExpert' and thus 'LIB.Expert' ?</p>

<p>Thanks</p>
