var onError = function(error)
{
    _onError(error);
}

jQuery.ajaxSetup({
    processData: false,
    dataType: 'json',
    contentType: 'application/json; charset=utf-8;',
    error: onError
});

function callWSMethod(httpMethod, method, data, callback, service, useUrlParams)
{
    var wsUrl = "/WebService/" + (service == null ? "SiteService" : service) + ".asmx/" + method;
    if (useUrlParams)
    {
        wsUrl += data;
        data = null;
    }
    if (httpMethod == 'GET') {
        jQuery.get(wsUrl, data, callback, 'json');
    }
    else {
        jQuery.post(wsUrl, data, callback, 'json');
    }
}
