<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">/* Minification failed. Returning unminified contents.
(1,1): run-time error CSS1019: Unexpected token, found '$'
(1,2): run-time error CSS1019: Unexpected token, found '('
(1,11): run-time error CSS1031: Expected selector, found ')'
(1,11): run-time error CSS1025: Expected comma or open brace, found ')'
(186,2): run-time error CSS1019: Unexpected token, found ')'
(192,10): run-time error CSS1031: Expected selector, found 'itemScroll('
(192,10): run-time error CSS1025: Expected comma or open brace, found 'itemScroll('
(198,14): run-time error CSS1031: Expected selector, found '='
(198,14): run-time error CSS1025: Expected comma or open brace, found '='
(238,2): run-time error CSS1019: Unexpected token, found ')'
(241,10): run-time error CSS1031: Expected selector, found 'ShowMsg('
(241,10): run-time error CSS1025: Expected comma or open brace, found 'ShowMsg('
(261,10): run-time error CSS1031: Expected selector, found 'LoadNotify('
(261,10): run-time error CSS1025: Expected comma or open brace, found 'LoadNotify('
(313,10): run-time error CSS1031: Expected selector, found 'ViewReply('
(313,10): run-time error CSS1025: Expected comma or open brace, found 'ViewReply('
(333,1): run-time error CSS1019: Unexpected token, found 'jQuery('
(333,16): run-time error CSS1031: Expected selector, found ')'
(333,16): run-time error CSS1025: Expected comma or open brace, found ')'
(352,2): run-time error CSS1019: Unexpected token, found ')'
(362,1): run-time error CSS1019: Unexpected token, found 'jQuery('
(362,16): run-time error CSS1031: Expected selector, found ')'
(362,16): run-time error CSS1025: Expected comma or open brace, found ')'
(390,2): run-time error CSS1019: Unexpected token, found ')'
(391,1): run-time error CSS1019: Unexpected token, found 'jQuery('
(391,16): run-time error CSS1031: Expected selector, found ')'
(391,16): run-time error CSS1025: Expected comma or open brace, found ')'
(420,2): run-time error CSS1019: Unexpected token, found ')'
(421,21): run-time error CSS1031: Expected selector, found '='
(421,21): run-time error CSS1025: Expected comma or open brace, found '='
(449,21): run-time error CSS1031: Expected selector, found '='
(449,21): run-time error CSS1025: Expected comma or open brace, found '='
(455,1): run-time error CSS1019: Unexpected token, found 'jQuery('
(455,16): run-time error CSS1031: Expected selector, found ')'
(455,16): run-time error CSS1025: Expected comma or open brace, found ')'
(485,2): run-time error CSS1019: Unexpected token, found ')'
(486,1): run-time error CSS1019: Unexpected token, found '$'
(486,2): run-time error CSS1019: Unexpected token, found '('
(486,3): run-time error CSS1019: Unexpected token, found '"#tab-bar-header li.tab.wave"'
(486,32): run-time error CSS1019: Unexpected token, found ')'
(486,34): run-time error CSS1030: Expected identifier, found 'click('
(486,34): run-time error CSS1019: Unexpected token, found 'click('
(486,49): run-time error CSS1031: Expected selector, found '('
(486,49): run-time error CSS1025: Expected comma or open brace, found '('
(503,2): run-time error CSS1019: Unexpected token, found ')'
(515,12): run-time error CSS1031: Expected selector, found '='
(515,12): run-time error CSS1025: Expected comma or open brace, found '='
(516,4): run-time error CSS1031: Expected selector, found '('
(516,4): run-time error CSS1025: Expected comma or open brace, found '('
(523,1): run-time error CSS1019: Unexpected token, found '$'
(523,2): run-time error CSS1019: Unexpected token, found '('
(523,11): run-time error CSS1031: Expected selector, found ')'
(523,11): run-time error CSS1025: Expected comma or open brace, found ')'
(530,2): run-time error CSS1019: Unexpected token, found ')'
(535,1): run-time error CSS1019: Unexpected token, found '$'
(535,2): run-time error CSS1019: Unexpected token, found '('
(535,11): run-time error CSS1031: Expected selector, found ')'
(535,11): run-time error CSS1025: Expected comma or open brace, found ')'
(559,2): run-time error CSS1019: Unexpected token, found ')'
(562,10): run-time error CSS1031: Expected selector, found 'OpenModalLogin('
(562,10): run-time error CSS1025: Expected comma or open brace, found 'OpenModalLogin('
(693,10): run-time error CSS1031: Expected selector, found 'OpenModalQuenMatKhau('
(693,10): run-time error CSS1025: Expected comma or open brace, found 'OpenModalQuenMatKhau('
 */
$(document).ready(function () {
    // -------- img error handler
    const imgErrorHandler = function (e) {
        let w = parseInt($(e.target).attr('width'));
        if (!w) w = 492;
        // img default of a Hiep
        e.target.src = 'https://cdn.thuvienphapluat.vn/uploads/tintuc/2021/12/23/phap-luat.png?w=' + w;
    }

    let listAllImg = document.getElementsByTagName("img");
    for (let i = 0; i &lt; listAllImg.length; ++i) {
        listAllImg[i].addEventListener('error', imgErrorHandler);
    }

    // -------- img lazyload
    let myLazyLoad = new LazyLoad({
        use_native: true,
        threshold: 20,
    });
    myLazyLoad.update();

    // -------- counter click link href start width 'https://thuvienphapluat.vn/'
    $("a[href^='https://thuvienphapluat.vn/']").on('click', function (e) {
        let that = $(this);
        let newsUrl = location.href;
        let lawUrl = that.attr('href');
        let regexNewsId = newsUrl.match(/-(\d+)\.html/);
        let regexLawId = lawUrl.match(/-(\d+)\.aspx/);
        if (regexNewsId.length == 2 &amp;&amp; regexLawId.length == 2) {
            let newsId = regexNewsId[1];
            let lawId = regexLawId[1];
            $.post(`${StaticValue.Cf.BaseUrl}/Counter/NewsLaw`, {
                newsId: newsId, lawId: lawId
            });
        }
    });

    // -------- scroll to top
    $('.tvpl-to-top').on('click', function (e) {
        e.preventDefault();
        $('html, body').animate({ scrollTop: 0 }, 10);
    });

    // -------- show more text
    let listShowMore = $('.tvpl-show-more-container');
    listShowMore.each(function (index, ele) {
        let that = $(this);
        let lineHeight = parseInt(that.css('line-height'));
        let lineClamp = parseInt(that.css('-webkit-line-clamp'));
        let totalHeight = lineHeight * lineClamp;
        let btn = that.find('.btn-show-more');
        let topContainer = that.offset().top;
        let topBtnWithContainer = btn.offset().top - topContainer;
        if (topBtnWithContainer &gt;= totalHeight) {
            function init() {
                btn.css('top', `${totalHeight}px`);
                that.css('padding-bottom', '32px');
                btn.css('opacity', '1');
                btn.css('visibility', 'visible');
                btn.on('click', function (e) {
                    e.preventDefault();
                    btn.css('opacity', '0');
                    that.css('display', 'block');
                    that.css('padding-bottom', '0');
                });
                $(window).off('scroll', init);
                that.off('mouseover', init);
                that.off('touchstart', init);
            }
            $(window).on('scroll', init);
            that.on('mouseover', init);
            that.on('touchstart', init);
        }
    });

    // -------- show menu
    var nav = document.querySelector("nav.hamburger_menu");
    var toggle = document.querySelector(".nav-toggle");
    toggle.addEventListener("click", () =&gt; {
        nav.classList.toggle("open-nav");
        toggle.classList.toggle("open-nav");
    });


    $('.hamburger_menu ul li').click(function (e) {
        var elm = $(this).find('.dropdown-content');
        if (elm.length &gt; 0) {
            var check = $(elm)[0].classList.contains("toggle-menu");
            if (!check)
                $(elm)[0].classList.add("toggle-menu");
            else
                $(elm)[0].classList.remove("toggle-menu");
        }
    });

    $('.hamburger_menu li .icon-remove').click(function (e) {
        $(".hamburger_menu").removeClass("open-nav");
        $(".nav-toggle").removeClass(".open-nav .hamburger::before open-nav");
        $(".shadow-menu").removeClass("open-menu");
    });

    $('.shadow-menu').click(function (e) {
        $(".hamburger_menu").removeClass("open-nav");
        $(".nav-toggle").removeClass(".open-nav .hamburger::before open-nav");
        $(".shadow-menu").removeClass("open-menu");
    });

    $(".hamburger_menu ul li").click(function () {
        var elm = $(this).find('.icon-menu-chevron-right');
        $(elm).toggleClass("down");

    })

    $(".nav-toggle").click(function () {
        const element = document.querySelector(".shadow-menu");
        if (element.classList.contains("open-menu")) {
            $(".shadow-menu").removeClass("open-menu");
        }
        else {
            $(".shadow-menu").addClass("open-menu");
        }
    });

    //$('#owl-carousel-lg').owlCarousel({
    //    loop: true,
    //    margin: 15,
    //    responsiveClass: true,
    //    responsive: {
    //        0: {
    //            items: 1,
    //            nav: true
    //        },
    //        300: {
    //            items: 2,
    //            nav: true,
    //            loop: false
    //        },
    //        1000: {
    //            items: 6,
    //            nav: true,
    //            loop: false
    //        }
    //    }
    //});
    $('.owl-carousel').owlCarousel({
        margin: 10,
        loop: true,
        autoWidth: true,
        items: 10
    })


    var owl = $('.owl-carousel');
    owl.owlCarousel({
        loop: true,
        nav: true,
        margin: 10,
        responsive: {
            0: {
                items: 10
            },
            600: {
                items: 10
            },
            960: {
                items: 10
            },
            1200: {
                items: 10
            }
        }
    });
    owl.on('mousewheel', '.owl-stage', function (e) {
        if (e.deltaY &gt; 0) {
            owl.trigger('next.owl');
        } else {
            owl.trigger('prev.owl');
        }
        e.preventDefault();
    });
    $('#menu-collapsed').on('change', function () {
        $this = $(this);
        $this.parent().toggleClass('clicked');
    });

});

// _____________________________________________________________________
// ______________________________Function ______________________________
// _____________________________________________________________________

function itemScroll(e, elm) {
    $('html, body').animate({
        scrollTop: ($(elm).offset().top - 70)
    }, 300);
}
//sub slider
const swiper = new Swiper(".swiper", {
    slidesPerGroup: 3,
    loop: false,
    navigation: {
        nextEl: ".swiper-button-next",
        prevEl: ".swiper-button-prev",
    },
    speed: 400,
    //slidesPerView: 5,
    //spaceBetween: 5,
    width: "auto",
    breakpoints: {
        320: {
            slidesPerView: 1,
            spaceBetween: 5,
            width: "auto"
        },
        // when window width is &gt;= 480px
        480: {
            slidesPerView: 1,
            spaceBetween: 5,
            width: "auto"
        },
        500: {
            slidesPerView: 1,
            spaceBetween: 5,
            width: "auto"
        },
        // when window width is &gt;= 640px
        640: {
            slidesPerView: 1,
            spaceBetween: 5,
            width: "auto"
        },
        900: {
            slidesPerView: 10,
            spaceBetween: 10,
            slidesOffsetAfter: 200,
        },
    },
});


function ShowMsg(title, content) {

    var ct = `&lt;div class='modal fade' tabindex='-1' role='dialog'&gt;
    &lt;div class='modal-dialog' role='document'&gt;
        &lt;div class='modal-content'&gt;
            &lt;div class='modal-header' style='border-bottom: 2px solid #F89B1A !important;'&gt;
                &lt;span class='modal-title'&gt;&lt;b&gt; ` + title + ` &lt;/b&gt;&lt;/span &gt;
                &lt;button type='button' class='btn-close' data-bs-dismiss='modal'&gt;&lt;/button&gt;
            &lt;/div&gt;
            &lt;div id='modal-body' class='modal-body'&gt;` + content + `&lt;/div&gt;
            &lt;div class='modal-footer'&gt;
                &lt;a data-bs-dismiss='modal' class='btn btn-sm btn-primary'&gt;&lt;i class='bi bi-check-lg'&gt;&lt;/i&gt; OK&lt;/a&gt;
            &lt;/div&gt;
        &lt;/div&gt;
    &lt;/div&gt;
    &lt;/div&gt;`;
    $(ct).modal("show");
}


function LoadNotify() {
    $.ajax({
        url: "/phap-luat/thong-bao-cau-hoi",
        //data: JSON.stringify({ 'idFolderParent': id, 'folderName': folderName }),
        type: "POST",
        contentType: "application/json; charset=utf-8",
        success: function (ret) {
            if (ret.Status == 1) {
                var shtml = "Bạn không có thông báo nào";
                var count = 0;
                var total = ret.Data.ListQuestion.length;
                if (total &gt; 0) {
                    shtml = "";
                    $.each(ret.Data.ListQuestion, function (index, value) {

                        var link = "\"/phap-luat" + value.News.FriendlyUrl + "-" + value.News.Id + ".html\"";

                        var isViewed = 'un-viewed'
                        var ahref = "&lt;a href='#' onclick='ViewReply(" + value.Question.Id + "," + link + ")' &gt;Xem câu tư vấn trả lời&lt;/a&gt;";

                        if (value.Question.isReaded) {
                            ahref = "&lt;a href=" + link + "&gt;Xem câu tư vấn trả lời&lt;/a&gt;";
                            isViewed = '';
                            count++;
                        }

                        var s = `&lt;div class='card'&gt;
                                &lt;div class='card-body ` + isViewed + `'&gt;
                                    &lt;div class='notify-title'&gt;Câu hỏi của bạn đã được trả lời&lt;/div&gt;
                                    &lt;div class='notify-content'&gt;`
                            + value.Question.ContentQuestion + `
                                    &lt;/div&gt;
                                    &lt;div class='notify-link'&gt;` + ahref + `&lt;/div&gt;
                                &lt;/div&gt;
                            &lt;/div&gt;`;
                        shtml += s;
                    });

                    if (count &lt; total) {
                        $(".Cnotify").show();
                    }
                }
                $("#notify-body").html(shtml)
            }
        },
        error: function (xhr, status, error) {
            console.log(xhr.responseText)
        }
    });
}


function ViewReply(id, url) {
    //cap-nhat-da-xem
    $.ajax({
        url: "/phap-luat/cap-nhat-da-xem",
        data: JSON.stringify({ 'idQuestion': id }),
        type: "POST",
        contentType: "application/json; charset=utf-8",
        success: function (ret) {
            window.location = url;
        },
        error: function (xhr, status, error) {         
        }
    }); 
}


// _____________________________________________________________________
// ______________________________Function carousel______________________________
// _____________________________________________________________________
//
jQuery(document).ready(function () {

    var count = $('#viewZone4 section').length;

    for (let i = 1; i &lt; count; i++) {
        var el_next = ".next" + i;
        var el_prev = ".prev" + i;
        $(el_next).click(function (event) {
            event.preventDefault();
            var el = "scrollbar-hottitles_id" + i;
            document.getElementById(el).scrollBy({ left: 200, top: 0, behavior: 'smooth' });
        });
        $(el_prev).click(function (event) {
            event.preventDefault();
            var el = "scrollbar-hottitles_id" + i;
            document.getElementById(el).scrollBy({ left: -200, top: 0, behavior: 'smooth' });

        });
    }
});
// _____________________________________________________________________
// ______________________________Menu top Pháp Luật______________________________
// _____________________________________________________________________

//var toggle = document.querySelector(".chudeplnoibat");
//var menu = document.querySelector(".menu-chudenoibat");
//toggle.addEventListener("mouseover", () =&gt; {
//    menu.classList.toggle("open-menu-chudenoibat");
//});
jQuery(document).ready(function () {
    var width = $(document).width();
    if (width &lt; 576) {
        $(".chudeplnoibat").click(function () {
            var menu = document.querySelector(".menu-chudenoibat");
            menu.classList.toggle("open-menu-chudenoibat");
        });
        $(".menu-chudenoibat").click(function () {
            var menu = document.querySelector(".menu-chudenoibat");
            menu.classList.toggle("open-menu-chudenoibat");
        });
        $(document).click(function (event) {
            var $target = $(event.target);
            if (!$target.closest('.chudeplnoibat').length &amp;&amp; $('.chudeplnoibat').is(":visible")) {
                document.querySelector(".menu-chudenoibat").classList.remove("open-menu-chudenoibat");
            }
        });
    }
    else {
        $(".chudeplnoibat").hover(function () {
            var menu = document.querySelector(".menu-chudenoibat");
            menu.classList.toggle("open-menu-chudenoibat");
        });
        $(".menu-chudenoibat").hover(function () {
            var menu = document.querySelector(".menu-chudenoibat");
            menu.classList.toggle("open-menu-chudenoibat");
        });
    }
});
jQuery(document).ready(function () {
    var width = $(document).width();
    if (width &lt; 576) {
        $(".chudeplnoibat1").click(function () {
            var menu = document.querySelector(".menu-chudenoibat1");
            menu.classList.toggle("open-menu-chudenoibat");
        });
        $(".menu-chudenoibat1").click(function () {
            var menu = document.querySelector(".menu-chudenoibat1");
            menu.classList.toggle("open-menu-chudenoibat");
        });
        $(document).click(function (event) {
            var $target = $(event.target);
            if (!$target.closest('.chudeplnoibat1').length &amp;&amp; $('.chudeplnoibat1').is(":visible")) {
                document.querySelector(".menu-chudenoibat1").classList.remove("open-menu-chudenoibat");
            }
        });

    }
    else {
        $(".chudeplnoibat1").hover(function () {
            var menu = document.querySelector(".menu-chudenoibat1");
            menu.classList.toggle("open-menu-chudenoibat");
        });
        $(".menu-chudenoibat1").hover(function () {
            var menu = document.querySelector(".menu-chudenoibat1");
            menu.classList.toggle("open-menu-chudenoibat");
        });
    }
});
let pathLinhVuc_arr = ["/phap-luat/doanh-nghiep",
    "/phap-luat/lao-dong-tien-luong",
    "/phap-luat/bat-dong-san",
    "/phap-luat/vi-pham-hanh-chinh",
    "/phap-luat/bao-hiem",
    "/phap-luat/quyen-dan-su",
    "/phap-luat/van-hoa-xa-hoi",
    "/phap-luat/thuong-mai",
    "/phap-luat/trach-nhiem-hinh-su",
    "/phap-luat/xay-dung-do-thi",
    "/phap-luat/chung-khoan",
    "/phap-luat/ke-toan-kiem-toan",
    "/phap-luat/thue-phi-le-phi",
    "/phap-luat/xuat-nhap-khau",
    "/phap-luat/tien-te-ngan-hang",
    "/phap-luat/dau-tu",
    "/phap-luat/so-huu-tri-tue",
    "/phap-luat/thu-tuc-to-tung",
    "/phap-luat/tai-chinh-nha-nuoc",
    "/phap-luat/the-thao-y-te",
    "/phap-luat/dich-vu-phap-ly",
    "/phap-luat/tai-nguyen-moi-truong",
    "/phap-luat/cong-nghe-thong-tin",
    "/phap-luat/giao-duc",
    "/phap-luat/giao-thong-van-tai",
    "/phap-luat/bo-may-hanh-chinh",
    "/phap-luat/linh-vuc-khac"
];
let pathMenuTop_arr = ["/phap-luat/",
    "/phap-luat",
    "/phap-luat/phap-luat-24h",
    "/video-phap-luat",
    "/phap-luat/cau-tu-van-da-luu",
];
jQuery(document).ready(function () {
    var pathname = window.location.pathname;
    const elements = document.querySelectorAll('#tab-bar-header li');
    $('#tab-bar-header li.tab.wave').removeClass("active");
    $('#tab-bar-header li.tab.wave a').removeClass("active");
    elements.forEach(el =&gt; {
        if (el.id == "tab-trangchu" &amp;&amp; pathname == "/phap-luat/" || el.id == "tab-trangchu" &amp;&amp; pathname == "/phap-luat") {
            $(el).addClass('active');
        }
        else if (el.id == "tab-phapluat24h" &amp;&amp; pathname == "/phap-luat/phap-luat-24h") {
            $(el).addClass('active');
        }
        else if (el.id == "tab-videophapluat" &amp;&amp; pathname == "/video-phap-luat") {
            $(el).addClass('active');
        }
        else if (el.id == "tab-cautuvandaluu" &amp;&amp; pathname == "/phap-luat/cau-tu-van-da-luu") {
            $(el).addClass('active');
        }
        else if (el.id == "chudeplnoibat_id" &amp;&amp; pathLinhVuc_arr.indexOf(pathname) &gt; -1) {
            $(el).addClass('active');
        }
        else if (el.id == "chudeplnoibat_id1" &amp;&amp; pathLinhVuc_arr.indexOf(pathname) === -1 &amp;&amp; pathMenuTop_arr.indexOf(pathname) === -1) {
            $(el).addClass('active');
        }
        else if (el.id == "tab-timhieuphapluat" &amp;&amp; pathname == "/phap-luat/tim-hieu-phap-luat") {
            $(el).addClass('active');
            $("#chudeplnoibat_id1").removeClass("active");
        }

    });
});
$("#tab-bar-header li.tab.wave").click(function () {
    $('#tab-bar-header li.tab.wave').removeClass("active");
    $(this).addClass('active');
    //var item = $(this).attr('item-header');
    //if (item == "1")
    //    window.location.href = '/phap-luat/';
    //else if (item == "2")
    //    window.location.href = '/phap-luat/phap-luat-24h';
    //else if (item == "3")//video pháp luật
    //    window.location.href = '#';

    //else if (item == "5")
    //    window.location.href = '#';

    //else if (item == "6")
    //    window.location.href = '/phap-luat/tim-hieu-phap-luat';

});
//$("#navigation__links ul li").click(function () {
//    var item = $(this).attr('item-nav');
//    var link = $(this).attr('item-nav-link');
//    if (!item &amp;&amp; !link)
//        return false;
//    var check = $(this).find('.content-collapse a');
//    if (check.length == 0) {
//        window.location.href = link;
//    }
//});

var toggle = document.querySelector(".username-login");
if (toggle != null) {
    var menu_info = document.querySelector(".from-info");
    toggle.addEventListener("click", () =&gt; {
        menu_info.classList.toggle("open-form-infor");
    });
}

$(document).click(function (event) {
    var $target = $(event.target);
    if (!$target.closest('.username-login').length &amp;&amp; $('.username-login').is(":visible")) {
        document.querySelector(".from-info").classList.remove("open-form-infor");
    }

    
});

// _____________________________________________________________________
// ______________________________News Viewed______________________________
// _____________________________________________________________________
$(document).ready(function () {
    // Swiper: Slider
    new Swiper('.swiper-container', {
        loop: true,
        nextButton: '.swiper-button-next',
        prevButton: '.swiper-button-prev',
        slidesPerView: 3,
        paginationClickable: true,
        spaceBetween: 20,
        breakpoints: {
            1920: {
                slidesPerView: 3,
                spaceBetween: 30
            },
            1028: {
                slidesPerView: 2,
                spaceBetween: 30
            },
            480: {
                slidesPerView: 1,
                spaceBetween: 10
            }
        }
    });
});


function OpenModalLogin() {

    var currUrlReg = window.location.href;

    $("#login-modal").modal("show");

    $("#btn-dang-ky").click(function () {
        var fullName = $("#reg_txt_HoTen").val();
        var userName = $("#reg_txt_TenDangNhap").val();
        var passWord = $("#reg_txt_MatKhau").val();
        var email = $("#reg_txt_Email").val();
        var phone = $("#reg_txt_DienThoai").val();

        if (fullName.trim() == "") {
            $("#reg_txt_HoTen").addClass("is-invalid").focus();
            $("#errMsgReg").html("&lt;div class='alert alert-warning' role='alert'&gt;Bạn chưa nhập họ tên&lt;/div&gt;")
            return false;
        }

        if (userName.trim() == "") {
            $("#reg_txt_TenDangNhap").addClass("is-invalid").focus();
            $("#errMsgReg").html("&lt;div class='alert alert-warning' role='alert'&gt;Bạn chưa nhập họ tên&lt;/div&gt;")
            return false;
        }


        if (passWord == "" || passWord.length &lt; 6) {
            $("#reg_txt_MatKhau").addClass("is-invalid").focus();
            $("#errMsgReg").html("&lt;div class='alert alert-warning' role='alert'&gt;Bạn chưa nhập mật khẩu hoặc mật khẩu chưa đủ 6 ký tự&lt;/div&gt;")
            return false;
        }

        if (email == "" || email.length &lt; 6) {
            $("#reg_txt_Email").addClass("is-invalid").focus();
            $("#errMsgReg").html("&lt;div class='alert alert-warning' role='alert'&gt;Email không đúng định dạng&lt;/div&gt;")
            return false;
        }

        if (phone.trim() == "") {
            $("#reg_txt_Phone").addClass("is-invalid").focus();
            $("#errMsgReg").html("&lt;div class='alert alert-warning' role='alert'&gt;Bạn chưa nhập số điện thoại di động&lt;/div&gt;")
            return false;
        }

        $("#btn-dang-ky").html("&lt;span class='spinner-border spinner-border-sm' role='status' aria-hidden='true'&gt;&lt;/span&gt; Xin chờ...");
        $("#btn-dang-ky").prop('disabled', true);

        var params = "r_Add=" + $("#reg_txt_preName").val() + "&amp;r_txtNameUser=" + $("#reg_txt_HoTen").val() + "&amp;r_txtUser=" + $("#reg_txt_TenDangNhap").val() + "&amp;r_txtPass=" + $("#reg_txt_MatKhau").val() + "&amp;r_txtEmail=" + $("#reg_txt_Email").val() + "&amp;r_txtPhone=" + $("#reg_txt_DienThoai").val() + "&amp;rt_chkAgree=" + $("#ckThoaUoc").is(":checked") + "&amp;r_AppType=" + "" + "&amp;rt_action=" + currUrlReg;

        $.ajax({
            'url': 'https://thuvienphapluat.vn/page/ajaxcontroler.aspx',
            'data': params + '&amp;action=Regiter',
            'type': 'POST',
            success: fnRegiter,
            error: function (response) {
                alert("Không thể đăng ký lúc này, vui lòng thử lại sau.")
            }
        });
    });


    function fnRegiter(response) {
        if (response != "&lt;ok&gt;" &amp;&amp; response != "") {
            $("#errMsgReg").html("&lt;div class='alert alert-danger' role='alert'&gt;" + response.replace(/&lt;br&gt;/g, "\n") + "&lt;/div&gt;")

            $("#btn-dang-ky").html("Đăng nhập");
            $("#btn-dang-ky").prop('disabled', false);
        }
        else {
            location.reload();
        }
    }
   

    $("#btn-login").click(function () {
        var userName = $("#log_txt_TenDangNhap").val();
        var passWord = $("#log_txt_MatKhau").val();

        if (userName == "") {
            $("#log_txt_TenDangNhap").addClass("is-invalid").focus();
            $("#errMsg").html("&lt;div class='alert alert-warning' role='alert'&gt;Vui lòng nhập tên đăng nhập&lt;/div&gt;")
            return false;
        }

        if (passWord == "") {
            $("#log_txt_MatKhau").addClass("is-invalid").focus();
            $("#errMsg").html("&lt;div class='alert alert-warning' role='alert'&gt;Vui lòng nhập mật khẩu&lt;/div&gt;")
            return false;
        }
        var currUrl = window.location.href;

        $("#btn-login").html("&lt;span class='spinner-border spinner-border-sm' role='status' aria-hidden='true'&gt;&lt;/span&gt; Xin chờ...");
        $("#btn-login").prop('disabled', true);

        $.ajax({
            url: "/phap-luat/login",
            data: JSON.stringify({
                'userName': userName,
                'passWord': passWord,
                'urlReturn': currUrl
            }),
            type: "POST",
            contentType: "application/json; charset=utf-8",
            success: function (ret) {
                if (ret.Status) {
                    window.location.href = ret.UrlReturn;
                }
                else {
                    $("#log_txt_TenDangNhap").addClass("is-invalid").focus();
                    $("#log_txt_MatKhau").addClass("is-invalid");
                    $("#errMsg").html("&lt;div class='alert alert-danger' role='alert'&gt;Tên đăng nhập hoặc mật khẩu không chính xác&lt;/div&gt;");

                    $("#btn-login").html("Đăng nhập");
                    $("#btn-login").prop('disabled', false);

                }
            },
            error: function (xhr, status, error) {
                alert("Không thể đăng nhập lúc này, vui lòng thử lại sau.")
            }
        });


    });   




}


function OpenModalQuenMatKhau() {
    $("#login-modal").modal("hide");
    $("#quen-mk-modal").modal("show");


    $("#btn-quen-mk").click(function () {

        var email = $("#rePass_txt_Email").val();

        if (email.trim() == "") {
            $("#rePass_txt_Email").focus();
            $("#errMsgQuenMK").html("&lt;div class='alert alert-warning' role='alert'&gt;Bạn chưa nhập vào e-mail&lt;/div&gt;");
            return;
        }

        $("#btn-quen-mk").html("&lt;span class='spinner-border spinner-border-sm' role='status' aria-hidden='true'&gt;&lt;/span&gt; Xin chờ...");
        $("#btn-quen-mk").prop('disabled', true);

        var params = "cpEmail=" + $("#rePass_txt_Email").val();

        $.ajax({
            'url': 'https://thuvienphapluat.vn/page/ajaxcontroler.aspx',
            'data': params + '&amp;action=FogetPassWord',
            'type': 'POST',
            success: function (response) {
                if (response != "&lt;ok&gt;" &amp;&amp; response != "") {
                    $("#errMsgQuenMK").html("&lt;div class='alert alert-danger' role='alert'&gt;" + response.replace(/&lt;br&gt;/g, "\n") + "&lt;/div&gt;")

                    $("#btn-quen-mk").html("Gửi yêu cầu");
                    $("#btn-quen-mk").prop('disabled', false);
                }
                else {
                    $("#errMsgQuenMK").html("&lt;div class='alert alert-success' role='alert'&gt;Đã gửi yêu cầu thành công, vui lòng kiểm tra email và làm theo hướng dẫn.&lt;/div&gt;");
                    $("#btn-quen-mk").prop('disabled', true);
                    $("#btn-quen-mk").html("Gửi yêu cầu");
                }
            },
            error: function (response) {
                alert("Không thể yêu cầu lúc này, vui lòng thử lại sau.")
            }
        });


    });



}

/*
function onSignIn(googleUser) {
    google_logout();
    var profile = googleUser.getBasicProfile();

    var credentials = { action: "LoginWhitOpenID", UserName: profile.getEmail(), FullName: profile.getName(), Email: profile.getEmail(), Avata: profile.getImageUrl(), OpenID: profile.getId(), rt_action: "[" + window.location.href + "]", AppType: "GG" };
    console.log(credentials);


    $.ajax({
        url: "https://thuvienphapluat.vn/page/ajaxcontroler.aspx",
        type: "POST",
        data: credentials,
        error: function (response) {
            alert("Lỗi kết nối với tài khoản Google của bạn, vui lòng thử lại.");
            return;
        },
        success: function (response) {
            google_logout();

            console.log(response);
            if (response == "Reload") {
                location.reload();
            }

            else {
                $("#reg_txt_HoTen").val(profile.getName());
                $("#reg_txt_TenDangNhap").val(profile.getEmail());
                $("#reg_txt_Email").val(profile.getEmail());

                $("#txtAppType").val("GG");
                $("#reg_txt_DienThoai").focus();
                $("#dv-login").prop("disabled", true);         

                $("#errMsgReg").html("&lt;div class='alert alert-success' role='alert'&gt;Sắp hoàn thành đăng ký tài khoản từ Google. Nhập hoặc điều chỉnh các thông tin cần thiết sau đó nhấn Tiếp tục để đăng ký.&lt;/div&gt;");

            }
        }
    });
}


function google_logout() {
    var auth2 = gapi.auth2.getAuthInstance();
    auth2.signOut().then(function () {
        console.log('User signed out.');
    });
}


*/
</pre></body></html>