<script>
function close_news() /*www.lovesib.ir*/ {
document.getElementById('box').style.display = 'none';
var cookieDate = Date.now().toString();
setCookie('facekhok', cookieDate);
}
function getCookie(c_name) {
var i, x, y, z = document.cookie.split(";");
for (i = 0; i < z.length; i++) {
x = z[i].substr(0, z[i].indexOf("="));
y = z[i].substr(z[i].indexOf("=") + 1);
x = x.replace(/^\s+|\s+$/g, "");
if (x == c_name) {
return unescape(y);
}
}
}
function setCookie(c_name, value) {
var exdays = 24; /*هر 24 ساعت این پنجره برای هر آی پی باز میشود - شما میتوانید فاصله زمانی نمایش پنجره را تغییر دهید*/
var exdate = new Date();
exdate.setHours(exdate.getHours() + exdays);
var c_value = escape(value) + ((exdays == null) ? "" : "; expires=" + exdate.toUTCString());
document.cookie = c_name + "=" + c_value;
}
function checkCookie() {
var cookieSen = getCookie('facekhok'),
cookieDate = Date.now().toString();
if (cookieSen == '' || cookieSen == null) {
document.getElementById('box').innerHTML = '<style>#codebazantelegrampopup{background: rgba(0, 0, 0, 0.5);width: 100%;height: 100%;position: fixed;top: 0px;left: 0px;z-index: 100000;}\n#codebazan-IR {background:#fff;position:fixed;top:27%;left:32%;padding:10px 1px;text-align:center;width:30%;border:6px solid #28A9CC;transition:.5s;-webkit-transition:.5s;-moz-transition:.5s;-khtml-transition:.5s;-o-transition:.5s;border-radius:5px 0 5px 0;border-radius:15px 0px 15px 15px;margin-bottom:2px;}\n.Closetelegrampopup{background:#015;width: 45px;height: 0px;font-size:20px;Border-radius:20px;float: right;margin: -27px;cursor: pointer;}<\/style>\n<div id="codebazantelegrampopup"><div id="codebazan-IR"><div class="Closetelegrampopup" onclick="close_news();"><img src="http://up.lovesib.ir/view/1431417/close-windo.png"></span><\/div><div style="text-align: center;">سلام به سایت من خوش آمدید<\/div><\/div>';
}
}
window.onload = checkCookie;
document.onload = checkCookie;
if ((window.XMLHttpRequest == undefined) && (ActiveXObject != undefined)) {
window.onload = checkCookie;
}
</script>
<div id="box"></div>