function AjaxLogoff()
{
    $.ajax({
        type: "POST",
        dataType: "json",
        async: true,
        url: "/osp_moduls/cabinet/logoff.ajaxhandler.php",
        data: {},
        success: function(msg) {
            if(msg.data.result=="success"){
                window.location.href=window.location.href.split('#')[0];
            }
        }
    });
}
$(document).ready(function() {
    $('.logoff_button').click(function(){
        AjaxLogoff();
        return false;
    });
});
