okouser,
function A(name)
{
var _name = 'test';
A.prototype.getName = function()
{
return _name + this._name;
};
A.prototype.setName = function(value)
{
this._name = value;
};
A.prototype.toString = function()
{
return this.getName();
};
this.setName(name);
};
A.A1 = new A("1");
A.A2 = new A("2");
A.A3 = new A("3");
alert(A.A1); // test1
alert(A.A2); // test2
alert(A.A3); // test3
A.A2.setName(12345)
alert(A.A2); // test12345
alert(A.A3); // test3