Is it like...
var obj = new Object(); obj.function1 = function(){ //code }
or something like that?
var newObj = { met1 : function () { alert('hello'); } };
Then, the method can be called like such :
newObj.met1();
Btw, when declaring a new object, use the object literal ({}), not the new Object() constructor.
{}
new Object()