var UserAlertWidget = { StartWidget: function () { if (1==1) { var today = new Date(); today.setTime(today.getTime()); var cookie_expire_date = new Date(today.getTime() + 8 * 60 * 60 * 1000); //x hours function setCookie(name, value, expires, path, domain, secure) { document.cookie= name + "=" + escape(value) + ((expires) ? "; expires=" + expires.toGMTString() : "") + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + ((secure) ? "; secure" : ""); } function getCookie(name) { var dc = document.cookie; var prefix = name + "="; var begin = dc.indexOf("; " + prefix); if (begin == -1) { begin = dc.indexOf(prefix); if (begin != 0) return null; } else { begin += 2; } var end = document.cookie.indexOf(";", begin); if (end == -1) { end = dc.length; } return unescape(dc.substring(begin + prefix.length, end)); } var _ckx = getCookie('A_C'); if (!_ckx) { UserAlertWidget.ShowWidget(); } setCookie('A_C','1', cookie_expire_date); } else { UserAlertWidget.ShowWidget(); } }, ShowWidget: function () { user_alert_style = '#new_user_alert_dbltch{font-family:Arial, "Helvetica CY", "Nimbus Sans L", sans-serif !important;display: none;left: 20px !important;bottom:5px; position:fixed; z-index:999;direction: ltr;font-size: 13px !important;}'+ '#new_user_alert_dbltch a,#new_user_alert_dbltch img{font-family:Arial, "Helvetica CY", "Nimbus Sans L", sans-serif !important;text-decoration:none !important;outline:none !important;border:none !important;margin:0 !important;padding:0 !important;};#new_user_alert_dbltch #new_user_alert_popup .new_user_alert_box_rtl{direction:rtl !important;}'+ '#new_user_alert_dbltch #new_user_alert_popup .new_user_alert_box_rtl .fl{float:right;}'+ '#new_user_alert_dbltch .new_user_alert_close_rtl{left: 3px !important;right:auto !important;}'+ '#new_user_alert_dbltch #new_user_alert_popup .new_user_alert_box_rtl .new_user_alert_new{left: auto;right: 100px;padding-right:15px;padding-left: 0;}'+ '#new_user_alert_dbltch #new_user_alert_popup .new_user_alert_box_rtl .new_user_alert_new:before{left: auto;right: 0;}'+ '#new_user_alert_dbltch #new_user_alert_popup .new_user_alert_box_rtl .new_user_alert_cont{margin: 27px 100px 0 0px;text-align: right;}'+ '#new_user_alert_dbltch .new_user_alert_block {z-index:101;font-size: 13px;}'+ '#new_user_alert_dbltch .new_user_alert_block a, .new_user_alert_block a:hover {color:#80ACEE; text-decoration:none}'+ '#new_user_alert_dbltch .new_user_alert_box {opacity:1;border-radius:4px;width:240px; height:100px; color:#FFFFFF; cursor:pointer; margin-bottom:5px; padding:4px 5px 0; background:#1B1F24; background:rgba(27,31,36,0.9); box-shadow:0 2px 6px 0 rgba(0,0,0,0.75); -moz-box-shadow:0 2px 6px 0 rgba(0,0,0,0.75); -webkit-box-shadow:0 2px 6px 0 rgba(0,0,0,0.75)}'+ '#new_user_alert_dbltch .new_user_alert_cont {height:58px; overflow:hidden; line-height:18px; margin: 27px 0 0 100px;}'+ '#new_user_alert_dbltch .new_user_alert_close {width:16px; height:17px; color:#FFFFFF; font-size:13px; line-height:1px; font-weight:bold; text-align:center; cursor:pointer; text-decoration:none; right: auto;right:3px; top: 3px;position:absolute; z-index:1; padding-top:7px; background:none}'+ '#new_user_alert_dbltch .new_user_alert_close:hover {color:#6B7075; text-decoration:none}'+ '#new_user_alert_dbltch .new_user_alert_user {color:#FFFFFF}'+ '#new_user_alert_dbltch .new_user_alert_city {color:#FFFFFF}'+ '#new_user_alert_dbltch .new_user_alert_new {position: absolute;left: 100px;padding-left:0;padding-left:15px;text-align: right;top:-1px;}'+ '#new_user_alert_dbltch .new_user_alert_new:before {width:7px; height:7px; display:block; content:""; position:absolute; left:0; border-radius:5px;top: 5px; background-color:#00ff3c}'+ '#new_user_alert_dbltch .fl{float:left;order-radius: 3px;}'+ '#new_user_alert_dbltch .mt11{margin-top: 11px;}'+ '#new_user_alert_dbltch .new_user_alert_box--in{position: relative;}'+ '#new_user_alert_dbltch .slide {position: absolute;left: 0px;top: 0px;width: 100%;height: 100%;opacity: 0;z-index: 1;}'+ '#new_user_alert_dbltch .new_user_alert_box_ltr{text-align:left;}'+ '#new_user_alert_dbltch .showing {opacity: 1;z-index: 2;}'; var style = document.createElement('style'); style.innerHTML = user_alert_style; document.head.appendChild(style); user_alert_html = ''+ '
'+ '
×
'+ ''+ '
'+ '
'+ '
'+ '
'+ 'зашла на сайт'+ '
'+ '
'+ ''+ '
'+ '
'+ '
,
'+//'
'+ '
Написать ей
'+ '
'+ '
'+ '
'+ '
'+ '
'+ '
'; var woman_list = { 'rus':{1:{'name':'Соня','age':29},2:{'name':'Белла','age':33},3:{'name':'Та самая','age':40},4:{'name':'Полина','age':37},5:{'name':'Николь','age':23},6:{'name':'Виктория','age':29}}, 'heb':{1:{'name':'שונטל','age':29},2:{'name':'שרון','age':33},3:{'name':'מיוחדת','age':40},4:{'name':'ענבל','age':37},5:{'name':'ניקול','age':23},6:{'name':'ליטל','age':29}}, 'eng':{1:{'name':'Sydney','age':29},2:{'name':'Emma','age':33},3:{'name':'The one','age':40},4:{'name':'Paulina','age':37},5:{'name':'Nicole','age':23},6:{'name':'Chanel','age':29}}, 'arab':{1:{'name':'Nardin','age':29},2:{'name':'Layla','age':33},3:{'name':'Jayden','age':40},4:{'name':'Paula','age':37},5:{'name':'Khitam','age':23},6:{'name':'Chanel','age':29}}, }; var man_list = { 'rus':{1:{'name':'Кирилл','age':36},2:{'name':'Евгений','age':54},3:{'name':'Тот самый','age':34},4:{'name':'Dmitry','age':43},5:{'name':'Андрей','age':48},6:{'name':'Валера','age':29}}, 'heb':{1:{'name':'אסי','age':36},2:{'name':'צחי','age':54},3:{'name':'האחד','age':34},4:{'name':'רונן','age':43},5:{'name':'איש הברזל','age':48},6:{'name':'מוטי','age':29}}, 'eng':{1:{'name':'Thomas','age':36},2:{'name':'Thomas','age':54},3:{'name':'Mr. Right','age':34},4:{'name':'William','age':43},5:{'name':'IronMan','age':48},6:{'name':'Justin','age':29}}, 'arab':{1:{'name':'Fadi','age':36},2:{'name':'Mahdi','age':54},3:{'name':'Akram','age':34},4:{'name':'Adam','age':43},5:{'name':'IronMan','age':48},6:{'name':'Amir','age':29}}, }; g = document.createElement('div'); g.id = 'new_user_alert_dbltch'; g.innerHTML = user_alert_html; document.body.appendChild(g); g.style.opacity = 0; g.style.display = 'block'; var current_item = 1; if ('2' == '0' || '2' == '2') { document.getElementById('useralert_age').innerHTML = woman_list['rus'][current_item]['age']; document.getElementById('useralert_name').innerHTML = woman_list['rus'][current_item]['name']; document.getElementById('useralert_image').src = 'https://love.3vozrast.ru/promo/widgets/profile/woman/woman_'+current_item+'.png'; } else if ('2' == '1') { document.getElementById('useralert_age').innerHTML = man_list['rus'][current_item]['age']; document.getElementById('useralert_name').innerHTML = man_list['rus'][current_item]['name']; document.getElementById('useralert_image').src = 'https://love.3vozrast.ru/promo/widgets/profile/man/man_'+current_item+'.png'; } function nextSlide() { if ('2' == '2') { current_item++; if (current_item > 6) current_item = 1; slide_age = woman_list['rus'][current_item]['age']; slide_name = woman_list['rus'][current_item]['name']; slide_distance = woman_list['rus'][current_item]['distance']; slide_image = 'https://love.3vozrast.ru/promo/widgets/profile/woman/woman_'+current_item+'.png'; } else { current_item++; if (current_item > 6) current_item = 1; slide_age = man_list['rus'][current_item]['age']; slide_name = man_list['rus'][current_item]['name']; slide_distance = man_list['rus'][current_item]['distance']; slide_image = 'https://love.3vozrast.ru/promo/widgets/profile/man/man_'+current_item+'.png'; } document.getElementById('useralert_age').innerHTML = slide_age; document.getElementById('useralert_name').innerHTML = slide_name; document.getElementById('useralert_image').src = slide_image; } var a = document.getElementById('user_alert_close'); a.onclick = function() { document.getElementById('new_user_alert_dbltch').remove(); } FadeIn(g); function FadeIn(element) { var opacity = 0; var timer = setInterval(function () { if (opacity >= 1){ clearInterval(timer); } element.style.opacity = opacity; opacity += 0.05; }, 50); } setInterval(nextSlide, 7000); } } window.onload = function() { UserAlertWidget.StartWidget(); }