How to pass events as parameters?
<p>I want to have a collection of functions in the class T, defined below. </p>

<pre><code>function T(){
    this.Funcs = new Array();
    this.appendEvt=function(Obj, Evt, Act){
        switch(Evt){
            case "onclick":
                this.Funcs.push(function(){Obj.onclick=Act;});
                break;
    }       
};
</code></pre>

<p>These functions are stored in a array of class T (Funcs). This functions must be of the form:</p>

<pre><code>Funcs[i]=function(){Obj.Event=FuncWhichContainsActionsWhenTheEventIsTriggered;}
</code></pre>

<p>The question is, how can I pass as a parameter any event, like onclick, or "onmouseover,..., so I am able to rewrite the function this.appendEvt like this?:</p>

<pre><code>    this.appendEvt=function(Obj, Evt, Act){
        this.Funcs.push(function(){Obj.Evt=Act;});      
};
</code></pre>
