<!DOCTYPE html>

    <html lang="vi" xmlns="http://www.w3.org/1999/xhtml" prefix="og: http://ogp.me/ns#">

    <head>
<title>Trường Trung - Tiểu học Pétrus Ký tổ chức chương trình tư vấn hướng nghiệp 2023</title>
<meta name="description" content="Trường Trung - Tiểu học Pétrus Ký tổ chức chương trình tư vấn hướng nghiệp 2023 - Savefile - Tin bài hoạt động -...">
<meta name="author" content="PÉTRUS KÝ PRIMARY - HIGH SCHOOL">
<meta name="copyright" content="PÉTRUS KÝ PRIMARY - HIGH SCHOOL [pek@pek.edu.vn]">
<meta name="generator" content="NukeViet v4.5">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta property="og:title" content="Trường Trung - Tiểu học Pétrus Ký tổ chức chương trình tư vấn hướng nghiệp 2023">
<meta property="og:type" content="website">
<meta property="og:description" content="Savefile - Tin bài hoạt động -...">
<meta property="og:site_name" content="PÉTRUS KÝ PRIMARY - HIGH SCHOOL">
<meta property="og:url" content="https://pek.edu.vn/vi/hoat-dong-su-kien/savefile/hoat-dong-cua-hoc-sinh/truong-trung-tieu-hoc-petrus-ky-to-chuc-chuong-trinh-tu-van-huong-nghiep-2023-19.html">
<link rel="shortcut icon" href="https://pek.edu.vn/uploads/logo-pek.png">
<link rel="canonical" href="https://pek.edu.vn/vi/hoat-dong-su-kien/savefile/hoat-dong-cua-hoc-sinh/truong-trung-tieu-hoc-petrus-ky-to-chuc-chuong-trinh-tu-van-huong-nghiep-2023-19.html">
<link rel="alternate" href="https://pek.edu.vn/vi/hoat-dong-su-kien/rss/" title="Tin bài hoạt động" type="application/rss+xml">
<link rel="alternate" href="https://pek.edu.vn/vi/hoat-dong-su-kien/rss/hoat-dong-cua-hoc-sinh/" title="Tin bài hoạt động - Hoạt động của học sinh" type="application/rss+xml">
<link rel="alternate" href="https://pek.edu.vn/vi/hoat-dong-su-kien/rss/hoat-dong-cua-nha-truong/" title="Tin bài hoạt động - Hoạt động của nhà trường" type="application/rss+xml">
<link rel="alternate" href="https://pek.edu.vn/vi/hoat-dong-su-kien/rss/tuyen-truyen-dien-dan-giao-duc/" title="Tin bài hoạt động - Tuyên truyền-diễn đàn giáo dục" type="application/rss+xml">
<link rel="preload" as="font" href="/assets/tms/fonts/fontawesome-webfont.woff2" type="font/woff2" crossorigin>
<link rel="preload" as="image" href="/themes/default/images/header.png" type="image/png">
<link rel="preload" as="script" href="/assets/js/jquery/jquery.min.js?t=1792647660" type="text/javascript">
<link rel="preload" as="script" href="https://pek.edu.vn/assets/js/jquery/jquery.min.js" type="text/javascript">
<link rel="preload" as="script" href="https://pek.edu.vn/assets/js/language/vi.js" type="text/javascript">
<link rel="preload" as="script" href="https://pek.edu.vn/assets/js/DOMPurify/purify.js" type="text/javascript">
<link rel="preload" as="script" href="https://pek.edu.vn/assets/js/global.js" type="text/javascript">
<link rel="preload" as="script" href="https://pek.edu.vn/assets/js/site.js" type="text/javascript">
<link rel="preload" as="script" href="https://pek.edu.vn/themes/default/js/hoat-dong-su-kien.js" type="text/javascript">
<link rel="preload" as="script" href="https://pek.edu.vn/themes/default/js/main.js" type="text/javascript">
<link rel="preload" as="script" href="https://pek.edu.vn/themes/default/js/custom.js" type="text/javascript">
<link rel="preload" as="script" href="https://pek.edu.vn/themes/default/js/tms_menu.js" type="text/javascript">
<link rel="preload" as="script" href="https://pek.edu.vn/assets/tms/js/swiper.js" type="text/javascript">
<link rel="preload" as="script" href="https://pek.edu.vn/assets/tms/js/bootstrap.min.js" type="text/javascript">
<link rel="preload" as="style" href="https://pek.edu.vn/assets/tms/css/font-awesome.min.css" type="text/css">
<link rel="preload" as="style" href="https://pek.edu.vn/assets/tms/css/bootstrap.min.css" type="text/css">
<link rel="preload" as="style" href="https://pek.edu.vn/themes/default/css/style.css" type="text/css">
<link rel="preload" as="style" href="https://pek.edu.vn/themes/default/css/style.responsive.css" type="text/css">
<link rel="preload" as="style" href="https://pek.edu.vn/themes/default/css/custom.css" type="text/css">
<link rel="preload" as="style" href="https://pek.edu.vn/assets/css/default.vi.0.css" type="text/css">
<link rel="preload" as="style" href="https://pek.edu.vn/themes/default/css/tms_menu.css" type="text/css">
<link rel="preload" as="style" href="https://pek.edu.vn/assets/tms/css/swiper.css" type="text/css">
<link rel="stylesheet" href="https://pek.edu.vn/assets/tms/css/font-awesome.min.css">
<link rel="stylesheet" href="https://pek.edu.vn/assets/tms/css/bootstrap.min.css">
<link rel="stylesheet" href="https://pek.edu.vn/themes/default/css/style.css">
<link rel="stylesheet" href="https://pek.edu.vn/themes/default/css/style.responsive.css">
<link rel="stylesheet" href="https://pek.edu.vn/themes/default/css/custom.css">
<link rel="stylesheet" href="https://pek.edu.vn/assets/css/default.vi.0.css">
<link id="theme" rel="stylesheet" type="text/css" media="all" href="https://pek.edu.vn/themes/default/css/tms_menu.css" />
<link href="https://pek.edu.vn/assets/tms/css/swiper.css" type="text/css" rel="stylesheet" />
<style>
  .popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999999999;
  }

  .popup.hidden {
    display: none;
  }

  .popup-content {
    position: relative;
    background: #fff;
    width: 95%;
    height: 90%;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    overflow: hidden;
  }
/* Khi màn hình nhỏ hơn hoặc bằng 480px */
@media (max-width: 576px) {
    .popup-content {
        width: 100%;
        height: 100%;
        border-radius: 0; /* Loại bỏ bo góc để full màn hình */
    }
}

  /* Thay đổi tên iframe thành popup-iframe */
  .popup-iframe {
    width: 100%;
    height: 100%;
    border: none;
  }

  .popup-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #d9534f;
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 5px 10px;
    cursor: pointer;
    z-index: 10;
  }

  .popup-close-btn:hover {
    background: #c9302c;
  }
  .xpopup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999999999;
  }
  .xpopup.hidden {
    display: none;
  }

  /* Kích thước mặc định */
  .xpopup-content {
    position: relative;
    background: #fff;
    width: 100%;
    max-width: 768px;
    height: 90%;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    overflow: hidden;
  }

  /* Các size khác nhau */
  .popup-small { max-width: 400px; height: 50%; }
  .popup-medium { max-width: 768px; height: 90%; }
  .popup-large { max-width: 95%; height: 90%; }

  @media (max-width: 576px) {
    .xpopup-content {
      width: 95%;
      height: 90%;
      border-radius: 8px;
    }
  }

  .xpopup-iframe {
    width: 100%;
    height: 100%;
    border: none;
  }

  .xpopup-close-btn {
  position: absolute; /* Đổi từ relative sang absolute */
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  background-color: #f8d7da;
  color: #dc3545;
  font-size: 18px;
  line-height: 30px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  outline: none;
  z-index: 10; /* Đảm bảo nằm trên iframe */
}

.xpopup-close-btn:hover {
  background-color: #dc3545;
  color: #fff;
  transform: rotate(90deg);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.xpopup-close-btn:focus {
  outline: none;
}
  /* Link auto mở */
  .xpopup-link-0 {
    display: none;
  }
    body{background: #fff;}
</style>
    </head>
<iframe src="https://pek.edu.vn/nenweb2025/index.html" frameborder="0" style="position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index:-100000;"></iframe>
    <!-- HTML -->
<!-- HTML -->
<div id="iframe-popup" class="popup hidden">
  <div class="popup-content">
    <button id="close-popup" class="popup-close-btn">Đóng</button>
    <!-- Thay đổi id của iframe thành class -->
    <iframe class="popup-iframe" src="" frameborder="0"></iframe>
  </div>
</div>

<!-- CSS -->
<!-- JS -->
  <!-- HTML POPUP MỚI-->
  <div id="xpopup-container" class="xpopup hidden">
  <div class="xpopup-content">
    <button id="xpopup-close-btn" class="xpopup-close-btn"><span aria-hidden="true">&times;</span></button>
    <iframe class="xpopup-iframe" src="" frameborder="0"></iframe>
  </div>
</div>
<div class="container-fluid"style="background-color:#fff;">
<div id="print">
    <div id="hd_print">
        <h2 class="pull-left">PÉTRUS KÝ PRIMARY - HIGH SCHOOL</h2>
        <p class="pull-right"><a title="PÉTRUS KÝ PRIMARY - HIGH SCHOOL" href="https://pek.edu.vn/">https://pek.edu.vn</a></p>
    </div>
    <div class="clear"></div>
    <hr />
    <div id="content">
        <h1>Trường Trung - Tiểu học Pétrus Ký tổ chức chương trình tư vấn hướng nghiệp 2023</h1>
        <ul class="list-inline">
            <li>Thứ năm - 26/10/2023 01:53</li>
            <li class="hidden-print txtrequired"><em class="fa fa-print">&nbsp;</em><a title="In ra" href="https://pek.edu.vn/#" data-toggle="winCMD" data-cmd="print">In ra</a></li>
            <li class="hidden-print txtrequired"><em class="fa fa-power-off">&nbsp;</em><a title="Đóng cửa sổ này" href="https://pek.edu.vn/#"  data-toggle="winCMD" data-cmd="close">Đóng cửa sổ này</a></li>
        </ul>
        <div class="clear"></div>
        <div id="hometext">
            Chương trình tư vấn hướng nghiệp “HIỂU MÌNH – HIỂU NGHỀ - SÁNG TƯƠNG LAI” với chủ đề ĐẠI HỌC HAY HỌC ĐẠI.
        </div>
        <div id="bodytext" class="clearfix">
            <div style="text-align: justify;">Sáng ngày&nbsp;26/10/2023, Đoàn trường phối hợp cùng Trung tâm hướng nghiệp TP.HCM sẽ tổ chức chương trình tư vấn hướng nghiệp tại cơ sở 2 mở rộng, Trường Trung – Tiểu - Tiểu học Pétrus Ký (Địa chỉ: Số 02, đường Trần Văn Ơn, phường Phú Hòa, thành phố Thủ Dầu Một).<br />
Tham dự chương trình có sự góp mặt của TS. Huỳnh Anh Bình - Giám đốc trung tâm hướng nghiệp thành phố Hồ Chí Minh, Ban giám hiệu nhà trường, Đoàn thanh niên và các thầy cô đến từ các trường Đại học, Cao đẳng.</div>

<blockquote style="text-align: justify;"><strong>Chương trình&nbsp;với sự tham gia của hội đồng tư vấn bao gồm các đại diện đến từ:</strong><br />
- Trường Đại học Công thương TP.HCM<br />
- Trường Đại học Việt Đức<br />
- Trường Đại học Quốc tế Sài Gòn<br />
- Trường Đại học Công nghệ Sài Gòn<br />
- Trung tâm Du học định cư Cộng hòa Liên bang Đức<br />
- Trung tâm Hướng nghiệp TP.HCM.</blockquote>

<div style="text-align: justify;">Tại chương trình, TS. Huỳnh Anh Bình đã có những chia sẻ bổ ích đến các em học sinh trong việc chọn ngành, chọn nghề, định hướng tương lai. Đồng thời, thầy cô của các trường Đại học đã giới thiệu thông tin của trường, cung cấp cho các em học sinh các thông tin cần thiết, giúp các bạn học sinh có thể tự định hướng, lựa chọn cho mình những ngành nghề phù hợp với khả năng, năng lực của bản thân trước ngưỡng cửa quan trọng của cuộc đời.<br />
<br />
Bên cạnh đó các thầy cô của trường Đại học đã tận tình giải đáp thắc mắc của các em học sinh tham gia chương trình về các điểm mới trong tuyển sinh, tư vấn hướng nghiệp giúp các em có được thông tin về môi trường đào tạo, triển vọng nghề nghiệp sau khi học tại các trường Đại học, Cao đẳng.<br />
<br />
Đây là hoạt động ý nghĩa, thiết thực,<br />
Chương trình nhằm mang lại cho các em học sinh Trung học phổ thông đang ngồi trên ghế nhà trường với góc nhìn chân thực, khách quan, thông tin đa chiều hơn về môi trường Đại học và định hướng trong chọn ngành, chọn nghề, giúp các em học sinh có cơ hội tiếp cận với nguồn thông tin chính xác, từ đó giúp định hướng chọn ngành học, trường học, nghề nghiệp phù hợp với khả năng, điều kiện của bản thân&nbsp;và nhất là các em học sinh khối 12 năm học 2023 - 2024 có thêm thông tin trước khi chọn xét tuyển vào các trường Đại học.</div>

<blockquote style="text-align: justify;">Chương trình được sự quan tâm của các em học sinh, các em có nhiều câu hỏi hay về chương trình hướng nghiệp cho diễn giả Tiến sĩ Huỳnh Anh Bình và ban tư vấn.</blockquote>

<div style="text-align: center;"><strong>Hình ảnh hoạt động<br />
<br />
<div class="slideshowPlugin" contenteditable="false" data-animspeedid="500" data-autostartid="true" data-pictheightid="300" data-slideshowid="cke_3cwmcb02_slideShow" data-speedid="5" data-transitiontypeid="resize" id="cke_3cwmcb02_slideShow">
<div class="ad-gallery" contenteditable="false" id="ad-gallery_cke_3cwmcb02_slideShow">
<div class="ad-image-wrapper" contenteditable="false">&nbsp;</div>

<div class="ad-controls" contenteditable="false" style="visibility: hidden;">&nbsp;</div>

<div class="ad-nav" contenteditable="false" style="display: none;">
<div class="ad-thumbs" contenteditable="false">
<ul class="ad-thumb-list" contenteditable="false">
	<li contenteditable="false"><a contenteditable="false" href="https://pek.edu.vn/uploads/hoat-dong-su-kien/2024_07/tvhn.jpg"><img alt="" contenteditable="false" height="33" src="https://pek.edu.vn/uploads/hoat-dong-su-kien/2024_07/tvhn.jpg" title="" width="50" /></a></li>
	<li contenteditable="false"><a contenteditable="false" href="https://pek.edu.vn/uploads/hoat-dong-su-kien/2024_07/img_7669.jpg"><img alt="" contenteditable="false" height="33" src="https://pek.edu.vn/uploads/hoat-dong-su-kien/2024_07/img_7669.jpg" title="" width="50" /></a></li>
	<li contenteditable="false"><a contenteditable="false" href="https://pek.edu.vn/uploads/hoat-dong-su-kien/2024_07/img_7646.jpg"><img alt="" contenteditable="false" height="33" src="https://pek.edu.vn/uploads/hoat-dong-su-kien/2024_07/img_7646.jpg" title="" width="50" /></a></li>
	<li contenteditable="false"><a contenteditable="false" href="https://pek.edu.vn/uploads/hoat-dong-su-kien/2024_07/img_7640.jpg"><img alt="" contenteditable="false" height="33" src="https://pek.edu.vn/uploads/hoat-dong-su-kien/2024_07/img_7640.jpg" title="" width="50" /></a></li>
	<li contenteditable="false"><a contenteditable="false" href="https://pek.edu.vn/uploads/hoat-dong-su-kien/2024_07/img_7608.jpg"><img alt="" contenteditable="false" height="33" src="https://pek.edu.vn/uploads/hoat-dong-su-kien/2024_07/img_7608.jpg" title="" width="50" /></a></li>
	<li contenteditable="false"><a contenteditable="false" href="https://pek.edu.vn/uploads/hoat-dong-su-kien/2024_07/img_7599.jpg"><img alt="" contenteditable="false" height="33" src="https://pek.edu.vn/uploads/hoat-dong-su-kien/2024_07/img_7599.jpg" title="" width="50" /></a></li>
	<li contenteditable="false"><a contenteditable="false" href="https://pek.edu.vn/uploads/hoat-dong-su-kien/2024_07/img_7591.jpg"><img alt="" contenteditable="false" height="33" src="https://pek.edu.vn/uploads/hoat-dong-su-kien/2024_07/img_7591.jpg" title="" width="50" /></a></li>
	<li contenteditable="false"><a contenteditable="false" href="https://pek.edu.vn/uploads/hoat-dong-su-kien/2024_07/img_7579.jpg"><img alt="" contenteditable="false" height="33" src="https://pek.edu.vn/uploads/hoat-dong-su-kien/2024_07/img_7579.jpg" title="" width="50" /></a></li>
	<li contenteditable="false"><a contenteditable="false" href="https://pek.edu.vn/uploads/hoat-dong-su-kien/2024_07/img_7458.jpg"><img alt="" contenteditable="false" height="33" src="https://pek.edu.vn/uploads/hoat-dong-su-kien/2024_07/img_7458.jpg" title="" width="50" /></a></li>
	<li contenteditable="false"><a contenteditable="false" href="https://pek.edu.vn/uploads/hoat-dong-su-kien/2024_07/img_7444.jpg"><img alt="" contenteditable="false" height="33" src="https://pek.edu.vn/uploads/hoat-dong-su-kien/2024_07/img_7444.jpg" title="" width="50" /></a></li>
	<li contenteditable="false"><a contenteditable="false" href="https://pek.edu.vn/uploads/hoat-dong-su-kien/2024_07/4_1.jpg"><img alt="" contenteditable="false" height="33" src="https://pek.edu.vn/uploads/hoat-dong-su-kien/2024_07/4_1.jpg" title="" width="50" /></a></li>
	<li contenteditable="false"><a contenteditable="false" href="https://pek.edu.vn/uploads/hoat-dong-su-kien/2024_07/1_1.jpg"><img alt="" contenteditable="false" height="33" src="https://pek.edu.vn/uploads/hoat-dong-su-kien/2024_07/1_1.jpg" title="" width="50" /></a></li>
</ul>
</div>
</div>
</div>
</div>
</strong></div>
        </div>
    </div>
    <div id="footer" class="clearfix">
        <div id="url">
            <strong>URL của bản tin này: </strong><a href="https://pek.edu.vn/vi/hoat-dong-su-kien/savefile/hoat-dong-cua-hoc-sinh/truong-trung-tieu-hoc-petrus-ky-to-chuc-chuong-trinh-tu-van-huong-nghiep-2023-19.html" title="Trường Trung - Tiểu học Pétrus Ký tổ chức chương trình tư vấn hướng nghiệp 2023">https://pek.edu.vn/vi/hoat-dong-su-kien/savefile/hoat-dong-cua-hoc-sinh/truong-trung-tieu-hoc-petrus-ky-to-chuc-chuong-trinh-tu-van-huong-nghiep-2023-19.html</a>

        </div>
        <div class="clear"></div>
        <div class="copyright">
            &copy; PÉTRUS KÝ PRIMARY - HIGH SCHOOL
        </div>
        <div id="contact">
            <a href="mailto:pek@pek.edu.vn">pek@pek.edu.vn</a>
        </div>
    </div>
</div>

</div>
        <!-- Captcha-Modal Required!!! -->
        <div id="modal-img-captcha" class="modal fade" tabindex="-1" aria-hidden="true">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                        <div class="modal-title">Xác minh bạn không phải là Robot</div>
                    </div>
                    <div class="modal-body text-center">
                        <div class="margin-bottom">
                            <img class="captchaImg mr-1" src="https://pek.edu.vn/assets/images/pix.svg" width="150" height="40" alt="" title="" /><span class="pointer" data-toggle="change_captcha" data-obj="#modal-captcha-value" title="Thay mới"><em class="fa fa-refresh"></em></span>
                        </div>
                        <div class="margin-bottom">
                            <div>
                                <p>Mã bảo mật</p>
                                <p><input type="text" id="modal-captcha-value" value="" class="form-control display-inline-block required" maxlength="6" style="width:200px" data-toggle="enterToEvent" data-obj="#modal-captcha-button" data-obj-event="click"/></p>
                                <div class="invalid-feedback"></div>
                            </div>
                        </div>
                        <p><button type="button" id="modal-captcha-button" class="btn btn-primary">Xác nhận</button></p>
                    </div>
                </div>
            </div>
        </div>
        <div id="timeoutsess" class="chromeframe">
            Bạn đã không sử dụng Site, <a data-toggle="timeoutsesscancel" href="https://pek.edu.vn/#">Bấm vào đây để duy trì trạng thái đăng nhập</a>. Thời gian chờ: <span id="secField"> 60 </span> giây
        </div>
        <div id="openidResult" class="nv-alert" style="display:none"></div>
        <div id="openidBt" data-result="" data-redirect=""></div>
<script src="https://pek.edu.vn/assets/js/jquery/jquery.min.js"></script>
<script>var nv_base_siteurl="/",nv_assets_dir="assets",nv_lang_data="vi",nv_lang_interface="vi",nv_name_variable="nv",nv_fc_variable="op",nv_lang_variable="language",nv_module_name="hoat-dong-su-kien",nv_func_name="savefile",nv_is_user=0, nv_my_ofs=-4,nv_my_abbr="EDT",nv_cookie_prefix="nv4",nv_check_pass_mstime=59878000,nv_area_admin=0,nv_safemode=0,theme_responsive=1,nv_recaptcha_ver=2,nv_recaptcha_sitekey="",nv_recaptcha_type="image",XSSsanitize=1;</script>
<script src="https://pek.edu.vn/assets/js/language/vi.js"></script>
<script src="https://pek.edu.vn/assets/js/DOMPurify/purify.js"></script>
<script src="https://pek.edu.vn/assets/js/global.js"></script>
<script src="https://pek.edu.vn/assets/js/site.js"></script>
<script src="https://pek.edu.vn/themes/default/js/hoat-dong-su-kien.js"></script>
<script src="https://pek.edu.vn/themes/default/js/main.js"></script>
<script src="https://pek.edu.vn/themes/default/js/custom.js"></script>
<script type="application/ld+json">

        {

            "@context": "https://schema.org",

            "@type": "Organization",

            "url": "https://pek.edu.vn",

            "logo": "https://pek.edu.vn/uploads/logo_web1.png"

        }

        </script>
<script type="text/javascript" src="https://pek.edu.vn/themes/default/js/tms_menu.js"></script>
<script type="text/javascript" src="https://pek.edu.vn/assets/tms/js/swiper.js"></script>
<script>
  // Hiển thị popup với URL được truyền vào
  function showIframePopup(url) {
    const iframe = document.querySelector('.popup-iframe'); // Thay đổi id thành class
    iframe.src = url; // Gán URL cho iframe
    document.getElementById('iframe-popup').classList.remove('hidden');
  }

  // Đóng popup
  function closeIframePopup() {
    // Gửi tín hiệu đến iframe để yêu cầu đăng xuất
    const iframe = document.querySelector('.popup-iframe');
    if (iframe && iframe.contentWindow) {
        iframe.contentWindow.postMessage({ action: "logout" }, "*");
    }

    // Đóng popup
    document.getElementById('iframe-popup').classList.add('hidden');

    // Xóa URL trong iframe để giải phóng tài nguyên
    iframe.src = '';
}
  // Gắn sự kiện cho nút Đóng
  document.getElementById('close-popup').addEventListener('click', closeIframePopup);

  // Gắn sự kiện cho các liên kết trong menu
  document.addEventListener('DOMContentLoaded', function () {
    const popupLinks = document.querySelectorAll('.popup-link');
    popupLinks.forEach(function (link) {
      link.addEventListener('click', function (e) {
        e.preventDefault(); // Ngăn chuyển hướng trang
        const url = link.getAttribute('data-url'); // Lấy URL từ thuộc tính data-url
        showIframePopup(url); // Hiển thị popup với URL tương ứng
      });
    });
  });

  // Lắng nghe sự kiện nhấn phím Esc để đóng popup
  document.addEventListener('keydown', function (e) {
    if (e.key === 'Escape') { // Kiểm tra nếu phím được nhấn là Esc
      closeIframePopup();
    }
  });
</script>
<script>
  function showXPopup(url, sizeClass) {
    const content = document.querySelector('.xpopup-content');
    const iframe = document.querySelector('.xpopup-iframe');

    // Xóa kích thước cũ
    content.classList.remove('popup-small', 'popup-medium', 'popup-large');

    // Thêm kích thước mới
    if (sizeClass) content.classList.add(sizeClass);

    iframe.src = url;
    document.getElementById('xpopup-container').classList.remove('hidden');
  }

  function closeXPopup() {
    const iframe = document.querySelector('.xpopup-iframe');
    if (iframe && iframe.contentWindow) {
      iframe.contentWindow.postMessage({ action: "logout" }, "*");
    }
    document.getElementById('xpopup-container').classList.add('hidden');
    iframe.src = '';
  }

  document.getElementById('xpopup-close-btn').addEventListener('click', closeXPopup);

  document.addEventListener('DOMContentLoaded', function () {
    const navType = performance.getEntriesByType("navigation")[0]?.type || performance.navigation.type;

    // ==== Auto mở nếu không phải reload ====
    if (
      (typeof navType === 'string' && navType !== 'reload') || 
      (typeof navType === 'number' && navType !== 1)
    ) {
      if (!sessionStorage.getItem('hasShownPopup')) {
        const autoLink = document.querySelector('.xpopup-link-0');
        if (autoLink) {
          const url = autoLink.getAttribute('data-url');
          const size = autoLink.getAttribute('data-size') || 'medium';
          if (url) {
            setTimeout(function () {
              showXPopup(url, 'popup-' + size);
            }, 3000);
            sessionStorage.setItem('hasShownPopup', 'true');
          }
        }
      }
    }

    // ==== Gắn sự kiện mở popup thủ công ====
    document.querySelectorAll('.xpopup-link').forEach(function(link) {
      link.addEventListener('click', function(e) {
        e.preventDefault();
        const url = link.getAttribute('data-url');
        const size = link.getAttribute('data-size') || 'medium';
        showXPopup(url, 'popup-' + size);
      });
    });
  });

  // Đóng popup bằng ESC
  document.addEventListener('keydown', function (e) {
    if (e.key === 'Escape') {
      closeXPopup();
    }
  });
</script>
<script>
// === Nhận message từ iframe ===
window.addEventListener('message', function(event) {
  if (!event.data || typeof event.data !== 'object') return;

  // --- MỞ POPUP MỚI ---
  if (event.data.action === 'showXPopup') {
    closeXPopup?.(); // đóng popup cũ nếu có

    const popupSize = event.data.size || 'popup-medium';
    showXPopup(event.data.url, popupSize);
  }

  // --- CẬP NHẬT POPUP ĐANG MỞ ---
  else if (event.data.action === 'updateXPopup') {
    const popup = document.querySelector('.xpopup');
    const iframe = popup?.querySelector('iframe');
    const popupContent = popup?.querySelector('.xpopup-content');

    if (popup && iframe) {
      // chỉ đổi nội dung, không đóng overlay
      iframe.src = event.data.url;

      // nếu có kích thước mới, đổi class luôn
      if (event.data.size) {
        popupContent.classList.remove('popup-small', 'popup-medium', 'popup-large');
        popupContent.classList.add(event.data.size);
      }
    }
  }
});

// === Hàm mở popup ===
function showXPopup(url, size = 'popup-medium') {
  const popup = document.querySelector('.xpopup');
  const popupContent = popup.querySelector('.xpopup-content');
  const iframe = popup.querySelector('iframe');

  // reset kích thước & src
  popupContent.classList.remove('popup-small', 'popup-medium', 'popup-large');
  popupContent.classList.add(size);
  iframe.src = url;

  popup.classList.remove('hidden'); // hiện popup + overlay
}

// === Hàm đóng popup ===
function closeXPopup() {
  const popup = document.querySelector('.xpopup');
  const iframe = popup.querySelector('iframe');
  iframe.src = ''; // clear để ngắt nội dung
  popup.classList.add('hidden'); // ẩn popup
}

// Nút đóng
document.addEventListener('DOMContentLoaded', () => {
  document.querySelector('.xpopup-close')?.addEventListener('click', closeXPopup);
});
</script>
<script src="https://pek.edu.vn/assets/tms/js/bootstrap.min.js"></script>
</body>
</html>