ĂŒberprĂŒfen"; $errorValues = 'Bitte geben Sie Daten ein.'; $errorArrDate = 'Bitte geben Sie ein Anreisedatum ein.'; $errorDepDate = 'Bitte geben Sie ein Abreisedatum ein.'; } else { //$checkInDate = "Check-in date"; //$checkOutDate = "Check-out date"; $button = "Check
availability"; $errorValues = 'Please enter dates.'; $errorArrDate = 'Please enter a check-in date.'; $errorDepDate = 'Please enter a check-out date.'; } ?>

Online Booking

Best Price Guarantee

website.prototype.chooseDate = function(inputElement) { if (this.datePopup && this.datePopup.isVisible()) { this.datePopup.hide(); if (this.currentDatePopup == inputElement) { this.datePopup = false; this.currentDatePopup = false; return; } } if (inputElement.id == 'arrDate') { this.datePopup = new slyDateSelectorPopup({inputElement:inputElement, callbackOnChoose:function(date) { date.match(/^([0-9]{2})\.([0-9]{2})\.([0-9]{4})$/); var tomorrow = new Date(RegExp.$3, RegExp.$2 - 1, RegExp.$1); tomorrow.setDate(tomorrow.getDate() + 1); var tomorrowDate = formatDate(tomorrow, 'dd.MM.yyyy'); if (!$('#depDate').val()) { $('#depDate').val(tomorrowDate); } else if ($('#depDate').val() == date) { $('#depDate').val(tomorrowDate); } else if ($('#depDate').val().match(/^([0-9]{2})\.([0-9]{2})\.([0-9]{4})$/)) { if ((new Date(RegExp.$3, RegExp.$2 - 1, RegExp.$1)).getTime() < tomorrow.getTime()) { $('#depDate').val(tomorrowDate); } } }}); } else { this.datePopup = new slyDateSelectorPopup({inputElement:inputElement}); } this.datePopup.show(); this.currentDatePopup = inputElement; }; website.prototype.checkValues = function() { console.log('Checking...'); var arrDate = $('#arrDate').val(); var depDate = $('#depDate').val(); var date = Date(); if(arrDate == '' && depDate == '') { $('#valueError').css('display', 'block'); return false; } else { $('#valueError').css('display', 'none'); if(arrDate == '') { $('#arrDateError').css('display', 'block'); return false; } else { $('#arrDateError').css('display', 'none'); } if(depDate == '') { $('#depDateError').css('display', 'block'); return false; } else { $('#depDateError').css('display', 'none'); } } var protelLink = 'https://www.linde-baden.ch/protel/?'; if(!arrDate.match(/^([0-9]{2})\.([0-9]{2})\.([0-9]{4})$/)) { return false; } else { protelLink += 'from=' + RegExp.$3 + '-' + RegExp.$2 + '-' + RegExp.$1; } if (!depDate.match(/^([0-9]{2})\.([0-9]{2})\.([0-9]{4})$/)) { return false; } else { protelLink += '&to=' + RegExp.$3 + '-' + RegExp.$2 + '-' + RegExp.$1; } protelLink += '&culture=' + sly.language; window.open(protelLink,'_blank'); };