modules/callbacks.js
function AddCallback(mesgId, callbackFunction, callbackTimeout) {
    var callbackElement, now;

    now = new Date().getTime();

    callbackElement = {
        id      :   mesgId,
        func    :   callbackFunction,
        timeout :   now + callbackTimeout
    };

    callbackList.push(callbackElement);
}
function AddCallback(mesgId, callbackFunction, callbackTimeout) {
    var callbackElement, now;

    now = new Date().getTime();

    callbackElement = {
        id      :   mesgId,
        func    :   callbackFunction,
        timeout :   now + callbackTimeout
    };

    callbackList.push(callbackElement);
}
function AddCallback ( mesgId , callbackFunction , callbackTimeout ) { var callbackElement , now ; now = new Date ( ) . getTime ( ) ; callbackElement = { id : mesgId , func : callbackFunction , timeout : now + callbackTimeout } ; callbackList . push ( callbackElement ) ; }
Add a callback for a specific message ID
@param string mesgId
@param function callbackFunction
@param number callbackTimeout
Add a callback for a specific message ID