function getIndex() {}
function getTop() {}
function getFly() {}
function getAd() {}
function getbftxt() {}
function getAnList() {}
function getBottomFly() {}
function getWorldCup() {}
function initLocation() {
    var r = getQueryVariable("my"), u = getQueryVariable("cnz"), n, t, i;
    if (!CheckEmpty(r) && r.toLowerCase() == "ad") {
        console.log(1);
        isShow = !0;
        return
    }
    if (n = (navigator.browserLanguage || navigator.language).toLowerCase(),
    (_moduleKey == "Thai" || _moduleKey == "Vn" || _moduleKey == "Kor") && (n == "zh-tw" || n == "zh-cn" || n == "zh-hk")) {
        console.log(2);
        isShow = !0;
        return
    }
    if ((_moduleKey == "Thai" && n.includes("th") || _moduleKey == "Vn" && n.includes("vi") || _moduleKey == "Kor" && n.includes("ko") || _moduleKey == "Ind" && n.includes("id")) && CheckEmpty(u) && !document.URL.includes("shtml")) {
        console.log(3);
        isShow = !0;
        return
    }
    // t = zXmlHttp.createRequest();
    // t.open("get", "/ajax/IPchecker/?" + Date.parse(new Date), !0);
    // t.send(null);
    // i = t.responseText;
    // i != "" && (parseInt(i.split(",")[0]) == 1 && (isShow = !0),
    // _adLoc = parseInt(i.split(",")[1]))

    _adLoc = 0;
    isShow = !0;
    getFly()
}
function getbftxt(n) {
    var t, r, i;
    if (isShow && (t = AdModel[n].adinfo,
    t))
        for (r = 0,
        i = 0; i < t.length; i++)
            t[i].Type == 2 && (adinfo1[r] = t[i].URL,
            adinfo2[r] = t[i].Text,
            r++)
}
function initEcAd() {
    var n = document.getElementById("AdLayer1")
      , t = document.getElementById("AdLayer2");
    n && t && (n.style.top = -200,
    n.style.visibility = "visible",
    t.style.top = -200,
    t.visibility = "visible",
    MoveLeftLayer("AdLayer1"),
    MoveRightLayer("AdLayer2"),
    AdModel.IsIos && MoveBottomLayer())
}
function getTopLength() {
    return document.documentElement && document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body ? document.body.scrollTop : window.pageYOffset
}
function MoveLeftLayer(n) {
    var t = parseInt(getTopLength())
      , i = document.getElementById("newtop")
      , r = i.offsetLeft - 80;
    document.getElementById(n).style.left = parseInt(r) + "px";
    document.getElementById(n).style.top = t > 290 ? t + 10 + "px" : "260px";
    setTimeout("MoveLeftLayer('" + n + "');", 20)
}
function MoveRightLayer(n) {
    var t = parseInt(getTopLength())
      , i = document.getElementById("newtop")
      , r = i.offsetLeft + i.clientWidth + 10;
    document.getElementById(n).style.left = parseInt(r) + "px";
    document.getElementById(n).style.top = t > 290 ? t + 10 + "px" : "260px";
    setTimeout("MoveRightLayer('" + n + "');", 20)
}
function closead(n) {
    document.getElementById("AdLayer" + n).style.display = "none"
}
function getFly(n) {
    if (isShow) {
        var t = "flyleft"
          , i = "flyright";
        n == 1 && (t = "sche_flyleft",
        i = "sche_flyright");
       // document.write("<div id='AdLayer1' style='position: absolute;z-index:1;width:70px;top: 25px;'>" + AdModel.GetList("en", t, "", "margin-bottom:5px;") + "<\/div><div id='AdLayer2' style='position: absolute; z-index:1;width:70px;top:25px;'>" + AdModel.GetList("en", i, "", "margin-bottom:5px;") + "<\/div>");
        initEcAd(1)
    }
}
function getAn(n) {
    isShow && AdModel.WriteList(n, "analyze", "", "margin-bottom:5px;")
}
function getIndex(n, t) {
    if (isShow)
        return AdModel.WriteList(n, t, "<br/>")
}
function getAd(n, t) {
    if (isShow) {
        var i = "";
        return t == "topleft" && (i = "margin-right:14px;"),
        AdModel.WriteList(n, t, "", i)
    }
}
function getTop(n) {
    isShow && AdModel.WriteList("top", n, "")
}
function getHome(n) {
    if (isShow)
        return AdModel.WriteList("en", n)
}
function getPageId(n) {
    return sqReg.test(n) ? n.match(sqReg)[1] : sqReg2.test(n) ? n.match(sqReg2)[1] : void 0
}
function getNewsAD(n) {
    if (isShow && (n = "right1"))
        return AdModel.WriteList("en", "ad_" + n, "", "margin-bottom:5px;'", 215)
}
function getAnalysisFly(n) {
    isShow && (document.write("<div id='AdLayer5' style='position: absolute;visibility:hidden;z-index:1;width:70px;'>" + AdModel.GetList(n, "flyleftAn", "", "margin-bottom:5px;") + "<\/div><div id='AdLayer7' style='position: absolute;visibility:hidden;z-index:1;width:70px;'>" + AdModel.GetList(n, "flyrightAn", "", "margin-bottom:5px;") + "<\/div>"),
    initEcAd(3))
}
function getNBAFly(n) {
    isShow && (document.write("<div id='AdLayer6' style='position: absolute;visibility:hidden;z-index:1;width:70px;'>" + AdModel.GetList(n, "flyleftNBA", "", "margin-bottom:5px;") + "<\/div>"),
    initEcAd(4))
}
function getAnList(n) {
    isShow && AdModel.WriteList("en", n)
}
function getEventAnList(n, t) {
    isShow && AdModel.WriteList(n, t)
}
function getAdHtml(n, t) {
    return isShow ? AdModel.GetList(n, t, "") : ""
}
function getBottomFly() {
    isShow && (AdModel.IsIos ? document.write("<div id='bottomFly' style='width:710px;position: absolute;z-index:1;bottom: 0;'><div class='flyClose' onclick='CloseAdById(\"bottomFly\",false)'><\/div>" + AdModel.GetList("en", "flybottom", "", "margin-bottom:5px;") + "<\/div>") : document.write("<div id='bottomFly' style='width:710px;position: fixed;z-index:1;bottom: 0;left: 50%;transform: translateX(-50%);'><div class='flyClose' onclick='CloseAdById(\"bottomFly\",false)'><\/div>" + AdModel.GetList("en", "flybottom", "", "margin-bottom:5px;") + "<\/div>"))
}
function CloseAdById(n, t) {
    document.getElementById(n) && (document.getElementById(n).style.display = "none");
    t && writeShareCookie("CloseAdKey_" + n, 1, new Date((new Date).getTime() + 864e5))
}
function getWorldCup(n, t, i) {
    if (isShow)
        return AdModel.WriteList(n, t, "", i)
}
function MoveBottomLayer() {
    if (document.getElementById("ad_middle_bottom")) {
        var n = parseInt(getTopLength());
        document.getElementById("bottomFly").style.top = n + window.innerHeight - 55 + "px";
        setTimeout("MoveBottomLayer();", 20)
    }
}
var adinfo1 = [], adinfo2 = [], admiddleCount = 0, isShow = !1, _adLoc = 0, sqReg, sqReg2;
initLocation();
var adinfo1 = []
  , adinfo2 = []
  , adinfo3 = []
  , admiddleCount = 2
  , adVerticalOffset = {
    OsIndex_Left: 1920,
    Os2in1_Left: 1024,
    Os2in1: 616,
    OsIndex: 490
}
  , AdModel = {};
AdModel.en = "";
AdModel.top = "";
AdModel.IsMobile = /(iphone|ipad|ios|itouch|android)/.test(window.navigator.userAgent.toLowerCase());
AdModel.IsIos = /(iphone|ipad|ios|itouch)/.test(window.navigator.userAgent.toLowerCase());
AdModel.PicAd = function(n, t, i, r, u) {
    this.Type = 1;
    this.URL = n;
    this.PicURL = t;
    this.Width = r ? r : null;
    this.Height = u ? u : null;
    this.Title = i ? i : "";
    this.HTML = function(n, t, i, r) {
        var u;
        t || (t = this.Width);
        i || (i = this.Height);
        var o = t ? "width=" + t : ""
          , s = i ? "height=" + i : ""
          , n = n ? "style='" + n + "'" : ""
          , f = this.URL
          , e = this.PicURL;
        return r && (u = `https://${__APP_DOMAIN__}/`,
        /ad\/\d+/.test(this.URL) && (f = u + this.URL),
        e = u + this.PicURL),
        "<a href='" + f + "' target='_blank' title='" + this.Title + "' rel=nofollow><img src='" + e + "' " + o + " " + s + " " + n + "/><\/a>"
    }
}
;
AdModel.TxtAd = function(n, t, i, r) {
    this.Type = 2;
    this.URL = n;
    this.Text = t;
    this.Title = i;
    this.Color = r
}
;
AdModel.GetAdArr = function() {
    return [//"en^flybottom^/ad/1206.html^https://img_thscore.thscore.fun/mn/20231220084855.gif^^710^45",
        // "en^middle_M1^#^https://placehold.co/710x35/999999/000000^^710^35",
        // "en^middle_M2^#^https://placehold.co/710x35/999999/000000^^710^35",
        // "en^middle_M3^#^https://placehold.co/710x35/999999/000000^^710^35",
            // "en^flybottom^#^https://dev-ui.bongdalu.moi/assets/football-vn/images/banners/Debet_Wolves_Gif_710x45.webp",
            // "en^flybottom^#^https://dev-ui.bongdalu.moi/assets/football-vn/images/banners/pc-catfish2-710x45.gif?1"
        ];
    // return [];
    return ["top^top^/ad/123.html^https://img_thscore.thscore.fun/mn/20230311165139.gif^^350^45", "top^top^/ad/728.html^https://img_thscore.thscore.fun/mn/20231204173915.gif^^700^45", "top^middle_1^/ad/125.html^https://img_thscore.thscore.fun/mn/20220404150623.gif^^528^45", "top^middle_1^/ad/126.html^https://img_thscore.thscore.fun/mn/20220404150451.gif^^528^45", "top^middle_2^/ad/1118.html^https://img_thscore.thscore.fun/mn/20210830084903.gif^^^", "top^middle_2^/ad/1119.html^https://img_thscore.thscore.fun/mn/20210830084923.gif^^353^", "en^middle_3^/ad/116.html^https://img_thscore.thscore.fun/mn/20200704144345.gif^^710^45", "en^flyleft^/ad/110.html^https://img_thscore.thscore.fun/mn/20230831085834.gif^^^", "en^flyleft^/ad/400.html^https://img_thscore.thscore.fun/mn/20231219160454.gif^^^", "en^flyright^/ad/401.html^https://img_thscore.thscore.fun/mn/20221007151918.gif^^70^270", "en^flyright^/ad/253.html^https://img_thscore.thscore.fun/mn/20231219173606.gif^^^", "en^left_1^/ad/113.html^https://img_thscore.thscore.fun/mn/20231219160818.gif^^^", "en^left_2^/ad/114.html^https://img_thscore.thscore.fun/mn/20240102190629.gif^^^", "en^left_3^/ad/115.html^https://img_thscore.thscore.fun/mn/20230831085742.gif^^^", "en^left_4^/ad/127.html^https://img_thscore.thscore.fun/mn/20231219160344.gif^^^", "en^left_5^/ad/128.html^https://img_thscore.thscore.fun/mn/20240102185055.gif^^^", "en^right_1^/ad/117.html^https://img_thscore.thscore.fun/mn/20210926205634.gif^^^", "en^right_1^/ad/131.html^https://img_thscore.thscore.fun/mn/20230926162753.gif^^^", "top^del_middle_1^/ad/1124.html^https://img_thscore.thscore.fun/mn/20231219162358.gif^^1056^45", "en^right_float^/ad/118.html^https://img_thscore.thscore.fun/mn/20230330150608.gif^^^", "en^right_float^/ad/121.html^https://img_thscore.thscore.fun/mn/20211003212322.gif^^^", "en^right_float^/ad/122.html^https://img_thscore.thscore.fun/mn/20240111181113.gif^^^", "en^right_float^/ad/248.html^https://img_thscore.thscore.fun/mn/20230226130307.gif^^^", "en^d1^/ad/402.html^https://img_thscore.thscore.fun/mn/20220112172021.gif^^1040^45", "top^ana_middle_1^/ad/1125.html^https://img_thscore.thscore.fun/mn/20231219162151.gif^^1040^45", "en^l1^/ad/399.html^https://img_thscore.thscore.fun/mn/20231201153747.gif^^1040^45", "en^l2^/ad/566.html^https://img_thscore.thscore.fun/mn/20231220170536.gif^^1040^45", "en^l3^/ad/567.html^https://img_thscore.thscore.fun/mn/20231220173654.gif^^1040^45", "en^left_float^/ad/598.html^https://img_thscore.thscore.fun/mn/20240115121358.gif^^155^80", "en^left_float^/ad/599.html^https://img_thscore.thscore.fun/mn/20240110142957.gif^^^", "en^left_float^/ad/600.html^https://img_thscore.thscore.fun/mn/20240117163300.gif^^^", "en^left_float^/ad/601.html^https://img_thscore.thscore.fun/mn/20211215094938.gif^^^", "en^flybottom^/ad/1206.html^https://img_thscore.thscore.fun/mn/20231220084855.gif^^710^45", "en^middle_M1^/ad/1207.html^https://img_thscore.thscore.fun/mn/20220226084521.gif^^710^35", "en^middle_M2^/ad/1250.html^https://img_thscore.thscore.fun/mn/20220723125403.gif^^710^35"]
}
;
AdModel.GetAdTxtArr = function() {
    return [
        // "en^adinfo^https://debet.net/?a=969c74563aa70b1b924461ae6e084832&utm_source=bongdakomoi&utm_medium=textlink&utm_campaign=cpd&utm_term=bong^DEBET - ĐUA TOP EURO NHẬN 500 TRIỆU - THAM GIA NGAY",
        // "en^adinfo^https://red88.tv/?a=917326942f484247df1f60e3a4f74469&utm_source=bongdakomoi&utm_medium=textlink2&utm_campaign=cpd&utm_term=bong^RED88 - THƯỞNG NẠP 30M MỖI TUẦN - HOÀN TRẢ VÔ TẬN 1.5% - CHƠI NGAY",
        // "en^adinfo^https://zbet.top/?a=21e04dde75fe3dae22bcc01967c69ecc&utm_source=bongdakomoi&utm_medium=textlink&utm_campaign=cpd&utm_term=bong^ZBET - THẮNG LỚN EURO - NHẬN SIÊU HOÀN TRẢ 70% - NHẬN NGAY",
        // "en^adinfo^https://sin88.me/?a=2d9a2311d64c642cb2dfaefb7f5c9190&utm_source=bongdakomoi&utm_medium=textlink&utm_campaign=cpd&utm_term=bong^SIN88 - CẬP NHẬP TỶ LỆ KÈO EURO 2024 MỚI NHẤT - XEM NGAY",
        // "en^adinfo^#^3. SĂN VÉ CHUNG KẾT EURO FREE TẠI ĐÂY",
        // "en^adinfo^#^4. DEBET HOÀN TRẢ 1.5% K GIỚI HẠN",
        // "en^adinfo^#^5. DEBET - CƯỢC NHANH TAY SĂN NGAY VÉ CHUNG KẾT EURO 2024",

        // "en^adinfo^/ad/104.html^Tip88 รับฟรีเครดิต XXX บาท เมื่อเป็นเพื่อนกับเรา คลิก : XXXXXX",
        // "en^adinfo^/ad/104.html^Tip88 ฝากครั้งแรก รับ XX เท่า เทิร์นน้อย คลิก XXX",
        // "en^adinfo^/ad/104.html^Tip88 รับโบนัสเงินฝาก 50% ทุกวันหยุด สำหรับคอบอล",
        // "en^adinfo^/ad/104.html^โบนัสเงินฝาก 200% สำหรับเกมสลอต เท่านั้น คลิก XXX",
        // "en^adinfo^/ad/104.html^เติมครบ XXX รอบสัปดาห์ รับฟรีสปิน XXX ครั้ง ฟรี!! คลิก XXX",
        // "en^adinfo^/ad/104.html^คืนเงินพนันกีฬารายวัน สูงสุด XXX% ไม่ต้องทำเทิร์น ไม่จำกัดยอดจ่าย",
        // "en^adinfo^/ad/104.html^โปรบอลสเต็ป แค่ฝากลุ้นรับ XXXXX ทันที!",
        // "en^adinfo^/ad/104.html^คืนเงินรายวันสูงสุดถึง XXX% ไม่จำกัดการจ่าย ไม่ต้องทำเทิร์น",
        // "en^adinfo^/ad/104.html^คาสิโนสด, กีฬา คืนโบนัสจากยอดวางเดิมพันรายสัปดาห์ XXX%",

        // "en^adinfo^/ad/104.html^UFAC4 ฝาก-ถอน ระบบ AUTO 10 วิ สมัคสมาชิกใหม่ ฝาก 1,000รับ 1,500 ทันที ลุ้นกิจกรรมแจกเงินสด 5,000,000 บาท ต่อวัน",
        // "en^adinfo^/ad/105.html^🟧 188BET ที่เดียวจบครบทุกลีก 🟧 ยูสใหม่ฝาก 100 ฟรี 500 บาท 🟧 รับโบนัสที่ @188ASIATH 🟧",
        // "en^adinfo^/ad/106.html^ดาวน์โหลดแอพ bwin รับ 1,888 บาทฟรี ถอนเข้าธนาคารได้ ระบบดีสุดในไทย",
        // "en^adinfo^/ad/107.html^UFA191 ฝาก-ถอน ระบบ AUTO 30  วินาที แทงบอล คาสิโนออนไลน์ มวย หวย สล๊อต ครบวงจร !!"
    ]
}
;
AdModel.setTxtTag = function(n, t) {
    var i = n % 2 == 0 ? "ad-txt-red" : "ad-txt-blue";
    return "<span class='" + i + "'>" + t.replace(/<[^>]+>/g, "").replace("QC: ", "") + "<\/span>"
}
;
AdModel.BuildAdList = function() {
    for (var n, i = AdModel.GetAdArr(), t = 0; t < i.length; t++)
        n = i[t].split("^"),
        AdModel[n[0]] || (AdModel[n[0]] = {}),
        AdModel[n[0]][n[1]] || (AdModel[n[0]][n[1]] = []),
        AdModel[n[0]][n[1]].push(new AdModel.PicAd(n[2],n[3],n[4],n[5],n[6]));
    for (i = AdModel.GetAdTxtArr(),
    t = 0; t < i.length; t++)
        n = i[t].split("^"),
        AdModel[n[0]] || (AdModel[n[0]] = {}),
        AdModel[n[0]][n[1]] || (AdModel[n[0]][n[1]] = []),
        AdModel[n[0]][n[1]].push(new AdModel.TxtAd(n[2],AdModel.setTxtTag(t, n[3]),n[4],n[5]))
}
;
AdModel.GetList = function(n, t, i, r, u, f, e) {
    var h = [], s, o;
    if (AdModel[n] && AdModel[n][t])
        for (s = AdModel[n][t],
        o = 0; o < s.length; o++)
            h.push(s[o].HTML(r, u, f, e));
    return h.join(i)
}
;
AdModel.WriteList = function(n, t, i, r, u, f) {
    document.write(this.GetList(n, t, i, r, u, f))
}
;
AdModel.BuildAdList();
AdModel.en && AdModel.en.right_1 && (adVerticalOffset.Os2in1 = adVerticalOffset.Os2in1 + AdModel.en.right_1.length * 84,
adVerticalOffset.OsIndex = adVerticalOffset.OsIndex + AdModel.en.right_1.length * 84);
sqReg = /(\d*).html/;
sqReg2 = /=(\d*)/
