function Communicator() {
    
    Communicator.prototype.sendRequest = function(controlId, context, arg)
    {
        eval("callTheServer" + controlId + "(arg, context)");
    }

    Communicator.prototype.getResponseData = function(response, context)
    {
        if (context) {
            eval(context + ".processResponse('" + response + "')");
        }
        else {
            alert("No context assigned to process the response.");
        }
    }
    
    Communicator.prototype.getResponseErrorData = function(response, context)
    {
        if (context) {
            eval(context + ".displayServerError('" + response.replace(/'/g, "\\'") + "')");
        }
        else {
            alert("No context assigned to process the error response.");
        }
    }
}
