﻿function callService(url, data, fn) {
    var xhr = $.ajax({
        type: "POST",
        url: url,
        data: data,
        success: function (result) {
            if (result == "LogOut") {
                window.location.href = '/Default.aspx?Logout=1';
            }
            fn(result);
        },
        error: function (xhr) {
            alert(xhr.responseText);
        }
    });
    return xhr;
}
