Вот так это примерно выглядит:
/********************************************************/
/* System Library */
/* By Andrey.P 2012 */
/********************************************************/
/*___ Type ___*/
function Tbuffer() {
this.arr=new Array();
this.setValue=function(name, value){
Tbuffer_setValue(this, name, value);
}
this.getValue=function(name){
return Tbuffer_getValue(this, name);
}
};
/*___ Var ___*/
var buffer=new Tbuffer();
/*___ Implementation ___*/
function Tbuffer_setValue(sender, name, value){
sender.arr[name]=value;
};
function Tbuffer_getValue(sender, name){
return sender.arr[name];
};