',
'
'];
var sizeLR = [sizeLeft,sizeRight],
bottoms = ['-620px','-620px','-270px','-150px','-150px','-150px'],
path = vid+"ads/",numImg,numSize,linkDirect,multiAd;
var direct = ['//chalaips.com/4/6013052','//gloacmug.net/4/5907700','//whairtoa.com/4/5907701','//nossairt.net/4/5907699','//augailou.com/4/5293583','//dukingdraon.com/4/5293582','//intorterraon.com/4/4637268','//naipsouz.net/4/5305006'];
var g24Ads = ['https://bit.ly/3nDf897'],
propellerAds = ['https://propellerads.com/publishers/?ref_id=mA5t'],
exoClick = ['https://www.exoclick.com/signup/?login=phim79ad'],
pushAds = ['https://pub.pushtimize.com?ref=phim79ad','http://vipads.cc/index/v/index?uid=14344'];
g24Ads.push(direct);
propellerAds.push(direct);
exoClick.push(direct);
pushAds.push(direct);
function redirect() {
numSize = isMobile()? 3: Math.floor(Math.random() * (imgs.length - 2)) + 2;//size ngau nhien tu so 2
multiAd = path+multi[numSize];
numImg = Math.floor(Math.random() * imgs[numSize].length);//image ngau nhien
if(numImg<=5)
linkDirect = g24Ads[Math.floor(Math.random() * g24Ads.length)];
else if(numImg==6)
linkDirect = propellerAds[Math.floor(Math.random() * propellerAds.length)];
else if(numImg==7)
linkDirect = exoClick[Math.floor(Math.random() * exoClick.length)];
else
linkDirect = pushAds[Math.floor(Math.random() * pushAds.length)];
}
function jq_show() {
jQuery(document).ready(function() {
redirect();
var sizeDiv = sizeLR[Math.floor(Math.random() * sizeLR.length)][numSize];
jQuery('body').prepend(sizeDiv+'
');
Math.floor(Math.random() * 2)==0?vast_show('phim79-sli'):setTimeout(function(){jq_hide();jq_show();},10000);//10s
jQuery('#phim79-sli').css('bottom', bottoms[numSize]);
var space = 0;
if(numSize<2)
space=(jQuery(window).height() - 615) / 2;
jQuery('#phim79-sli').animate({bottom:space}, 5000);
});
}
function jq_hide() {
document.getElementById('phim79-sli').remove();
}
function vast_show(idPlay) {
var divAdSlider = document.getElementById(idPlay);
var sliderVast = document.createElement('iframe');
sliderVast.setAttribute('style', 'position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;border:0;z-index:100');
sliderVast.setAttribute('scrolling', 'no');
sliderVast.setAttribute('allow', 'accelerometer;encrypted-media;gyroscope;picture-in-picture');
divAdSlider.appendChild(sliderVast);
if(Math.floor(Math.random() * 6) == 0) {
sliderVast.setAttribute('src', path+"ad.html");
var sliderInterval = setInterval(function() {
var nameClass = sliderVast.contentWindow.document.getElementById('inspectorPlayer').className;
if(nameClass!=""&&nameClass!="inspectorPlayer") {
clearInterval(sliderInterval);
sliderVast.setAttribute('src', multiAd);
}
},1000);//1s
} else {
sliderVast.setAttribute('src', multiAd);
}
document.getElementById('phim79-ban').remove();
setTimeout(function(){jq_hide();jq_show();},30*60000);//30m
}
function hide_left_right() {
document.getElementById('phim79-left').remove();
document.getElementById('phim79-right').remove();
}
function show_left_right(id, size, ad) {
jQuery(document).ready(function() {
jQuery('body').prepend(size+'
');
jQuery(id).css('bottom', bottoms[1]);
var space = (jQuery(window).height() - 615) / 2;
jQuery(id).animate({bottom:space}, 5000);
});
}
if (jQuery(window).width() >= 1600) {
show_left_right('#phim79-left', sizeLR[0][0], path+"1.html");//left
show_left_right('#phim79-right', sizeLR[1][0], path+"2.html");//right
} else {
jq_show();
}