//if( !window['jcClWidgetBase'] ){ //открытие по тэгу if( typeof jcClWidgetBaseOk === 'undefined'){ var jcClWidgetBase = function (param) { this.hash = param.hash; this.wid = param.wid; this.host = param.host; this.type = ''; this.content = ''; this.button = ''; this.cssfile = this.host+'/widget/widget.css'; this.parentid = 0; //родительская сделка this.customer = {}; this.init(param); this.referrer = ''; this.setstat(); this.onopenform = ''; this.oncloseform = ''; this.progressDiv = false; this.progress = false; if(!jcClWidgetBase.mapWidgets[this.wid]) jcClWidgetBase.mapWidgets[this.wid] = this; } jcClWidgetBase.prototype = { init: function(param) { var thisObj = this; this.maindiv = document.createElement('div'); this.maindiv.id='cl_widget_'+this.hash; this.maindiv.innerHTML = ''; this.img = document.createElement('img'); this.img.id='cl_widget_'+this.hash+'_img'; this.img.className = 'clwidget_img'; this.maindiv.appendChild(this.img); this.btn = document.createElement('div'); this.btn.id = 'cl_widget_button_'+this.hash; this.btn.className = 'clwidget-btn'; this.btn.onclick = function(e) { thisObj.openform(); } this.maindiv.appendChild(this.btn); this.container = document.createElement('div'); this.container.id='cl_widget_content_'+this.hash; this.container.className='clwidget-content'; this.container.style.display = 'none'; this.maindiv.appendChild(this.container); this.modal = document.createElement('div'); this.modal.id='cl_widget_overlay_'+this.hash; this.modal.className='clwidget-overlay'; this.modal.onclick = function(e) { thisObj.closeform(); } this.maindiv.appendChild(this.modal) document.body.appendChild(this.maindiv); this.modal.style.zIndex = 9990; this.container.style.zIndex = 9999; jcClWidgetBase.mapWidgets[ this.wid ] = this; this.parentid = 0; this.customer = { id:0, fname:'', mname:'', lname:'', phone:'', email:'', city:''}; }, //init openform: function() { this.modal.style.display='block'; this.modal.style.opacity = 0.7; this.container.style.display='block'; if(this.onopenform) this.onopenform(); }, closeform: function() { this.modal.style.display='none'; this.modal.style.opacity = 0; this.container.style.display='none'; if(this.oncloseform) this.oncloseform(); }, getcookie: function(name) { var reg = new RegExp('('+name+'=)([^;]*)','i'); var matches = document.cookie.match(reg); return matches ? decodeURIComponent(matches[2]) : false; }, setcookie: function(name,val,options) { var str=name+'='+val+';path=/;'; if(options && options.expires) str+='expires='+options.expires; document.cookie = str; }, deletecookie: function(name) { this.setcookie(name, "", {expires: -1}) }, setstat: function() { this.referrer = this.getcookie('clwd_ref'); if(this.referrer == false) { this.referrer = document.referrer; var date = new Date; date.setDate(date.getDate() + 7); this.setcookie('clwd_ref',document.referrer,{expires : date.toUTCString()}); } }, toYandex: function(target) { //Yandex metrika var yaID=0; if (typeof Ya !== "undefined") if(Ya && Ya._metrika && Ya._metrika.getCounters && Ya._metrika.getCounters().length && Ya._metrika.getCounters()[0].id) { yaID = Ya._metrika.getCounters()[0].id+''; if(eval('yaCounter'+yaID)) { var yaCNT = eval('yaCounter'+yaID); yaCNT.reachGoal(target); } } }, toGoogle: function(target) { //Google Analytics if (typeof _gaq !== "undefined") if(_gaq && _gaq.push) _gaq.push(['_trackEvent', 'CloffWidget', target]); //Universal Analytics else if (typeof ga !== "undefined") if(ga) ga('send', 'event', 'CloffWidget', target); }, callscript: function(url,data,fcallback) { var t = new Date().getTime(); var str = url+'?_t='+t+'&_w='+this.wid+'&_h='+this.hash+'&_r='+encodeURIComponent(this.referrer); if(data) str+='&'+data; this.img.onload = function() { var nstatus = parseInt(this.naturalHeight,10); if(fcallback) fcallback(nstatus); } this.img.src = str; }, getparams: function(){ var t = new Date().getTime(); return ('_t='+t+'&_w='+this.wid+'&_h='+this.hash+'&_r='+encodeURIComponent(this.referrer)); }, //отправка запроса CORS callajax: function(url, data, fcallback, isprogress, errfunc) { var t = new Date().getTime(); var thisObj = this; var xmlHttp = new XMLHttpRequest(); xmlHttp.withCredentials = true; if(data){ xmlHttp.open( (data?'POST':'GET'), url, true); xmlHttp.setRequestHeader("Method", "POST " + url + " HTTP/1.1"); xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); data += ('&_t='+t+'&_w='+this.wid+'&_h='+this.hash+'&_r='+encodeURIComponent(this.referrer)); } else { url += ( ( (url.indexOf('?')<=0) ? '?' : '&')+'_t='+t+'&_w='+this.wid+'&_h='+this.hash+'&_r='+encodeURIComponent(this.referrer)); xmlHttp.open( (data?'POST':'GET'), url, true); } xmlHttp.onreadystatechange = function(){ var param = false; //console.log('xmlHttp.readyState',xmlHttp.readyState, 'isprogress', isprogress); if(isprogress){ //console.log('xmlHttp.readyState if(isprogress){ ',(25*xmlHttp.readyState)); thisObj.setProgress(25*xmlHttp.readyState); } if(xmlHttp.readyState == 4){ if(isprogress){ thisObj.hideProgress(); } if(xmlHttp.status !=200 ) { if(errfunc) errfunc(); if( xmlHttp.status != 0 ){ alert('ERROR: request error.\nResponce status:'+xmlHttp.status); return false; } else{ xmlHttp.abort(); return false; } } var resp = xmlHttp.responseText; try { param = eval(resp)[0]; } catch (e) { console.log('Ошибка обработки ответа:', resp); console.error(e); if(errfunc) errfunc(); return false; }; if(fcallback) fcallback(param); } }; if(isprogress){ this.showProgress(); } xmlHttp.send(data); var n = 0; var prog = function(){ n++; thisObj.setProgress(4*n); if(n<20) window.setTimeout( prog, 100); }; prog(); }, setProgress: function(v){ this.progress.value = v; }, showProgress: function(){ if(!this.progressDiv){ this.progressDiv = document.createElement("DIV"); this.progressDiv.className = 'clwidget-progress-overlay'; this.progressDiv.style.display = 'none'; this.progress = document.createElement("PROGRESS"); this.progress.className = 'clwidget-progress'; this.progress.max = 100; this.progressDiv.appendChild(this.progress); document.body.appendChild(this.progressDiv); } //получим zIndex this.progress.value = 0; this.progressDiv.style.zIndex = ( this.zIndex ? parseInt(this.zIndex,10)+10000: (this.container?parseInt(this.container.style.zIndex,10):0)+5); this.progressDiv.style.display = 'block'; }, hideProgress: function(){ this.progressDiv.style.display = 'none'; }, //hideProgress setParent: function(pid){ this.parentid = pid; }, //setParent setCustomer: function(oc){ this.customer = Object.assign({}, oc); }, //setCustomer } jcClWidgetBase.mapWidgets = {}; jcClWidgetBase.getWidget = function(wid){ return ( jcClWidgetBase.mapWidgets[wid] ? jcClWidgetBase.mapWidgets[wid]: false ); }; jcClWidgetBase.onHASH = function(e){ console.log('HASH333', location.hash); if(location.hash.substr(0,6)==='#CLWDG'){ let wid = parseInt(location.hash.substr(6),10); if(wid){ let wgd = jcClWidgetBase.getWidget(wid); if(wgd) wgd.openform(); } } } window.addEventListener('DOMContentLoaded', (event) => { window.addEventListener("hashchange" , function(e) { jcClWidgetBase.onHASH(e); } , false); console.log('OK DOMContentLoaded', jcClWidgetBase.mapWidgets); //ну и проверим а вдруг сразу? if( location.hash && location.hash.length) setTimeout( function(){ jcClWidgetBase.onHASH(); },800); }); console.log('SET DOMContentLoaded', jcClWidgetBase.mapWidgets); var jcClWidgetBaseOk = 1; } //END if jcClWidgetBaseOk; //} //if( !window['jcClWidgetBase'] ){ /* .LINE {max-width: 1010px;} .BLOCK_1 {max-width: 880px;} .BLOCK_2 {max-width: 560px;} .COLUMN_1 {max-width: 346px;} .COLUMN_2 {max-width: 226px; <575px (XS) 576px-767px (SM) 768px-991px (MD) 992px-1199px (LG) >1200px (XL) */ console.log('WDG 2.1'); function jcClWidgetBooking0ff4fc6f461cd27980cca4e2bbcb7b77(param) { jcClWidgetBase.apply(this, arguments); this.type = 'bookig.2'; var thisObj = this; this.content = param.content; this.onopenform = function() { }; this.oncloseform = function() { thisObj.resetAll(); }; this.onCloseCallBack = false; this.host = param.host; this.dtStart = false; this.dtEnd = false; this.curVar = false; this.arrService = []; this.arrOption = []; this.mapAdd = {}; this.total; this.bedType = 1; this.chBedType = false; this.bookingID = 0; this.cntAdt = 2; this.cntChild = 0; this.cntInfants = 0; this.descr = ''; this.prepay = 0; this.staticForm = param.staticForm; this.hash = '0ff4fc6f461cd27980cca4e2bbcb7b77'; this.varDescr = false; this.initChilds = false; this.tariffId = ''; this.addPrice = 0; //сумма услуг и опций // this.sizes = [ // {w:880, cl: 'BLOCK_1'}, // {w:560, cl: 'BLOCK_2'}, // {w:390, cl: 'COLUMN_1'}, // {w:226, cl: 'COLUMN_2'}, // ]; this.sizes = [ {w:1199, cl: 'LG'}, {w:991, cl: 'MD'}, {w:767, cl: 'SM'}, {w:575, cl: 'XS'}, ]; this.childmax = cl_hotel4744.childmax; this.infantmax = cl_hotel4744.infantmax; this.cityrq = cl_hotel4744.cityrq; this.selbed = cl_hotel4744.selbed; this.cntGuests = 4; this.frm = false; this.ispromo = 0; this.promocode = 0; this.cntday = 1; this.SUTKI = 24*3600*1000; this.bookend = ( cl_hotel4744&&cl_hotel4744.bookend ? cl_hotel4744.bookend: ''); this.bookstart = ( cl_hotel4744&&cl_hotel4744.bookstart ? cl_hotel4744.bookstart: ''); this.money = cl_hotel4744&&cl_hotel4744.money; this.ssid = this.getcookie('cl_ssid'); if(!this.ssid) this.ssid = ''; this.addEvent = function(elem, type, handler){ if (elem.addEventListener){elem.addEventListener(type, handler, false)} else { elem.attachEvent("on"+type, handler)} }; this.removeEvent = function(elem, type, handler){ if (elem.removeEventListener){elem.removeEventListener(type, handler, false)} else { elem.detachEvent("on"+type, handler)} }; this.alert = function(msg){ document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_wnd_alert_msg').innerHTML = msg; thisObj.jscClassRemove(document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_wnd_alert'), 'hide'); document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_wnd_alert').style.display = 'block' document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_wnd_alert_close_x').onclick = document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_wnd_alert_close').onclick = function(){ thisObj.jscClassAdd(document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_wnd_alert'), 'hide'); document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_wnd_alert').style.display = 'none' }; }; //пересадим наши окна в боди document.body.appendChild( document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_wnd_alert').parentNode.removeChild(document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_wnd_alert')) ); document.body.appendChild( document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_step2').parentNode.removeChild(document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_step2')) ); document.body.appendChild( document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_step3').parentNode.removeChild(document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_step3')) ); document.body.appendChild( document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_step4').parentNode.removeChild(document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_step4')) ); document.body.appendChild( document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_step5').parentNode.removeChild(document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_step5')) ); document.body.appendChild( document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_gallery').parentNode.removeChild(document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_gallery')) ); //работа с куками this.setCookie = function(cname, cvalue, exdays) { var d = new Date(); d.setTime(d.getTime() + (exdays*24*60*60*1000)); var expires = "expires="+ d.toUTCString(); document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/"; }; this.getCookie = function(cname) { var name = cname + "="; var decodedCookie = decodeURIComponent(document.cookie); var ca = decodedCookie.split(';'); for(var i = 0; i 0) document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_agree_link').onclick = function(){ window.open(pURL); } document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_close1').onclick = document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_close2').onclick = document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_close3').onclick = document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_close4').onclick = document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_close5').onclick = function(){ thisObj.closeform(); } document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_button').onclick = function(){ thisObj.loadVars(); } document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_next3_button').onclick = function(){ thisObj.toStep4(); } document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_order_form').onsubmit = function(){ thisObj.send(); return false; } document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_step2_back').onclick = function(){ thisObj.closeform(); thisObj.openform(); } document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_back3_button').onclick = function(){ thisObj.toStep2(); } document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_back4_button').onclick = function(){ thisObj.toStep3(); } if(!cl_hotel4744.islc){ document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_lc_button').style.display = 'none'; } //проинициализируем даты var ds = new Date() ; var hds = new Date(this.bookstart); if(ds4) || (cl_hotel4744.maxchd>4) ){ //много через SELECT document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_adults_del').onclick = document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_childs_del').onclick = document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_adults_add').onclick = document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_childs_add').onclick = function(e){ switch (this.id.substr(-10)) { case 'adults_del' : thisObj.cntA.value = Math.max(1, parseInt(thisObj.cntA.value,10)-1 ); break; case 'adults_add' : thisObj.cntA.value = Math.min(cl_hotel4744.maxadt, parseInt(thisObj.cntA.value,10)+1 ); break; case 'childs_del' : thisObj.cntC.value = Math.max(0, parseInt(thisObj.cntC.value,10)-1 ); thisObj.changeChild(); break; case 'childs_add' : thisObj.cntC.value = Math.min(cl_hotel4744.maxchd, parseInt(thisObj.cntC.value,10)+1 ); thisObj.changeChild(); break; } } this.cntA = document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_adults'); this.cntA.onchange = function(obj){ thisObj.freeVars(); } this.cntC = document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_childs'); document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_adults_cont').style.display = 'none'; document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_childs_cont').style.display = 'none'; } else{ //мало "человечки" this.cntA = new clMans({ input: document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_adults') , elem : document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_adults_span') , del : document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_adults_del') , add : document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_adults_add') , container : document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_adults_cont') , classOn : 'cl_wdt_i_primary' , classOff : 'cl_wdt_i_primary cl_wdt_i_disabled' , cnt : this.cntAdt , min: 1 , max: cl_hotel4744.maxadt , widget : this , onChange: function(obj){ thisObj.freeVars(); } , elwidth: man_width }); this.cntC = new clMans({ input: document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_childs') , elem : document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_childs_span') , del : document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_childs_del') , add : document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_childs_add') , container : document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_childs_cont') , classOn : 'cl_wdt_i_primary' , classOff : 'cl_wdt_i_primary cl_wdt_i_disabled' , cnt : (this.cntChild+this.cntInfants) , min: 0 , max: cl_hotel4744.maxchd , widget : this , onChange: function(){ thisObj.cntC.onchange(); } }); //спрячем количества document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_adults').style.display = 'none'; document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_childs').style.display = 'none'; } if( (cl_hotel4744.maxchd<=0) || (cl_hotel4744.isnotchilds) ){ document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_div_child').style.display = 'none'; } //спрячем количества document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_adults_span').style.display = 'none'; document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_childs_span').style.display = 'none'; this.cntC.onchange = function(){ console.log('thisObj.cntC.onchange'); thisObj.changeChild(); }; thisObj.changeChild(); //дети 89025070899 var sChildAges = ''; for(var ca=0; ca<=cl_hotel4744.childmax; ca++) sChildAges += (''); for(var c=1; c<5; c++){ document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_sel_'+c).innerHTML = sChildAges; } //ENDдети //END гости this.toGermanString = function(t) { return ('0'+t.getDate()).substr(-2)+'.'+('0'+(1+t.getMonth())).substr(-2)+'.'+t.getFullYear(); }; this.toJapanString = function(t) { return t.getFullYear()+'-'+('0'+(1+t.getMonth())).substr(-2)+'-'+('0'+t.getDate()).substr(-2); }; var errPhone = 'Номер надо вводить в формате:\n8XXXXXXXXXX - для России (Казахстана) и либо 810 и любое количество цифр для международных номеров\n'; document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_phone').addEventListener("change", function (event) { //проверка параметров var phone = this.value; phone = phone.replace(/\+7/gi,'8').replace(/[^+\d]/g,''); var errMsg = ''; if( !phone.length ) { errMsg += 'Введите телефон!\n'; } else{ var phonePattern = /^\d+$/; if( (!phonePattern.test(phone)) ){ errMsg = errPhone; } else{ if( phone.substr(0,1)!='8' ){ errMsg = errPhone; } else if( (phone.substr(0,3)!='810') ) if(phone.length!=11){ errMsg = errPhone; } } } console.log('errMsg',errMsg); this.setCustomValidity(errMsg); }); document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_phone').setCustomValidity('Введите телефон!'); this.booking_init(); } jcClWidgetBooking0ff4fc6f461cd27980cca4e2bbcb7b77.prototype = Object.create(jcClWidgetBase.prototype); jcClWidgetBooking0ff4fc6f461cd27980cca4e2bbcb7b77.opencnt = 0; jcClWidgetBooking0ff4fc6f461cd27980cca4e2bbcb7b77.openform = function( ID_CONTAINER, e ){ if(window.clW_0ff4fc6f461cd27980cca4e2bbcb7b77){ jcClWidgetBooking0ff4fc6f461cd27980cca4e2bbcb7b77.opencnt = 0; clW_0ff4fc6f461cd27980cca4e2bbcb7b77.openform( ID_CONTAINER, e ); } else{ setTimeout( function(){ if(jcClWidgetBooking0ff4fc6f461cd27980cca4e2bbcb7b77.opencnt<10){ jcClWidgetBooking0ff4fc6f461cd27980cca4e2bbcb7b77.opencnt++; jcClWidgetBooking0ff4fc6f461cd27980cca4e2bbcb7b77.openform( ID_CONTAINER, e ); } },500); } }; jcClWidgetBooking0ff4fc6f461cd27980cca4e2bbcb7b77.zIndex = 99998; jcClWidgetBooking0ff4fc6f461cd27980cca4e2bbcb7b77.jscCntRus = function (cnt, one, two, five) { var last = Math.abs(cnt%10); var res = five; if( ( (cnt%100)<10 || (cnt%100)>20) ){ switch(last){ case 1 : res = one; break; case 2 : case 3 : case 4 : res = two; break; } } return res; } // eof jscCntRus() jcClWidgetBooking0ff4fc6f461cd27980cca4e2bbcb7b77.maxZIndex = function() { return Array.from(document.querySelectorAll('body *')) .map(a => parseFloat(window.getComputedStyle(a).zIndex)) .filter(a => !isNaN(a)) .sort() .pop(); } jcClWidgetBooking0ff4fc6f461cd27980cca4e2bbcb7b77.prototype.openform = function( ID_CONTAINER, e ){ //console.log('cl_hotel4744::', cl_hotel4744) if(ID_CONTAINER && document.getElementById(ID_CONTAINER) ){ this.add_class = ''; this.formContainer = document.getElementById(ID_CONTAINER); this.formContainer.innerHTML = ''; } else{ this.jscClassAdd( this.firstScreen, 'clh_window' ); this.formContainer = this.wrapper; //посмотреим вдруг нужен if(e && e.target){ var el = e.target; var xIndex = 99998; var cl = ''; var cnt = 0; var x = 0; while( el.parentNode ){ el = el.parentNode; if(el.tagName=='BODY'){ break; } else{ x = parseInt((getComputedStyle ? getComputedStyle(el, null) : el.currentStyle).zIndex,10); if( x && x>0 ) xIndex += x; } cnt++; if(cnt>10000) break; } jcClWidgetBooking0ff4fc6f461cd27980cca4e2bbcb7b77.zIndex = xIndex; } } jcClWidgetBooking0ff4fc6f461cd27980cca4e2bbcb7b77.zIndex = jcClWidgetBooking0ff4fc6f461cd27980cca4e2bbcb7b77.maxZIndex()+1; this.formContainer.appendChild( this.formScreen.parentNode.removeChild(this.formScreen) ); document.body.appendChild( this.wrapper.parentNode.removeChild(this.wrapper)); this.formScreen.style.display = 'flex'; if(this.staticForm){ //убираем крестик document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_close1').style.display = 'none'; document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_step2_back').style.display = 'none'; } else{ //модальность document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_close1').style.display = 'flex'; this.wrapper.style.display = 'flex'; } this.container.style.zIndex = Math.max(99998, jcClWidgetBooking0ff4fc6f461cd27980cca4e2bbcb7b77.zIndex); if(!document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_styleZ')){ var s = document.createElement('STYLE'); s.id = 'cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_styleZ'; document.body.appendChild(s); } document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_styleZ').innerHTML = '#cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_step1,\n' +'#cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_step2,\n' +'#cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_step3,\n' +'#cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_step4,\n' +'#cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_step5,\n' +'#cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_wnd_alert,\n' +'#cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_gallery,\n' +'.cl_wdt_0ff4fc6f461cd27980cca4e2bbcb7b77.cl_calendar, .cl_wdt_widget_wrapper, .clh_widget_wrapper { --z-index: '+this.container.style.zIndex+'; }'; this.resize(); this.dtOnChange(); if(cl_hotel4744.islc){ window.setTimeout(function(){ //console.log('window.cloff_myaccount_widget',window.cloff_myaccount_widget); if(window.cloff_myaccount_widget){ cloff_myaccount_widget.initLinks(); } else{ if(document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_lc_button')) document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_lc_button').style.display = 'none'; } },600); } }; jcClWidgetBooking0ff4fc6f461cd27980cca4e2bbcb7b77.prototype.booking_init = function(){ //проверим если возврат с оплаты прорисуем итог и почистим кукисе var bookingID = parseInt( this.getCookie('bookingID'), 10); if(bookingID>0){ this.bookingID = bookingID; this.descr = this.getCookie('bookingDescr'); this.setCookie('bookingID', 0, 1/24/3600); this.setCookie('bookingDescr', '', 1/24/3600); this.toStep5(); } }; jcClWidgetBooking0ff4fc6f461cd27980cca4e2bbcb7b77.prototype.dtOnChange = function(){ document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_step1_legend').innerHTML = this.getLegend(); }; //сложим легенду jcClWidgetBooking0ff4fc6f461cd27980cca4e2bbcb7b77.prototype.getLegend = function(){ return this.dtEnd.getLegend( this.dtStart.dt1, this.dtEnd.dt1, true); } //полную легенду jcClWidgetBooking0ff4fc6f461cd27980cca4e2bbcb7b77.prototype.getLegendFull = function(isNoNums){ var ssN = ''; var roomAmt = 0; if(this.curVar){ if(this.curVar.nums==1){ ssN = 'Номер:'+this.curVar.arrRooms[0].name+' за '+this.curVar.arrRooms[0].amount+this.money.code; roomAmt += this.curVar.arrRooms[0].amount; } else{ ssN = 'Номера:' for(var k=0; k1 ? this.curVar.arrRooms[k].cnt+' по ':'')+this.curVar.arrRooms[k].amount+this.money.code+')'); roomAmt += this.curVar.arrRooms[k].amount; } } } if(roomAmt!=this.curVar.amount){ ssN += ' стоимость по выбранному тарифу '+this.curVar.amount; } var adt = this.cntA.value; var ch = this.cntC.value; var ssVar = adt+' '+jcClWidgetBooking0ff4fc6f461cd27980cca4e2bbcb7b77.jscCntRus(adt, this.persName1, this.persName3, this.persName5)+(ch>0?' '+ch+' '+jcClWidgetBooking0ff4fc6f461cd27980cca4e2bbcb7b77.jscCntRus(ch, 'ребёнок', 'ребёнка', 'детей')+' ':''); if(this.addPrice) ssN = (ssN+' дополнительно услуги: '+this.addPrice+this.money.code); if(isNoNums) ssN = this.getLegend(); return( ssVar+' c '+this.dtStart.dt1.toGermanStr()+' по '+this.dtEnd.dt1.toGermanStr()+'. '+ssN); }; //END getLegendFull //загрузка вариантов Хомяков jcClWidgetBooking0ff4fc6f461cd27980cca4e2bbcb7b77.prototype.loadVars = function(){ var msg = ''; //сообщение об ошибке //собираем / проверяем даты var dts = this.dtStart.toCLStr(); if(!dts){ msg += ( msg==''?'':'
'); msg += 'Выберите дату заезда.'; } var dte = this.dtEnd.toCLStr(); if(!dte){ msg += ( msg==''?'':'
'); msg += 'Выберите дату отъезда.'; } if(this.bookend != '') { var bookend = new Date( Date.parse(this.bookend) ); if(bookend'); msg += 'Бронирование доступно только до '+this.toGermanString(bookend); } } var hds = new Date( this.bookstart ); var cds = new Date( this.toJapanString(this.dtStart.dt1) ); if(hds>cds){ msg += ( msg==''?'':'
'); msg += 'Бронирование доступно только с '+this.toGermanString(hds); } var dd = Math.ceil((this.dtEnd.dt1-this.dtStart.dt1)/this.SUTKI); if(dts>=dte){ msg += ( msg==''?'':'
'); msg += 'Период бронирования выбран не корректно.'; } else { if(cl_hotel4744.mind>dd){ msg += ( msg==''?'':'
'); msg += 'Минимальный период бронирования '+cl_hotel4744.mind+' '+jcClWidgetBooking0ff4fc6f461cd27980cca4e2bbcb7b77.jscCntRus(cl_hotel4744.mind, 'сутки', 'суток', 'суток'); } if(cl_hotel4744.maxd'); msg += 'Максимальный период бронирования '+cl_hotel4744.maxd+' '+jcClWidgetBooking0ff4fc6f461cd27980cca4e2bbcb7b77.jscCntRus(cl_hotel4744.mind, 'сутки', 'суток', 'суток'); } } //END собираем / проверяем даты var adt = this.cntA.value; //дети var ch = this.cntC.value; if(ch<0){ msg += ( msg==''?'':'
'); msg += 'Количество детей введено не верно.'; } if(!ch) ch=0; var childs = 0; //детей var infants = 0; //младенцев var achilds = ''; if(ch < 5){ //возраст детей проверяем только если их мало for(k=1; k<=ch; k++){ var age = parseInt(document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_sel_'+k).value,10); if(age<0){ msg += ( msg==''?'':'
'); msg += 'Введите возраст '; switch(k){ case 1 : msg += 'первого'; break; case 2 : msg += 'второго'; break; case 3 : msg += 'третьего'; break; case 4 : msg += 'четвёртого'; break; case 5 : msg += 'пятого'; break; default : msg += (''+k+'го'); break; } msg += ' ребёнка.\n'; } else{ if(age>this.infantmax){ childs++ } else{ infants++; } achilds += ('&arrch['+k+']='+age); } } }//END for(k=1; k<=ch; k++) //END дети //Если ошибка выводим и выходим! if(msg!=''){ this.alert(msg); return; } this.cntAdt = adt; this.cntChild = childs; this.cntInfants = infants; var thisObj = this; //формируем данные var spost = 'wv=2&dts='+dts+'&dte='+dte+'&cntadlt='+adt+'&ssid='+this.ssid; if(ch>0) spost += ('&cntinfant='+infants+'&cntchild='+childs+achilds); //промо this.promocode = document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_step2_promo_input').value; spost += ('&promocode='+this.promocode); this.store_spost = 'dts='+dts+'&dte='+dte+'&promocode='+this.promocode; //отправляем на сервер this.callajax( thisObj.host+'/widget/booking.start.rs.php?aj=1', spost, function(param){ console.log('0ff4fc6f461cd27980cca4e2bbcb7b77', param); if(parseInt(param.errcode,10)>0){ if(parseInt(param.errcode,10) == 777) { thisObj.alert('Минимальный период бронирования '+cl_hotel4744.mind+' суток'); return; } if(param.errmsg){ thisObj.alert(param.errmsg); return; } } //есть ли варианты if(param.arrvariant.length==0){ thisObj.alert(cl_hotel4744.novariant); return; } thisObj.arrVars = param.arrvariant; thisObj.arrService = param.arrservice; thisObj.arrOption = param.arroption; thisObj.mapAdd = {}; thisObj.mapAdd['service']= {}; thisObj.mapAdd['option']= {}; for(var k in thisObj.arrService){ thisObj.mapAdd['service'][thisObj.arrService[k].id] = thisObj.arrService[k]; } for(k in thisObj.arrOption){ thisObj.mapAdd['option'][thisObj.arrOption[k].id] = thisObj.arrOption[k]; } thisObj.arrTypes = param.arrtypes; thisObj.arrImgs = (param.arrimgs ? param.arrimgs: []); if(param.ssid) { var date = new Date((new Date()).getTime()+30*60*1000); thisObj.ssid = param.ssid; thisObj.setcookie('cl_ssid', param.ssid, {expires : date.toUTCString()}); } thisObj.toStep2(); }, true); }; //END loadVars //Открываем окно с вариантами заселения jcClWidgetBooking0ff4fc6f461cd27980cca4e2bbcb7b77.prototype.toStep2 = function(){ this.closeform(); var thisObj = this; //рисуем варианты //console.log('thisObj.arrVars', this.arrVars); document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_step2_list').innerHTML = ''; for(var k=0; k0){ document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_service_list').appendChild( this.getServiceItem(this.arrService[s]) ); cnt++; cntSrv++; } } if(!this.arrOption.length){ document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_option_label').style.display = 'none'; document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_option_list').style.display = 'none'; } else{ document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_option_label').style.display = 'flex'; document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_option_list').style.display = 'flex'; document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_option_list').innerHTML = ''; for(var o=0; o0){ document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_option_list').appendChild( this.getOptionItem(this.arrOption[o]) ); cnt++; cntOpt++; } } } //пересчитаем цену this.reCalc(); document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_next3_button').innerHTML = (this.curVar.isOverbooking ? cl_hotel4744.btoverbooking: cl_hotel4744.btbooking); //вкладки на втором экране var thisObj = this; var showService = document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_service_label').onclick = function(e){ thisObj.jscClassAdd(document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_option_label'), 'cl_wdt_bg_disabled_mob'); thisObj.jscClassRemove(document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_service_label'), 'cl_wdt_bg_disabled_mob'); thisObj.jscClassAdd(document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_option_list'), 'cl_wdt_mob_hide'); thisObj.jscClassRemove(document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_service_list'), 'cl_wdt_mob_hide'); } var showOption = document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_option_label').onclick = function(e){ thisObj.jscClassRemove(document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_option_label'), 'cl_wdt_bg_disabled_mob'); thisObj.jscClassAdd(document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_service_label'), 'cl_wdt_bg_disabled_mob'); thisObj.jscClassRemove(document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_option_list'), 'cl_wdt_mob_hide'); thisObj.jscClassAdd(document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_service_list'), 'cl_wdt_mob_hide'); } if(!cntOpt){ showService(); } if(!cntSrv){ showOption(); } //Открываем окно if( cl_hotel4744.isnotstep3==1){ this.toStep4(); return; } if( cnt>0 ) document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_step3').style.display = 'block'; else this.toStep4(); }; //END toStep2 //Форма ввода данных jcClWidgetBooking0ff4fc6f461cd27980cca4e2bbcb7b77.prototype.toStep4 = function(){ this.closeform(); //пересчитаем цену this.reCalc(); var thisObj = this; document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_next4_button').innerHTML = (this.curVar.isOverbooking ? cl_hotel4744.btoverbooking: cl_hotel4744.btbooking); document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_next4_button').onclick = function(){ return true; }; var old_element = document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_next4_button'); var new_element = old_element.cloneNode(true); old_element.parentNode.replaceChild(new_element, old_element); /* try{ document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_phone').setCustomValidity("Введите номер телефона"); document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_phone').addEventListener("input", function (event) { this.value = this.value.replace('+7','8').replace('-','').replace('(','').replace(')',''); //проверка параметров var errMsg = ''; if( !phone.length ) { errMsg += 'Введите телефон!
\n'; } else{ var phonePattern = /^\d+$/; if( (!phonePattern.test(phone)) ){ errMsg = errPhone; } else{ if( phone.substr(0,1)!='8' ){ errMsg = errPhone; } else if( (phone.substr(0,3)!='810') ) if(phone.length!=11){ errMsg = errPhone; } } } this.setCustomValidity(errMsg); if ( document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_phone').validity.patternMismatch) { document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_phone').setCustomValidity("Номер телефона вводится в формате\n89211112233 для номеров РФ и\n810+любое количество цифр для иностранных номеров"); } if(document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_phone').validity.valueMissing){ document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_phone').setCustomValidity("Введите номер телефона"); } }); } catch(e){ console.error(e); } */ document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_next4_button').onclick = document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_order_form').onsubmit = function(){ thisObj.send(); return false; } //Открываем окно document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_step4').style.display = 'block'; }; //END toStep4 //Форма ввода данных jcClWidgetBooking0ff4fc6f461cd27980cca4e2bbcb7b77.prototype.toStep5 = function(){ this.closeform(); document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_step5_bookingid').innerHTML = this.bookingID; document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_step5_booking_descr').innerHTML = this.descr; //Открываем окно document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_step5').style.display = 'block'; }; //END toStep4 //отправка формы - создание брони и переход к оплате/итогам jcClWidgetBooking0ff4fc6f461cd27980cca4e2bbcb7b77.prototype.send = function() { var errMsg = ''; var thisObj = this; var err = 'Номер надо вводить в формате:\n8XXXXXXXXXX - для России (Казахстана) либо 810 и любое количество цифр для международных номеров\n'; var trim = function(s){ return s.replace(/^\s+|\s+$/g, ""); }; //проверяем var phone = trim(document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_phone').value); phone = phone.replace(/\+7/gi,'8').replace(/[^+\d]/g,''); var fname = trim(document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_name1').value); var lname = trim(document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_name2').value); var mname = trim(document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_name3').value); var email = trim(document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_email').value); var city = trim(document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_city').value); var comment = trim(document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_comment').value); var name = lname+fname; var amount = trim(document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_comment').value); //проверка параметров if(!document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_agree').checked){ errMsg += 'Для продолжения необходимо согласие на обработку персональных данных!
\n'; } if( !phone.length ) { errMsg += 'Введите телефон!
\n'; } else{ var phonePattern = /^\d+$/; if( (!phonePattern.test(phone)) ){ errMsg += err; } else{ if( phone.substr(0,1)!='8' ){ errMsg += err; } else if( (phone.substr(0,3)!='810') ) if(phone.length!=11){ errMsg += err;} } } if(!email.length){ errMsg += 'Введите EMail!
\n'; } else{ if(!this.checkEMail(email)){ errMsg += 'EMail введён некорректно!!
\n'; } } if( name.length==0 ){ errMsg += 'Введите имя/фамилию!
\n'; } if( this.cityrq && city.length==0 ){ errMsg += 'Введите город!
\n'; } //собираем данные //сервисы asrv = ''; var sService = ''; var cnt = 1; for(var ks=0; ks'+srv.name+(cnt>1?' '+cnt+' X ':'')+' '+srv.price+thisObj.money.code+''); asrv += ((asrv==''?'':',')+srv.id+';'+cnt+';'+srv.amount); } } aopt = ''; var sOption = ''; var addbed = 0; for(var o=0; o'+op.name+(cnt>1?' '+cnt+' X ':'')+' '+op.amount+thisObj.money.code+''); aopt += ((aopt==''?'':',')+op.id+';'+op.price+';'+cnt+';'+op.amount); if(op.type==1) addbed = addbed+cnt; } } /* if( ((this.cntAdt+thisObj.cntChild)>this.curVar.beds+addbed) && (thisObj.cntChild<=3) ){ errMsg += 'Выберите дополнительные места\n'; } убрал ограничение на детей 13.07.20 мне кажется это полный бред +пожаловались клиенты к которым приезжают с 4 детьми */ if(!this.curVar.isOverbooking ) if((this.cntAdt+thisObj.cntChild)>this.curVar.beds+addbed) { errMsg += 'Выберите дополнительные места\n'; } if(errMsg != ''){ this.alert(errMsg); return false; } this.descr = '
Детали бронирования:
'+this.getLegendFull()+'
'; this.descr += (sService!=''?'
Услуги:
    '+sService:'
'); this.descr += (sOption!=''?'
Дополнительно:
    '+sOption:'
'); this.descr += '
Сумма:
'+this.total+' '+this.money.code+'
'; document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_step5_booking_descr').innerHTML = this.descr; var sds = this.descr; var spost = 'fname='+fname +'&lname='+lname +'&phone='+phone +'&email='+email +'&city='+city +'&comment='+comment +'&amount='+(this.total*100) +'&bedtype='+( this.chBedType.checked ? 2: 1 ) +'&services='+asrv +'&options='+aopt +'&varid='+this.curVar.vid +'&tariffid='+this.curVar.objTariff.id +'&tariffabc='+this.curVar.objTariff.abc +'&prepay='+this.prepay +'&cururl='+(window.isvkwidget? document.referrer :document.location.href) +'&promocode='+this.promocode +'&ssid='+this.ssid; this.toYandex('cloffHotel_booking'); this.toGoogle('cloffHotel_booking'); this.callajax( this.host+'/widget/booking.save.rs.php?aj=1', spost, function(param){ if(param.errcode){ thisObj.alert(param.errmsg); return false; } document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_step5_bookingid').innerHTML = param.bookingID; //если была оплата! if( cl_hotel4744 && cl_hotel4744.ispay ){ if(param.payURL){ //сохраним в кукисе данные букина thisObj.setCookie('bookingID', param.bookingID, 1); thisObj.setCookie('bookingDescr', sds, 1); document.location.href = param.payURL; if(window.isvkwidget) { var str = param.payURL; var arr = str.split('?'); document.getElementById('CLOFF_HOTEL_WIDGET_URL').action = arr[0]; var params = arr[1].split('&'); var frm = document.getElementById('CLOFF_HOTEL_WIDGET_URL'); for(var i=0;i=0 ){ roompay = this.arrTypes[ this.curVar.arrRooms[r].typeid].val; } this.prepay += (roompay * this.curVar.arrRooms[r].cnt); } } else if(cl_hotel4744.prepaytype == 3){ //стоимость дней проживания //если в типах прописаны "исключения" то берём максимум var ppdays = cl_hotel4744.prepayval; for(var r=0; r=0 && this.arrTypes[ this.curVar.arrRooms[r].typeid].val>ppdays ){ ppdays = this.arrTypes[ this.curVar.arrRooms[r].typeid].val; } } //делим сумму проживания на количество ночей this.prepay = (this.curVar.amount/Math.max(1, this.cntday))*ppdays; } else{ //процент var roompercent = cl_hotel4744.prepayval/100; if( (this.curVar.arrTariffs.length==1) // тариф 1 && (this.curVar.arrTariffs[0].id==0) // он базовый ){ //считаем от комнат для учёта индивидуального % for(var r=0; r=0 ){ roompercent = this.arrTypes[ this.curVar.arrRooms[r].typeid].val/100; } this.prepay += (this.curVar.arrRooms[r].amount * roompercent * this.curVar.arrRooms[r].cnt); } } else{ //иначе от тарифа this.prepay += (this.curVar.amount * roompercent); } //и для опций/сервисов this.prepay += (cl_hotel4744.prepayval/100 * (aopt+asrv)); } //document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_paysum').innerHTML = this.prepay; } //легенда document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_step3_legend').innerHTML = document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_step4_legend').innerHTML = this.getLegendFull(); //document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_total5').innerHTML = document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_total4').innerHTML = document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_total3').innerHTML = this.total+' '+this.money.code; }; //END reCalc //прорисовка услуг/опций jcClWidgetBooking0ff4fc6f461cd27980cca4e2bbcb7b77.prototype.getServiceItem = function(s){ return this.getSrvOptItem(s, 'service'); }; jcClWidgetBooking0ff4fc6f461cd27980cca4e2bbcb7b77.prototype.getOptionItem = function(s){ return this.getSrvOptItem(s, 'option'); }; jcClWidgetBooking0ff4fc6f461cd27980cca4e2bbcb7b77.prototype.getSrvOptItem = function(so, name){ var vSEl = document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_service_tpl').cloneNode(true); var res = /SRVID/gi; var re = /SONAME/gi; var thisObj = this; vSEl.id = 'cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_'+name+'_'+so.id; vSEl.innerHTML = vSEl.innerHTML.replace(res, so.id).replace(re, name); document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_tpl_place').appendChild(vSEl); document.getElementById(vSEl.id+'_chb').isrequired = so.isrequired; document.getElementById(vSEl.id+'_chb').onclick = function(){ if(this.isrequired) { this.checked = true; thisObj.mapAdd[name][so.id].checked = this.checked; return false; } thisObj.mapAdd[name][so.id].checked = this.checked; thisObj.reCalc(); }; document.getElementById(vSEl.id+'_name').innerHTML = so.name; document.getElementById(vSEl.id+'_amount').innerHTML = so.price+' '+this.money.code; document.getElementById(vSEl.id+'_count').value = ( thisObj.mapAdd[name][so.id].cht ? thisObj.mapAdd[name][so.id].cht: 1); document.getElementById(vSEl.id+'_count').onchange = function(){ thisObj.mapAdd[name][so.id].cht = this.value; thisObj.reCalc(); }; document.getElementById(vSEl.id+'_count').max = so.maxcnt; if(so.maxcnt == 1){ document.getElementById(vSEl.id+'_count').disabled = true;; this.jscClassAdd(document.getElementById(vSEl.id+'_count'), 'clh_widget_inactive'); } if(so.isrequired){ document.getElementById(vSEl.id+'_chb').checked = 1; document.getElementById(vSEl.id+'_chb').readOnly = true; this.mapAdd[name][so.id].checked = this.checked; } document.getElementById(vSEl.id+'_chb').parentNode.title = so.descr; //если было помечено пометим снова if(this.mapAdd[name][so.id].checked){ document.getElementById(vSEl.id+'_chb').checked = 1; } return vSEl; } //END getSrvOptItem //прорисовка варианта заселения jcClWidgetBooking0ff4fc6f461cd27980cca4e2bbcb7b77.prototype.getVarItem = function(v){ var thisObj = this; var re = /VARID/gi; var rer = /ROOMID/gi; var ret = /TARIFFID/gi; var man = document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_var_man_tpl'); if(v.isPromoCode) this.ispromo = 1; else this.ispromo = 0; //клонируем шаблон var vEl = document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_VAR_TPL').cloneNode(true); vEl.id = 'cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_var_'+v.vid; vEl.innerHTML = vEl.innerHTML.replace(re, v.vid); document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_VAR_TPL').parentNode.appendChild(vEl); //заполним комнаты var guests = this.cntAdt + this.cntChild + this.cntInfants; for(var r=(v.arrRooms.length-1); r>=0; r--){ var room = v.arrRooms[r]; var vElRoom = document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_room_tpl').cloneNode(true); vElRoom.id = 'cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_var_'+v.vid+'_room_'+room.typeid; vElRoom.innerHTML = vElRoom.innerHTML.replace(re, v.vid).replace(rer, room.typeid); document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_var_'+v.vid+'_rooms').appendChild(vElRoom); document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_var_'+v.vid+'_room_'+room.typeid+'_info').innerHTML = room.name; document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_var_'+v.vid+'_room_'+room.typeid+'_amount').innerHTML = room.amount; if(v.nums>1) document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_var_'+v.vid+'_room_'+room.typeid+'_amount').style.display = 'none'; //человечки for(var p=0; p0){ document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_var_'+v.vid+'_room_'+room.typeid+'_bads').appendChild( document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_man_plus_tpl').cloneNode(true) ); } } //фото pic_min pic_mid pic_max if( cl_hotel4744.gallery>0 ) if( this.arrImgs && this.arrImgs[room.typeid] && this.arrImgs[room.typeid].length ){ img0 = this.arrImgs[room.typeid][0]; if(cl_hotel4744.gallery==2){ this.jscClassRemove( document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_var_'+v.vid+'_room_'+room.typeid+'_img').parentNode, 'cl_wdt_pic_max'); this.jscClassAdd( document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_var_'+v.vid+'_room_'+room.typeid+'_img').parentNode, 'cl_wdt_pic_mid'); } else{ this.jscClassRemove( document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_var_'+v.vid+'_room_'+room.typeid+'_img').parentNode, 'cl_wdt_pic_mid'); this.jscClassAdd( document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_var_'+v.vid+'_room_'+room.typeid+'_img').parentNode, 'cl_wdt_pic_max'); } if(document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_var_'+v.vid+'_room_'+room.typeid+'_img').parentNode){ document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_var_'+v.vid+'_room_'+room.typeid+'_img').parentNode.style.display = 'flex'; } document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_var_'+v.vid+'_room_'+room.typeid+'_img').style.display = 'flex'; document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_var_'+v.vid+'_room_'+room.typeid+'_img').style.backgroundImage = 'url(\''+this.host+'/getimg.php?f='+img0.storageid+'&p='+img0.md+'&pt=1\')'; document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_var_'+v.vid+'_room_'+room.typeid+'_img').arrImg = this.arrImgs[room.typeid]; document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_var_'+v.vid+'_room_'+room.typeid+'_img').room_descr = room.descr; document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_var_'+v.vid+'_room_'+room.typeid+'_img').onclick = function(){ thisObj.playGallery(this.arrImg, this.room_descr); } } else{ document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_var_'+v.vid+'_room_'+room.typeid+'_img').style.display = 'none'; } }//заполним комнаты //заполним тарифы for(var t=(v.arrTariffs.length-1); t>=0; t--){ var tar = v.arrTariffs[t]; var vElTariff = document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_tariff_tpl').cloneNode(true); vElTariff.id = 'cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_var_'+v.vid+'_tariff_'+tar.id; vElTariff.innerHTML = vElTariff.innerHTML.replace(re, v.vid).replace(ret, tar.id); document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_var_'+v.vid+'_tariffs').appendChild(vElTariff); document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_var_'+v.vid+'_tariff_'+tar.id+'_name').innerHTML = tar.name; document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_var_'+v.vid+'_tariff_'+tar.id+'_total').innerHTML = v.nums+jcClWidgetBooking0ff4fc6f461cd27980cca4e2bbcb7b77.jscCntRus( v.nums, 'номер', 'номера', 'номеров')+' за '+tar.amount+' '+this.money.code; document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_var_'+v.vid+'_tariff_'+tar.id+'_button').innerHTML = ( (v.isOverbooking)? cl_hotel4744.btoverbooking : cl_hotel4744.btbooking); document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_var_'+v.vid+'_tariff_'+tar.id+'_button').onclick = (function (x,y) { return function() { thisObj.curVar = y; thisObj.curVar.amount = x.amount; //пропишем стоимость из выбранного тарифа thisObj.tariffId = x.id; thisObj.curVar.objTariff = x; thisObj.arrOption = []; var spost = 'varid='+thisObj.curVar.vid+'&tarid='+x.id; spost += '&'+thisObj.store_spost; thisObj.callajax( thisObj.host+'/widget/booking.option.rs.php?aj=1', spost, function(param){ thisObj.arrOption = param.arroption; thisObj.mapAdd['option']= {}; for(k in thisObj.arrOption){ thisObj.mapAdd['option'][thisObj.arrOption[k].id] = thisObj.arrOption[k]; } for(var i=0;i16) { thisObj.jscClassAdd(document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_var_'+v.vid+'_tariff_'+tar.id+'_button'), 'cl_wdt_btn_long'); } } return vEl.parentNode.removeChild(vEl); }; //END getVarItem //Проигрыватель галлереи jcClWidgetBooking0ff4fc6f461cd27980cca4e2bbcb7b77.prototype.playGallery = function(arrImgs, room_descr){ var cur = document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_gallery_photo_current'); cur.innerHTML = ''; var sto = document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_gallery_photo_storage'); sto.innerHTML = ''; var src = ''; for(var k in arrImgs){ var el = document.createElement('DIV'); if(!arrImgs[k].storageid){ arrImgs.splice(k,1); continue; } el.className = 'clh_gallery_pic'; src =''+this.host+'/getimg.php?f='+arrImgs[k].storageid+'&p='+arrImgs[k].md; el.style.backgroundImage = 'url(\''+src+'\')'; sto.appendChild(el); if(!room_descr) room_descr = arrImgs[k].descr; } if( room_descr && room_descr.length>1){ document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_gallery_photo_description').style.display = 'flex'; document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_gallery_photo_description').innerHTML = room_descr; } else{ document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_gallery_photo_description').style.display = 'none'; } document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_gallery').style.display = 'flex'; document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_gallery_photo_close').onclick = function(){ document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_gallery').style.display = 'none'; }; var jfNextImg = function(){ var ci = cur.firstChild; if(ci){ cur.removeChild(cur.firstChild); sto.insertBefore(ci,sto.lastChild.nextSibling); } cur.appendChild(sto.removeChild(sto.firstChild)); } var jfPrevImg = function(){ var ci = cur.firstChild; if(ci){ cur.removeChild(cur.firstChild); sto.insertBefore(ci,sto.firstChild); } cur.appendChild(sto.removeChild(sto.lastChild)); } jfNextImg(); if(arrImgs.length>1){ document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_gallery_photo_next').style.visibility = 'visible'; document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_gallery_photo_prev').style.visibility = 'visible'; } else{ document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_gallery_photo_next').style.visibility = 'hidden'; document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_gallery_photo_prev').style.visibility = 'hidden'; } document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_gallery_photo_next').onclick = function(){ jfNextImg(); }; document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_gallery_photo_prev').onclick = function(){ jfPrevImg(); }; } //END playGallery //дети jcClWidgetBooking0ff4fc6f461cd27980cca4e2bbcb7b77.prototype.changeChild = function(){ var thisObj = this; var cnt = this.cntC.value; if(cnt>0){ document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_childs_line').style.display = 'flex'; document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_childs_close').onclick = function(){ for(var c=1; c<=cnt; c++){ if(document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_sel_'+c).value<0){ thisObj.alert('Укажите возраст ребёнка'); return; } } document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_childs_line').style.display = 'none'; }; } else{ document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_childs_line').style.display = 'none'; } var chd; for(var c=1; c<5; c++){ chd = document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_sel_'+c); if(c<=cnt){ chd.disabled = false; this.jscClassRemove(chd,'clh_widget_inactive'); } else{ chd.disabled = true; this.jscClassAdd(chd,'clh_widget_inactive'); } } }; //закрытие формы jcClWidgetBooking0ff4fc6f461cd27980cca4e2bbcb7b77.prototype.closeform = function(){ document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_step2').style.display = 'none'; document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_step3').style.display = 'none'; document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_step4').style.display = 'none'; document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77_step5').style.display = 'none'; if(this.staticForm) return; //статическую форму не закрыть! this.formScreen.style.display = 'none'; this.wrapper.style.display = 'none'; if(this.onCloseCallBack) this.onCloseCallBack(); } //END closeform //если форма - то надо при ресайзе "подкручивать" класс jcClWidgetBooking0ff4fc6f461cd27980cca4e2bbcb7b77.prototype.resize = function(){ var contW = this.formContainer.clientWidth; var className = 'XL'; for(var k in this.sizes){ if( this.sizes[k].w>=contW ){ className = this.sizes[k].cl; } } if(!this.staticForm){ className += ' clh_window' } //this.formScreen.className = 'clh_widget '+className; //Рома "айдишнику присваивается лишний класс при ресайзе. уберите это в скрипте, пожалуйста" this.formScreen.className = className; }; function clMans(param){ var thisObj = this; this.min = ( param.min ? param.min: 0 ); this.cnt = ( param.cnt ? param.cnt: this.min ); this.value = this.cnt; //для общности с простым селектом this.max = ( param.max ? param.max: 5 ); this.inpCount = ( param.input ? param.input : { value: thisObj.cnt } ); this.elCount = ( param.elem ? param.elem : { innerHTML: thisObj.cnt } ); this.elDel = ( param.del ? param.del : { } ); this.elAdd = ( param.add ? param.add: { } ); this.container = ( param.container ? param.container: false ); this.classOn = ( param.classOn ? param.classOn: '' ); this.classOff = ( param.classOff ? param.classOff: '' ); this.onChange = ( param.onChange ? param.onChange: false ); this.widget = ( param.widget ? param.widget: false ); this.elwidth = ( param.elwidth ? param.elwidth: 21); //console.log('fucking this.elwidth:', this.elwidth, param); if(!this.container){ console.log('clMans :: CONTAINER NOT FOUND'); return false; } this.arrEl = []; //по новым веяниям не добавляем а убираем лишних for(var cnt=0; cnt=thisObj.max) thisObj.widget.jscClassAdd( thisObj.elAdd, 'clh_widget_inactive'); else thisObj.widget.jscClassRemove( thisObj.elAdd, 'clh_widget_inactive'); } var decrement = function(){ thisObj.cnt = Math.max(thisObj.cnt-1, thisObj.min); thisObj.setCount(); }; var increment = function(){ thisObj.cnt = Math.min(thisObj.cnt+1, thisObj.max); thisObj.setCount(); }; this.elDel.onclick = decrement; this.elAdd.onclick = increment; reButton(); this.setCount(true); } var cl_hotel4744 = { name:'Царская охота' , lat:'0' , lng:'0' , address:'Республика Алтай, Майминский район, пос. Барангол, ул. Чуйская 2' , descr:'' , minnum:1 , maxnum:4 , mind:1 , maxd:90 , maxadt:2 , maxchd:2 , childmax:14 , infantmax:4 , gallery: 0 , btbooking: 'Бронировать' , btoverbooking: 'Оставить заявку' , staticForm: 0 , bookstart: '2024-04-29' , bookend: '2024-10-01' , ispay: 0 , paysum: 0 , prepaytype: 3 , prepayval: 1 , money: {"id":"1","idDict":"307","idGroup":"0","order":"0","name":"\u0420\u0443\u0431\u043b\u044c","code":"\u0440.","descr":"\u0440\u0443\u0431.","isHide":"0","isProtect":"0","flag":"0"} , cityrq: 1 , selbed: 1 , islc:0 , interval:'60' , tmstart:'0' , tmnow: '519' , tmend:'1440' , isnotstep3:0 , bedsdef:2 , rentmulty:1 , isnotchilds:0 , isalterperson:0 , alterpersonstr:'' , novariant:'Нет подходящих вариантов на указанные даты' , antibrand: 0 , intpass: 0 , intone: 0}; //document.write(' CLOFF_logo_ext file_sign file_dollar file_template print_new email_alt dots_reg_h dots_reg_v bars delete_outline_alt attach_money calend guest bed_double bed_two chevron_left chevron_right chevron_right_w caret_up caret_down caret_down quest_circle_solid clock exit_new excl_triangle_solid check pet_paw '); var staticForm0ff4fc6f461cd27980cca4e2bbcb7b77 = 0; var sc = document.createElement('script'); sc.type = 'text/javascript'; sc.src = 'https://26737.cloff.ru/js/wdt.js?v=599'; sc.charset = 'UTF-8'; var hd = document.getElementsByTagName("HEAD"); hd.item(0).appendChild(sc); var wdiv0ff4fc6f461cd27980cca4e2bbcb7b77 = document.createElement('DIV'); wdiv0ff4fc6f461cd27980cca4e2bbcb7b77.id = 'AAA_0ff4fc6f461cd27980cca4e2bbcb7b77'; if(document.body) document.body.appendChild(wdiv0ff4fc6f461cd27980cca4e2bbcb7b77); else document.head.appendChild(wdiv0ff4fc6f461cd27980cca4e2bbcb7b77); var scontent0ff4fc6f461cd27980cca4e2bbcb7b77 = ' CLOFF_logo_ext file_sign file_dollar file_template print_new email_alt dots_reg_h dots_reg_v bars delete_outline_alt attach_money calend guest bed_double bed_two chevron_left chevron_right chevron_right_w caret_up caret_down caret_down quest_circle_solid clock exit_new excl_triangle_solid check pet_paw ';//document.getElementById('cl_hotel_booking_widget_0ff4fc6f461cd27980cca4e2bbcb7b77').innerHTML; wdiv0ff4fc6f461cd27980cca4e2bbcb7b77.innerHTML = scontent0ff4fc6f461cd27980cca4e2bbcb7b77; var clW_0ff4fc6f461cd27980cca4e2bbcb7b77; sc.onload = function(){ clW_0ff4fc6f461cd27980cca4e2bbcb7b77 = new jcClWidgetBooking0ff4fc6f461cd27980cca4e2bbcb7b77({ hash:'0ff4fc6f461cd27980cca4e2bbcb7b77', wid:4744, content:scontent0ff4fc6f461cd27980cca4e2bbcb7b77, host:'https://26737.cloff.ru/', staticForm: staticForm0ff4fc6f461cd27980cca4e2bbcb7b77 }); }