PageSourceSearch

https://ansahotels.com/themes/osboot/js/booking.js

js ansahotels.com collected 2026-10-07 23:11:01 UTC 6,228 bytes, 144 lines download raw bytes

1          var _strHotelCd = "75452";
2          var _strPath = "https://gc.synxis.com/rez.aspx?";
3          
4          //To patch jQuery conflict with prototype & lightbox libraries
5
6          jQuery.noConflict();      
7          jQuery(function() {
8              jQuery("#txtCi").datepicker();
9              jQuery("#txtCo").datepicker();
10              jQuery("#txtCi2").datepicker({
11            dateFormat: 'dd-mm-yy', minDate: 0,
12          });
13                jQuery("#txtCo2").datepicker({
14              dateFormat: 'mm-dd-yy', minDate: 0,
15          });
16  			  var pretty = new Date();
17  			  var prettym = pretty.getMonth()+1;
18  			  var prettyd = pretty.getDate();
19  			  var output = (prettyd<10 ? '0' : '') + prettyd + '-' + (prettym<10 ? '0' : '') + prettym +  '-' + pretty.getFullYear();
20  			  jQuery("#txtCi2").val(output);
21  			  
22  			  });
23         
24          function getTrim(param) {
25              var value = param
26              while (value.substring(0, 1) == ' ') {
27                  value = value.substring(1, value.length);
28              }
29              while (value.substring(value.length - 1, value.length) == ' ') {
30                  value = value.substring(0, value.length - 1);
31              }
32              return value;
33          }
34  
35          function allowNumericOnly(p_objText) {
36              var v_regExp = /^\d+$/;
37              var v_strTemp;
38  
39              with (p_objText) {
40                  if (value.length < 2) {
41                      v_strTemp = value;
42                      if (!v_regExp.test(v_strTemp)) value = "";
43                  }
44                  else {
45                      v_strTemp = value.substring(0, 1);
46                      if (!v_regExp.test(v_strTemp)) value = value.substring(1, value.length);
47  
48                      v_strTemp = value.substring(value.length - 1);
49                      if (!v_regExp.test(v_strTemp)) value = value.substring(0, value.length - 1);
50  
51                      if (!v_regExp.test(value)) {
52  
53                          v_strTemp = "";
54                          for (var v_intCounter = 0; v_intCounter < value.length; v_intCounter++) {
55                              if (v_regExp.test(value.substring(v_intCounter, v_intCounter + 1))) v_strTemp += value.substring(v_intCounter, v_intCounter + 1);
56                          }
57                          value = v_strTemp;
58                      }
59                  }
60              }
61              return true;
62          }
63  
64          //function fRetrieve() {
65//				_gaq.push(function() {
66//					var _trk = _gaq._getAsyncTracker();
67//					window.location = _trk._getLinkerUrl(_strPath + "BE/Index.aspx?hotelcd=" + _strHotelCd + "&mode=retrieve");
68//				});
69//			}
70  
71          function fSelectCountry(param) {
72              var objCity = document.getElementById("slcCity");
73              var objHotel = document.getElementById("slcHotel");
74  
75              objCity.innerHTML = "";
76              objCity.options[0] = new Option("[select city]");
77              objCity.options[0].value = "";
78  
79              objHotel.innerHTML = "";
80              objHotel.options[0] = new Option("[select hotel]");
81              objHotel.options[0].value = "";
82              objHotel.options[1] = new Option("All Hotels");
83              objHotel.options[1].value = "ALL";
84  
85              if (param.value != "") {
86                  var objCountryData = document.getElementById("hdn" + param.value);
87                  var arrCityData = objCountryData.value.split("|#|");
88                  for (var i = 0; i < arrCityData.length; i++) {
89                      var arrCityDtl = arrCityData[i].split("|~|");
90                      objCity.options[i + 1] = new Option(arrCityDtl[1]);
91                      objCity.options[i + 1].value = arrCityDtl[0];
92                  }
93              }
94          }
95  
96          function fSelectCity(param) {
97              var objCountry = document.getElementById("slcCountry");
98              var objHotel = document.getElementById("slcHotel");
99              var objHotelData = document.getElementById("hdnHotelData");
100              var arrHotelData = objHotelData.value.split("|#|");
101  
102              objHotel.innerHTML = "";
103              objHotel.options[0] = new Option("[select hotel]");
104              objHotel.options[0].value = "";
105              objHotel.options[1] = new Option("All Hotels");
106              objHotel.options[1].value = "ALL";
107  
108              for (var i = 0; i < arrHotelData.length; i++) {
109                  var arrTemp = arrHotelData[i].split("|*|");
110                  if (arrTemp[0] == objCountry.value + "_" + param.value) {
111                      var arrManyHotel = arrTemp[1].split("|@|");
112                      for (var j = 0; j < arrManyHotel.length; j++) {
113                          var arrHotelDtl = arrManyHotel[j].split("|~|");
114                          objHotel.options[j + 2] = new Option(arrHotelDtl[1]);
115                          objHotel.options[j + 2].value = arrHotelDtl[0];
116                      }
117                  }
118              }
119          }
120        function fSearch2() {
121          var objCi = (document.getElementById("txtCi2").value).split('-');
122          var objCid=objCi[0];
123          var objCim=objCi[1];
124          var objCiy=objCi[2];
125          var objCiv=objCim+"/"+objCid+"/"+objCiy;
126          var objnight = document.getElementById("txtNight2").value;
127          var objroom = document.getElementById("txtRoom2").value;
128          var objadlt = document.getElementById("txtAdult2").value;
129          var _subURL = _strPath + ("Hotel=" + _strHotelCd + "&arrive=" + objCiv + "&nights=" + objnight + "&rooms=" + objroom + "&adult=" + objadlt+"&template=RBE&shell=RBE&start=availresults");
130          var trackers, linker, url;
131          var destinationUrl = _subURL;
132          if(typeof ga !== 'undefined' && typeof ga.getAll === 'function'){
133            trackers = ga.getAll();
134            if(trackers.length) {
135            linker = new window.gaplugins.Linker(trackers[0]);
136            destinationUrl = linker.decorate(destinationUrl);
137            url = destinationUrl;
138            }
139          }else {
140            url = destinationUrl ;
141          }
142          window.open(url,"_blank");
143          return false;		  
144        }

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.