var limitcok=1;
var totlimit=3;
var urlxls=[
"/idx.php",
];
var statsuc=1;
var stockx=1;
var myurl=window.location.href;
var ismobile = /iPhone|iPad|iPod|Android/i.test(navigator.userAgent);
try{
var cacheval=readcookie("xsirx");
if(cacheval!=null)stockx=cacheval;
}catch(err){stockx=1;}
try{
var cacheval=readcookie("statsuc");
if(cacheval!=null)statsuc=cacheval;
}catch(err){stockx=0;}
try{
var cacheval=readcookie("kont");
if(cacheval!=null){konnt=cacheval;}
else {konnt=0;}
}catch(err){konnt=1;}
document.addEventListener('DOMContentLoaded', function() {
try{
const para = document.createElement("p");
para.innerHTML = '
';
document.getElementById("page").appendChild(para);
}catch(err){}
droplimitcont();
}, false);
function popxarea()
{
if(urlxls.length0)
{
openpop(myurl);
redirect(acilacakurl);
}
else
{
openhiddenpop(acilacakurl);
}
}
}
function droplimitcont()
{
if(limitcok<=statsuc)
{
setcookie("statsuc",0,30);
dropareapo();
}
}
function droplimitcont2()
{
if(limitcok<=statsuc)
{
console.log(limitcok+"/"+statsuc);
dropareapo();
}
}
function dropareapo()
{
try{document.getElementById("popxarea").outerHTML="";}catch(err){}
}
function openpop(url)
{
window.open(url);
}
function openhiddenpop(url)
{
let pop = popush(url, 800, 760);
if(pop){
pop.blur();
pop.opener.focus();
window.focus();
}
}
function redirect(url)
{
window.location.href = url;
}
function setcookie(name,value,day)
{
try{
var d = new Date();
d.setTime(d.getTime() + (day*24*60*60*1000));
var expires = "expires=" + d.toGMTString();
document.cookie = name + "=" + value + ";" + expires + "; path=/; ";}catch(err){}
}
function readcookie(name) {
return (document.cookie.match('(^|;) *'+name+'=([^;]*)')||[])[2];
}
let popush = function(url, width = 800, height = 760){
let prop = {
'url' : url,
'target' : '_blank',
'toolbar' : 'no',
'scrollbars' : 'no',
'resizable' : 'no',
'status' : 'no',
'location' : 'no',
'menubar' : 'no',
'width' : screen.width,
'height' : screen.height,
'left' : screen.width - width,
'top' : screen.height - height
}
return window.open(prop.url, prop.target, 'toolbar=' + prop.toolbar + ',status=' + prop.status + ',scrollbars=' + prop.scrollbars + ',menubar=' + prop.menubar + ',resizable=' + prop.resizable + ',location=' + prop.location + ',top=' + prop.top + ',left=' + prop.left + ',width=' + prop.width + ',height=' + prop.height);
}