﻿Refresh_Class = function() { };
////////////////////////////////////
Refresh_Class.prototype = { 

    // CheckSessionLive
    CheckSessionLive: function() {
        $.ajax({
            url: "Handler.ashx",
            dataType: "json",
            data: "Special=CheckSessionLive",
            type: "POST",
            timeout: GlobalVariable.AjaxTimeOut,
            success: function(result) {
                if (result.Live == "0") {
                    if ($("#TimeOut").length == 0) {
                        new Boxy("<div id='TimeOut' style='text-align:center;padding:20px;font-size:14px;font-weight:bold'>Vì lý do bảo mật, bạn vui lòng đăng nhập lại! <a href='javascipt:void(0);' style='color:#FF7F00;margin-left:15px' onclick='Boxy.get(this).hide();User.LoginTemplateDialog();return false;'>Đăng nhập</a> </span></div>", { title: "Thông báo", modal: true, closeable: false, fixed: false });
                    }
                }
            },
            error: function(xhr, message, ex) {
                alert("Đã mất kết nối với Máy chủ, vui lòng kiểm tra đường truyền!");
            },
            complete: function() {
            }
        });
    }
};

var Refresh = new Refresh_Class();