hjkhhjhjol;io;ioio;ioiio;ioreererereio;;iooi;i;o;oii;o;ioo;iio;oi;
bnmbnmbnmnbmbio;io;irererereeo;o;oi;;oi;oioi;oi;oio;;oovn
/
home
/
u174022924
/
domains
/
rockonwheelstravels.in
/
public_html
/
js
/
Upload FileeE
HOME
var todayDate="",i=1,j=0;function autocomplete(i,r){if(null==i)return!1;var d;function o(t){if(!t)return!1;!function(t){for(var e=0;e<t.length;e++)t[e].classList.remove("autocomplete-active")}(t),d>=t.length&&(d=0),d<0&&(d=t.length-1),t[d].classList.add("autocomplete-active")} function s(t){for(var e=document.getElementsByClassName("autocomplete-items"),o=0;o<e.length;o++)t!=e[o]&&t!=i&&e[o].parentNode.removeChild(e[o])} i.addEventListener("input",function(t){var e,o,n,a=this.value;if(s(),!a)return!1;for(d=-1,(e=document.createElement("DIV")).setAttribute("id",this.id+"autocomplete-list"),e.setAttribute("class","autocomplete-items roundedbox text-dark"),this.parentNode.appendChild(e),n=0;n<r.length;n++)r[n].substr(0,a.length).toUpperCase()==a.toUpperCase()&&((o=document.createElement("DIV")).innerHTML="<strong>"+r[n].substr(0,a.length)+"</strong>",o.innerHTML+=r[n].substr(a.length),o.innerHTML+="<input type='hidden' value='"+r[n]+"'>",o.addEventListener("click",function(t){i.value=this.getElementsByTagName("input")[0].value,"rental_source"==i.id?getPackS(i.value):"one-destination"==i.id?i.value==document.getElementById("one-source").value&&(document.getElementById("one-destination").value="",alert("Destination City should not be same as source city!")):"transfer_source"==i.id&&(document.getElementById("transfer_drop").value="",$.ajax({url:"localities",type:"POST",data:{city_name:i.value},dataType:"JSON",success:function(t){autocomplete(document.getElementById("transfer_drop"),t),autocomplete(document.getElementById("transfer_pick"),t)}})),s()}),e.appendChild(o))}),i.addEventListener("keydown",function(t){var e=document.getElementById(this.id+"autocomplete-list");e=e&&e.getElementsByTagName("div"),40==t.keyCode?(d++,o(e)):38==t.keyCode?(d--,o(e)):13==t.keyCode&&(t.preventDefault(),-1<d&&e&&e[d].click())}),document.addEventListener("click",function(t){s(t.target)})} function getPackS(t){$.ajax({url:"getPackageOptions",method:"POST",data:{cityname:t},success:function(t){$("#rental_package").html(t)}})} function addRound(t){i++,j++,$('<div class="form-group border-bottom col-12 col-md-3 p-0 border-right mb-0 border-xx-right-0 border-radius-xx-right"><label for="" class="small pt-3 px-3 mb-0 text-colorSecPageNavFormLabel" >Destination City</label><input type="text" required class="form-control form-control-lg border-0 rounded-0 shadow-none h-100 bg-transparent py-md-4 f-mFormIB" placeholder="Destination City" name="destination_city[]" id="out_destination'+i.toString()+'"><span onclick="removeRound(this)" class="text-white destRemoveButton" style="font-size: 14px;border-radius: 12px;width:23px;height:23px;padding: 0px 7px 0px;position: absolute;left: 90%;top:10%;z-index:1;background-color:red!important;cursor:pointer">-</span><span onclick="addRound(this)" class="text-white destAddButton" style="font-size: 14px;border-radius: 12px;width:23px;height:23px;padding: 0px 7px 0px;position: absolute;left: 90%;top:55%;z-index:1;background-color: #71f48f!important;cursor:pointer">+</span></div>').insertAfter($(t).parent()),$.ajax({url:"cities_name",type:"POST",data:{},dataType:"JSON",success:function(t){autocomplete(document.getElementById("out_destination"+i.toString()),t.all_cities)}})} function addModify(t){i++,j++,$('<div class="form-group mt-2 mb-2 pl-2 bg-lighttrans col-12 col-sm-3"><label for="one-destination" class="label-font text-colorSecPageNavFormLabel"> Destination City: </label></br><input type="text" required class="form-control bg-transparent text-white border-0 pl-0 f-mFormIB" id="out_destination'+i.toString()+'" placeholder = "Destination City" name="destination_city[]"><span class = "text-white destAddButton" style ="font-size: 14px;border-radius: 12px;width:23px;height:23px;padding: 0px 7px 0px;position: absolute;left: 80%;top:55%;z-index:1;background-color:red!important;cursor:pointer" onclick="removeModify(this)"> - </span><span class="text-white destAddButton" style="font-size:14px; border-radius:12px; width:23px; height:23px;padding:0px 7px 0px;position:absolute;left:90%;top:55%;z-index: 1;background-color:#71f48f!important;cursor:pointer" onclick="addModify(this)"> + </span></div>').insertAfter($(t).parent()),$.ajax({url:"cities_name",type:"POST",data:{},dataType:"JSON",success:function(t){autocomplete(document.getElementById("out_destination"+i.toString()),t.all_cities)}})} function removeModify(t){$(t).parent().remove(),i--} function removeRound(t){$(t).parent().remove(),i--} $(document).ready(function(){$(window).scroll(function(){130<$(this).scrollTop()?($(".navhide").show("fast"),$("#head-out").removeClass("bg-transparent"),$("#head-out").addClass("bg-white")):($(".navhide").hide("fast"),$("#head-out").addClass("bg-transparent"),$("#head-out").removeClass("bg-white"))}),$(".datepicker").datetimepicker({format:"dd M'yy - HH:ii P",autoclose:!0,showMeridian:!0,todayBtn:!0,pickerPosition:"bottom-left"}),Date.prototype.addHours=function(t){return this.setHours(this.getHours()+t),this};var t=(new Date).addHours(2),e=t.getHours()+":"+t.getMinutes(),o=String(t.getDate()).padStart(2,"0"),n=String(t.getMonth()+1).padStart(2,"0"),a=t.getFullYear();todayD=a+"-"+n+"-"+o,todayD=todayD+" "+e,$("input").attr("autocomplete","off"),$(".datepicker").datetimepicker("setStartDate",todayD),$.ajax({url:"cities_name",type:"POST",data:{},dataType:"JSON",success:function(t){autocomplete(document.getElementById("transfer_source"),t.airport_city),autocomplete(document.getElementById("rental_source"),t.all_cities),autocomplete(document.getElementById("one-source"),t.all_cities),autocomplete(document.getElementById("one-destination"),t.all_cities),autocomplete(document.getElementById("out_source"),t.all_cities),autocomplete(document.getElementById("out_destination1"),t.all_cities),autocomplete(document.getElementById("out_destination21"),t.all_cities),autocomplete(document.getElementById("roadtrip_source"),t.all_cities)}}),$("#transfer_type").change(function(){1==$(this).val()?($("#transfer_drop").attr("required","true"),$("#transfer_pick").removeAttr("required"),$("#transfer_pick_div").removeClass("d-block"),$("#transfer_pick_div").addClass("d-none"),$("#transfer_drop_div").addClass("d-block")):2==$(this).val()&&($("#transfer_drop").removeAttr("required"),$("#transfer_pick").attr("required","true"),$("#transfer_pick_div").addClass("d-block"),$("#transfer_drop_div").addClass("d-none"),$("#transfer_drop_div").removeClass("d-block"))}),$("#btn_index_transfer").click(function(){return $(".custom-tooltiptext").css({visibility:"visible",opacity:"1",animation:"mover 1s infinite alternate"}),!1})});