xbInsaerScrolltoClicked = false; xbInsaerAnnounceId = false; nXInsaerDataViewImagesClickedId = 0; nXInsaerDataViewImagesClickedPos = 0; xtInsaerChatInterval = false; xInsaerChatLastMsgId = 0; xInsaerImageClickAfter = 0; xInsaerLoadedScriptApi = false; xInsaerLoadedsmarttablecss = false; xInsaerLoadedsmarttableapicss = false; xInsaerLoadedsmarttableapijs = false; var InsaerBase = { jquery: false, nInsaerServicesId: 278, sInsaerCabinetUserCuid: '', baseURL: 'https://api.insaer.by', sx: '', InsaerSmartcookieReal () { //nRand = Math.floor(Math.random() * 100000); nRand = 1; this.loadcss('https://fonts.googleapis.com/css2?family=Raleway:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap'); this.loadcss(this.baseURL + '/skin/global/css/scriptapi.css?v=10'); this.loadcss(this.baseURL + '/skin/global/js/jqueryuiapi/jquery-ui.min.css'); this.loadcss(this.baseURL + '/skin/global/css/template-smartcookie-api.css?v=' + nRand); this.loadjs(this.baseURL + '/skin/global/js/template-smartcookie-api.js?v=' + nRand); jqlocal = this.jquery; nInsaerServicesIdLocal = this.nInsaerServicesId; localThis = this; xinsaercookieregulationaccept = parseInt(InsaerBase.getCookie('xinsaercookieregulationaccept')); xinsaercookieregulationaccept1 = parseInt(InsaerBase.getCookie('xinsaercookieregulationaccept1')); xInsaerSmartCookiePanelClass = ''; if (xinsaercookieregulationaccept) xInsaerSmartCookiePanelClass = ' insaer-x-template-smartcookie-panel-hidden'; if (xinsaercookieregulationaccept == 1 || !xinsaercookieregulationaccept) { xInsaerSmartCookieAcceptV1 = ' checked="true"'; xInsaerSmartCookieAcceptV2 = ''; } else { xInsaerSmartCookieAcceptV1 = ''; xInsaerSmartCookieAcceptV2 = ' checked="true"'; } if (xinsaercookieregulationaccept1 == 1 || !xinsaercookieregulationaccept1) { xInsaerSmartCookie1AcceptV1 = ' checked="true"'; xInsaerSmartCookie1AcceptV2 = ''; } else { xInsaerSmartCookie1AcceptV1 = ''; xInsaerSmartCookie1AcceptV2 = ' checked="true"'; } if (true) //!xinsaercookieregulationaccept { objinsaersmartcookiepanel = jqlocal('
Для улучшения работы сайта и его взаимодействия с Посетителем мы используем файлы cookies.
Нажимая кнопку "Принять" Вы соглашаетесь со всеми типами файлов cookies.
Для персонализированной настройки - нажмите кнопку "Настройки".
Подробнее о целях, сроках и порядке использования файлов cookies Вы можете ознакомиться в нашей Политике в отношении обработки файлов cookies
'); objinsaersmartcookiepanel.appendTo(jqlocal('body')); objinsaersmartcookiepanelbuttons = jqlocal('
'); objinsaersmartcookiepanelbuttons.appendTo(jqlocal('.insaer-x-template-smartcookie-panel')); objinsaersmartcookiepanelbuttonsaccept = jqlocal('Принять'); objinsaersmartcookiepanelbuttonsaccept.appendTo(jqlocal('.insaer-x-template-smartcookie-panel-buttons')); objinsaersmartcookiepanelbuttonsdecline = jqlocal('Отказаться'); objinsaersmartcookiepanelbuttonsdecline.appendTo(jqlocal('.insaer-x-template-smartcookie-panel-buttons')); objinsaersmartcookiepanelbuttonsaccept.bind('click', function () { objinsaersmartcookiepanel.hide(); InsaerBase.setCookie('xinsaercookieregulationaccept', 1, 365); InsaerBase.setCookie('xinsaercookieregulationaccept1', 1, 365); location.reload(true); }); objinsaersmartcookiepanelbuttonsdecline.bind('click', function () { objinsaersmartcookiepanel.hide(); InsaerBase.setCookie('xinsaercookieregulationaccept', 2, 365); InsaerBase.setCookie('xinsaercookieregulationaccept1', 2, 365); location.reload(true); }); objinsaersmartcookiepanelbuttonswnd = jqlocal('Настройки'); objinsaersmartcookiepanelbuttonswnd.appendTo(jqlocal('.insaer-x-template-smartcookie-panel-buttons')); objinsaersmartcookiewnd = jqlocal('
Настройка файлов cookie
Функциональные/технические файлы cookie
Данные файлы cookie необходимы для корректного функционирования сайта и не подлежат отключению. Эти файлы cookie не сохраняют какую-либо информацию о пользователе и не передаются в сторонние аналитические системы.
Аналитические файлы cookie
Используются для оценки поведения пользователей на сайте, что помогает улучшать производительность сайта и делать его более удобным для использования. Данный тип файлов анонимизируется (обезличивается) и не содержит персональные данные пользователей.
'); objinsaersmartcookiepanelbuttonswnd.bind('click', function () { objinsaersmartcookiewnd.show(); }); jqlocal('.insaer-x-template-smartcookie-wnd-call').bind('click', function () { objinsaersmartcookiewnd.show(); return false; }); objinsaersmartcookiewndclose = jqlocal('
'); objinsaersmartcookiewndclose.appendTo(objinsaersmartcookiewnd); objinsaersmartcookiewndclose.bind('click', function () { objinsaersmartcookiewnd.hide(); }); objinsaersmartcookiewndsave = jqlocal(''); objinsaersmartcookiewndsave.appendTo(objinsaersmartcookiewnd); objinsaersmartcookiewndsave.bind('click', function () { objinsaersmartcookiewnd.hide(); objinsaersmartcookiepanel.hide(); xinsaercookieregulationaccept = jqlocal('.insaer-x-template-smartcookie-wnd input[name=insaer-x-template-smartcookie-radio-analytics]:checked').val(); InsaerBase.setCookie('xinsaercookieregulationaccept', xinsaercookieregulationaccept, 365); xinsaercookieregulationaccept1 = jqlocal('.insaer-x-template-smartcookie-wnd input[name=insaer-x-template-smartcookie-radio-adv]:checked').val(); InsaerBase.setCookie('xinsaercookieregulationaccept1', xinsaercookieregulationaccept1, 365); location.reload(true); }); objinsaersmartcookiewnd.appendTo(jqlocal('body')); } }, loadhtml: function (sLink, oData, sId) { fetch(sLink, { method: 'POST', headers: { 'Content-Type': 'application/json', }, body: JSON.stringify(oData) }) .then(res => res.json()) .then(data => { // enter you logic when the fetch is successful //console.log(data); this.jquery(sId).html(data.htmldata); }) .catch(error => { // enter your logic for when there is an error (ex. error toast) console.log(error); }); }, loadcss: function (css) { if (document.createStyleSheet) { document.createStyleSheet(css); } else { var e = document.createElement("link"); e.setAttribute("rel", "stylesheet"); e.setAttribute("href", css); document.body.appendChild(e); } }, loadjs: function (js) { var script = document.createElement('script'); script.setAttribute("type", "text/javascript"); if (script.readyState && false){ //IE script.onreadystatechange = function(){ if (script.readyState == "loaded" || script.readyState == "complete"){ script.onreadystatechange = null; } }; } else { //Others var self = this script.onload = function() { }; } script.setAttribute("src", js); document.body.appendChild(script); }, ojax: function (sUrl, data) { if (data['mode'] !== undefined) { } else { data['mode'] = 'ajax'; } if (data['showajidicator'] == 1 || data['showajindicator'] == 1) { //showajindicator(); data['showajidicator'] = 1; data['showajindicator'] = 1; } data['jqueryprefix'] = 'InsaerBase.jquery'; this.jquery.post(sUrl, data, this.parse_json); return false; }, randomString: function(len, charSet) { charSet = charSet || 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; var randomString = ''; for (var i = 0; i < len; i++) { var randomPoz = Math.floor(Math.random() * charSet.length); randomString += charSet.substring(randomPoz,randomPoz+1); } return randomString; }, setCookie: function ( name, value, expires, path, domain, secure ) { var today = new Date(); today.setTime( today.getTime() ); if ( expires ) { expires = expires * 1000 * 60 * 60 * 24; } var expires_date = new Date( today.getTime() + (expires) ); document.cookie = name+'='+escape( value ) + ( ( expires ) ? ';expires='+expires_date.toGMTString() : '' ) + //expires.toGMTString() ( ( path ) ? ';path=' + path : '' ) + ( ( domain ) ? ';domain=' + domain : '' ) + ( ( secure ) ? ';secure' : '' ); }, getCookie: function (name) { var matches = document.cookie.match(new RegExp( "(?:^|; )" + name.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, '\\$1') + "=([^;]*)" )) return matches ? unescape(matches[1]) : ''; }, getSessionId: function () { SessionId = this.getCookie('xinsaerlibsessionid'); if (this.sx) { this.setCookie('xinsaerlibsessionid', this.sx, 365); return this.sx; } if (!SessionId) { SessionId = this.randomString(32); this.setCookie('xinsaerlibsessionid', SessionId, 365); } else { this.setCookie('xinsaerlibsessionid', SessionId, 365); } return SessionId; }, getwhere: function () { if (typeof AndroidFunction !== "undefined") { return 'androidapp'; } if ( InsaerBase.jquery('.module-constructor-tasks').size() ) { return 'webapp'; } return 'site'; }, xinsaerlibopwndclose: function () { InsaerBase.jquery('.xinsaerlibopwnd').remove(); InsaerBase.jquery('.xinsaerlibopwndcover').hide(); if ( !$('.xinsaerlibopwnd').size() ) { if (typeof AndroidFunction !== "undefined") AndroidFunction.setScrollEnabled(1); } return false; }, xinsaerlibopwndcloseid: function (windowid) { InsaerBase.jquery('.xinsaerlibopwnd_' + windowid).remove(); InsaerBase.jquery('.xinsaerlibopwndcover_' + windowid).remove(); }, parse_json: function (json) { updater = 0; updateid = 0; if(json == undefined || !json || json == '') return; if (typeof json === 'string') json = eval( "(" + json + ")"); for(var i in json) { if(json[i] == null || typeof(json[i].type)=='undefined') continue; switch(json[i].type) { case 'html2': if(!json[i].id) continue; var obj = InsaerBase.jquery(json[i].id); if(!obj.length) continue; if(json[i].nospan) var $new = InsaerBase.jquery(json[i].value); else var $new = InsaerBase.jquery('').html(json[i].value); if (json[i].subtype == 'prepend') obj.prepend($new); else if (json[i].subtype == 'append') obj.append($new); else { obj.empty().append($new); } break; case 'code': window.eval(json[i].value); break; case 'alert': case 'msg': alert(json[i].value); continue; case 'go': window.location.href = json[i].value; continue; case 'remove': var obj = InsaerBase.jquery(json[i].name); if(!obj.length) continue; obj.remove(); continue; case 'opwnd': if (json[i].classname === undefined) json[i].classname = ''; if (json[i].movewnd === undefined) json[i].movewnd = ''; windowid = Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 10); if (json[i].noshade == 1) { } else { obj = InsaerBase.jquery('
'); obj.appendTo(InsaerBase.jquery('body')); obj.width(InsaerBase.jquery(document).width()); obj.height(InsaerBase.jquery(document).height()); obj.show(); } sAddParams = ''; if (json[i].params) sAddParams = ' ' + json[i].params; nFrom = parseInt(json[i].wndpxfrom); nTo = parseInt(json[i].wndpxto); if (nFrom && nTo && (InsaerBase.jquery(window).width() < nFrom || InsaerBase.jquery(window).width() > nTo)) continue; if (nTo && InsaerBase.jquery(window).width() > nTo) continue; if (nFrom && InsaerBase.jquery(window).width() < nFrom) continue; sStyle = ''; if (json[i].wndbg) sStyle = ' style="background-color:' + json[i].wndbg + '"'; if (json[i].wndinvert == 1) json[i].classname = json[i].classname + ' opwndpos_is_invert'; obj = InsaerBase.jquery("
"); obj.html('
' + '
' + json[i].value + '
'); obj.appendTo(InsaerBase.jquery('body')); InsaerBase.jquery('.xinsaerlibopwndc').bind('click', function () { windowid = InsaerBase.jquery(this).parents('.xinsaerlibopwnd').getmyoattr('windowid'); console.log(windowid); InsaerBase.xinsaerlibopwndcloseid(windowid); //InsaerBase.jquery(this).parents('.xinsaerlibopwnd').remove(); //InsaerBase.jquery('.xinsaerlibopwndcover_' + windowid).remove(); }); if (InsaerBase.jquery(window).width() > 800) { if (json[i].width) { obj.width( json[i].width ); } if (json[i].height) { obj.height( json[i].height ); } } else { obj.width( InsaerBase.jquery(window).width() - 40 ); } if (json[i].stickobject == 'null') { if (json[i].classname == 'x-insaer-smopwnd') obj.centerf(); else obj.center(); } else { x = InsaerBase.jquery(json[i].stickobject).offset().left + InsaerBase.jquery(json[i].stickobject).width(); y = InsaerBase.jquery(json[i].stickobject).offset().top; obj.css('left', (x + 10) + 'px'); obj.css('top', (y-13) +'px'); } continue; } } } } //var async = async || []; var xInsaerLoadedjQuery = false; (function () { var done = false; var script = document.createElement("script"), head = document.getElementsByTagName("head")[0] || document.documentElement; script.src = InsaerBase.baseURL + '/skin/global/js/jquery_ui.js?v=3'; script.type = 'text/javascript'; script.async = true; script.onload = script.onreadystatechange = function() { if (!done && (!this.readyState || this.readyState === "loaded" || this.readyState === "complete")) { done = true; // Process async variable /*while(async.length) { // there is some syncing to be done var obj = async.shift(); if (obj[0] =="ready") { $(obj[1]); }else if (obj[0] =="load"){ $(window).load(obj[1]); } }*/ /*async = { push: function(param){ if (param[0] =="ready") { $(param[1]); }else if (param[0] =="load"){ $(window).load(param[1]); } } };*/ // End of processing script.onload = script.onreadystatechange = null; if (head && script.parentNode) { head.removeChild(script); } } xInsaerLoadedjQuery = jQuery.noConflict(true); }; head.insertBefore(script, head.firstChild); })(); InsaerSmartcookieInterval = false; function InsaerSmartcookie() { InsaerBase.nInsaerServicesId = 278; InsaerSmartcookieInterval = setInterval(function () { if (typeof(xInsaerLoadedjQuery) == 'function') { InsaerBase.jquery = xInsaerLoadedjQuery; clearInterval(InsaerSmartcookieInterval); InsaerBase.InsaerSmartcookieReal(); } }, 200); } InsaerSmartcookie(); InsaerSmartapplinkInterval = false; function InsaerSmartapplink() { InsaerBase.nInsaerServicesId = 278; InsaerSmartapplinkInterval = setInterval(function () { if (typeof(xInsaerLoadedjQuery) == 'function') { InsaerBase.jquery = xInsaerLoadedjQuery; clearInterval(InsaerSmartapplinkInterval); xInsaerDetectCurrentLink = document.location.href; if (xInsaerDetectCurrentLink.indexOf('?mobileapp') != -1) { InsaerBase.ojax(InsaerBase.baseURL + '/smappwnd', {mode: 'ajax', xinsaeruid: InsaerBase.nInsaerServicesId }); } } }, 200); } InsaerSmartapplink();