Registration = function()
{
    var nextId = 0;
	var url = "http://www.climatesmartbusiness.com/climatesmart/site/events/registration.ashx";
	
    var proxy = {
        
        "GetEventDetails" : function(id, callback, scope) {
            Call("GetEventDetails", [ id ], callback, scope, Array.prototype.slice.call(arguments, 3));
        },
        
        "SearchWorkshops" : function(tabSid, colSid, searchVal, callback, scope) {
            Call("SearchWorkshops", [ tabSid, colSid, searchVal ], callback, scope, Array.prototype.slice.call(arguments, 5));
        },
        
        "Submit" : function(saveObj, callback, scope) {
            Call("Submit", [ saveObj ], callback, scope, Array.prototype.slice.call(arguments, 3));
        },
        
        "system.about" : function(callback, scope) {
            Call("system.about", [ ], callback, scope, Array.prototype.slice.call(arguments, 2));
        },
        
        "system.listMethods" : function(callback, scope) {
            Call("system.listMethods", [ ], callback, scope, Array.prototype.slice.call(arguments, 2));
        },
        
        "system.version" : function(callback, scope) {
            Call("system.version", [ ], callback, scope, Array.prototype.slice.call(arguments, 2));
        }
    };
    
    function Call(method, params, callback, scope, callbackParams)
    {
        var request = { 
            id     : ++nextId, 
            method : method, 
            params : params 
        };
        Jayrock.Rpc.asyncRequest(url, request, callback, scope, callbackParams);
    }
        
    return proxy;
}();
