
{source}
<div class="ToTop">
<button onclick="topFunction()" id="myBtnTOP" title="Go to top"><img src="/templates/anderles2018/images/arrow-top.png" width="80" style="margin:auto"/></button>
</div>
<script>
// When the user scrolls down 350px from the top of the document, show the button
window.onscroll = function() {scrollFunction()};
function scrollFunction() {
if (document.body.scrollTop > 350 || document.documentElement.scrollTop > 350) {
document.getElementById("myBtnTOP").style.display = "block";
} else {
document.getElementById("myBtnTOP").style.display = "none";
}
}
// When the user clicks on the button, scroll to the top of the document
function topFunction() {
document.body.scrollTop = 0;
document.documentElement.scrollTop = 0;
}
</script>
{/source}
{source}
<div class="sidebooking">
<button id="myBtn" >Book a holiday</button>
</div>
<!-- The Modal Box -->
<div id="myModal" class="modal">
<!-- Modal content -->
<div class="modal-content">
<span id="span" class="close">×</span>
<div class="suchdiv_home">
<p id="kott">Find your holiday in one of our self-catering holiday homes</p>
<form name="quickfind" action="kontakt" method="POST">
<div class="holder">
<label for="anreise">Arrival</label>
<input type="date" name="anreise" id="anreise" value="2019-01-12" onchange="anreise_change()" >
</div>
<div class="holder">
<label for="abreise">Departure</label>
<input type="date" name="abreise" id="abreise" value="2019-01-19">
</div>
<div class="holder">
<label for="personenanzahl">Number of guests</label>
<select id="personenanzahl" name="personen">
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12" selected="selected">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
</select>
</div>
<div class="suchButton">
<button type="button" id="myBtnDetail" onclick="urlaub_bestimmen()">Online booking</button>
<p><input type="submit" value="Free inquiry"></p>
</form>
</div>
</div>
</div>
</div><!-- ENDE Modal Box-->
<!-- The Modal Box Detailsuche-->
<div id="myModalDetail" class="modal">
<!-- Modal content -->
<div class="modal-c2">
<span id="spanD" class="close">×</span>
<p id="demo">DEMO</p>
</div>
</div><!-- ENDE Modal Box Detailsuche-->
<script language="Javascript">
// Get the modal
var modal = document.getElementById('myModal');
// Get the button that opens the modal
var btn = document.getElementById("myBtn");
// Get the <span> element that closes the modal
var span = document.getElementById("span");
// Get the modal Detailsuche
var modalD = document.getElementById('myModalDetail');
// Get the button that opens the modal
var btnD = document.getElementById("myBtnDetail");
// Get the <span> element that closes the modal
var spanD = document.getElementById("spanD");
var body = document.body;
btn.onclick = function() {
modal.style.display = "block";
body.classList.add("modal-open");
}
// When the user clicks on <span> (x), close the modal
span.onclick = function() {
modal.style.display = "none";
body.classList.remove("modal-open");
}
// When the user clicks on <span> (x), close the modal
spanD.onclick = function() {
modalD.style.display = "none";
body.classList.remove("modal-open");
}
</script>
<script language="Javascript">
<!-- basiswerte -->
var today = new Date();
var dd = today.getDate();
var mm = today.getMonth()+1; //January is 0!
var yyyy = today.getFullYear();
if(dd<10){
dd='0'+dd
}
if(mm<10){
mm='0'+mm
}
today = yyyy+'-'+mm+'-'+dd;
document.getElementById("anreise").min = today;
document.getElementById("anreise").value = today;
var help = new Date();
var today1 = help.getMilliseconds(help);
console.log(today1 );
today1 = today1 + (3 * 24 * 60 * 60 * 1000);
console.log(today1 );
help = new Date();
help.setMilliseconds(today1);
var dd1 = help.getDate();
var mm1 = help.getMonth()+1; //January is 0!
var yyyy1 = help.getFullYear();
if(dd1<10){
dd1='0'+dd1
}
if(mm1<10){
mm1='0'+mm1
}
console.log( dd1+" " + mm1 + " " + yyyy1);
today = yyyy1+'-'+mm1+'-'+dd1;
console.log(today );
document.getElementById("abreise").min = today;
document.getElementById("abreise").value = today;
</script>
<script language="Javascript">
function urlaub_bestimmen()
{
var arrival = document.getElementById("anreise").value;
var departur = document.getElementById("abreise").value;
var personen = document.forms.quickfind.personen.value;
var a = new Date(arrival);
var d = new Date(departur);
var nights= new Date((d.getTime()-a.getTime())).getDate()-1;
var month = a.getMonth();
var day= a.getDate();
var date = a.getFullYear();
if((month+1) < 10){
date = date + "0";
}
date = date + "" + (month+1);
if(day < 10){
date = date + "0";
}
date = date + "" + day;
var link = "https://web4.deskline.net/accoktn/en/accommodation/detail/KTN/cac27306-ea70-4d14-829e-83a6442b0c63/Ferienhäuser_Römerhütte_und_Anderles-Alm?lkcs=H00398&customToolboxHide=true&Dosearch=yes&selNumbersofUnits=1";
link = link +"&selArrivalDate="+date;
link = link + "&selNights=" +nights;
link = link + "&selAdultsSearchLine1=" +personen;
document.getElementById("demo").innerHTML = '<embed src="'+link+'">';
modalD.style.display = "block";
modal.style.display = "none";
body.classList.add("modal-open");
}
</script>
<script language="Javascript">
function anreise_change()
{
var help = new Date(document.getElementById("anreise").value);
var today1 = help.getTime();
console.log(today1 + " help: "+ help );
today1 = today1 + (3 * 24 * 60 * 60 * 1000);
console.log(today1 + " help: "+ help );
help = new Date(today1);
console.log(today1 + " help: "+ help );
var dd1 = help.getDate();
var mm1 = help.getMonth()+1; //January is 0!
var yyyy1 = help.getFullYear();
if(dd1<10){
dd1='0'+dd1
}
if(mm1<10){
mm1='0'+mm1
}
today1 = yyyy1+'-'+mm1+'-'+dd1;
document.getElementById("abreise").min = today1;
document.getElementById("abreise").value = today1;
console.log(today1 + " help: "+ help + " today: " + today1);
}
</script>
{/source}
