assigning method to another method in javascript
<p>I have a couple of javascript objects that each have a setup method.  The code is identical for all of them so I created a function called setupMain.  Then for each instance of the object I'm trying to set it's setup value to setupMain.  something like below... but when I look at the setup value after an instance is created, it's coming back undefined instead of pointing to the setupMain function.  Any idea why?  Thanks.</p>

<pre><code>var customObject = function(){
  this.title = "";
}
var setupMain = function(obj){
  obj.title = "initial setup value";
}

var co = new customObject();
co.setup = setupMain(co);
</code></pre>
