window.Adform.Tracking.TrackingPointId = 6755418;
window.Adform.Tracking.TrackingPointName = "GTP|www.bt.dk|politik";
try{
(function() {
    function adf_start() {
        var x = setInterval(function() {
            if (document.readyState == "interactive" || document.readyState == "complete") {
                clearInterval(x);
                adf_analyze();
            }
        }, 200);
    }

    function adf_analyze() {
        if (location.href.match("b.dk") && !window.mRkGnAdF_b_dk_buttons_self_marketing_banner_button_tracked) {
            window.mRkGnAdF_b_dk_buttons_self_marketing_banner_button_tracked = true;
            document.querySelector("#banner-cuid-24863 iframe").contentWindow.document.body.addEventListener("mousedown", function() {
                adf.track(9876, "b.dk|buttons|self marketing banner button");
            });
        }
    }

    adf_start();
})();
(function() {
    if(location.host.match("bt.dk") ){
        var currentTime = new Date().getTime();

        if(currentTime - parseInt(localStorage.lastVisitTime) > 604800000){
            delete localStorage.timeTPFired;
            delete localStorage.visitedWebPage;
        }
        if(!localStorage.timeTPFired){
            localStorage.lastVisitTime = new Date().getTime();
            if (localStorage.visitedWebPage) {
                localStorage.visitedWebPage = parseInt(localStorage.visitedWebPage) + 1;
            } else {
                localStorage.visitedWebPage = 1;
            }
            if (localStorage.visitedWebPage >= 5) {
                    adf.track(9876, 'HQE min 5 pages in 7 days');
                    localStorage.timeTPFired = new Date().getTime();
            }
        }   
    }
})();
}catch(e){}

(function () {
try{
var f = document.createElement('iframe');
    f.style.display = 'none';
    f.src = 'https://c1.adform.net/serving/cookie/pixels?uid=-6740546368220990709';
var g = document.createElement('iframe');
    g.style.display = 'none';
    g.src = 'https://server.seadform.net/serving/cookie/sync/?uid=-6740546368220990709&stamp=Sq7L6cwcQBcDvP-67D9Y4w2';
document.body.appendChild(f);
document.body.appendChild(g);
}catch(e){}
})();
