PageSourceSearch

https://www.ticketstoworld.co.uk/js/search.js?ver=0.4

js ticketstoworld.co.uk collected 2026-09-26 07:14:13 UTC 31,631 bytes, 865 lines download raw bytes

1$(document).ready(function () {
2
3    //$('[data-toggle="tooltip"]').tooltip();
4
5    bindAirline("txtairline");
6
7
8
9    // $(".chosen").chosen({ width: "100%" });
10
11    $(".jrnlab").click(function () {
12        showhideSearch(this.id);
13    });
14    $(".flt-toggle").click(function () {
15        $(".flt-passangerbox").slideToggle();
16    });
17
18
19    $(".adltbox").change(function () {
20        travelValidation();
21    })
22
23    $('.swep-field').on('click', function () {
24        var a = $('#txtfrom').val(); var b = $('#txtto').val();
25        $('#txtfrom').val(b); $('#txtto').val(a);
26    });
27    
28    $('#btnSearchFlight').on('click', function () {
29
30        var chktyp = $(this).data("btn");
31        if (chktyp == "rslt") {
32            //searchFlight();
33            $("#modify-search").modal("hide");
34            startProg();
35            searchvalue(callSearchFromResult);
36            setSearchValues();
37        }
38        else {
39            searchvalue(callSearchSuccess);
40        }
41    });
42
43
44
45
46    $('#txtdptdate').datepicker({
47        minDate: -0, maxDate: '+11M', numberOfMonths: 2,
48        dateFormat: 'dd-M-yy',
49        changeMonth: true, changeYear: true,
50        highlight: true,
51        onSelect: function (dateText, inst) {
52            var dates = $.datepicker.parseDate('dd-M-yy', dateText);
53            var theDate = new Date(Date.parse($(this).datepicker('getDate')));
54
55            var tosetDate = new Date();
56            tosetDate.setDate(theDate.getDate() + 7);
57            $("#txtretdate").datepicker("option", "minDate", theDate);
58            $('#txtretdate').datepicker('setDate', tosetDate);
59            setTimeout(function () { $("#txtretdate").focus() }, 50);
60        }
61
62    });
63
64
65    $('#txtretdate').datepicker({
66        minDate: -0, maxDate: '+11M', numberOfMonths: 2,
67        dateFormat: 'dd-M-yy',
68        changeMonth: true, changeYear: true
69
70    })
71    $('#txtdepdate1').datepicker({
72        minDate: -0, maxDate: '+11M', numberOfMonths: 2,
73        dateFormat: 'dd-M-yy',
74        changeMonth: false, changeYear: false, highlight: true,
75        onSelect: function (dateText, inst) {
76            var dates = $.datepicker.parseDate('dd-M-yy', dateText);
77            var theDate = new Date(Date.parse($(this).datepicker('getDate')));
78
79            var tosetDate = new Date();
80            tosetDate.setDate(theDate.getDate() + 1);
81            $("#txtdepdate2").datepicker("option", "minDate", theDate);
82            //$('#txtdepdate2').datepicker('setDate', tosetDate);
83        }
84
85    });
86
87    $('#txtdepdate2').datepicker({
88        minDate: -0, maxDate: '+11M', numberOfMonths: 2,
89        dateFormat: 'dd-M-yy',
90        changeMonth: false, changeYear: false, highlight: true,
91        onSelect: function (dateText, inst) {
92            var dates = $.datepicker.parseDate('dd-M-yy', dateText);
93            var theDate = new Date(Date.parse($(this).datepicker('getDate')));
94
95            var tosetDate = new Date();
96            tosetDate.setDate(theDate.getDate() + 1);
97            $("#txtdepdate3").datepicker("option", "minDate", theDate);
98            //$('#txtdepdate3').datepicker('setDate', tosetDate);
99        }
100
101    });
102
103    $('#txtdepdate3').datepicker({
104        minDate: -0, maxDate: '+11M', numberOfMonths: 2,
105        dateFormat: 'dd-M-yy',
106        changeMonth: false, changeYear: false, highlight: true,
107        onSelect: function (dateText, inst) {
108            var dates = $.datepicker.parseDate('dd-M-yy', dateText);
109            var theDate = new Date(Date.parse($(this).datepicker('getDate')));
110
111            var tosetDate = new Date();
112            tosetDate.setDate(theDate.getDate() + 1);
113            $("#txtdptdate4").datepicker("option", "minDate", theDate);
114            //$('#txtdptdate4').datepicker('setDate', tosetDate);
115        }
116
117    });
118
119    $('#txtdptdate4').datepicker({
120        minDate: -0, maxDate: '+11M', numberOfMonths: 2,
121        dateFormat: 'dd-M-yy',
122        changeMonth: false, changeYear: false, highlight: true,
123        onSelect: function (dateText, inst) {
124            var dates = $.datepicker.parseDate('dd-M-yy', dateText);
125            var theDate = new Date(Date.parse($(this).datepicker('getDate')));
126
127            var tosetDate = new Date();
128            tosetDate.setDate(theDate.getDate() + 1);
129            $("#txtdptdate5").datepicker("option", "minDate", theDate);
130            //$('#txtdptdate5').datepicker('setDate', tosetDate);
131        }
132
133    });
134
135    $('#txtdptdate5').datepicker({
136        minDate: -0, maxDate: '+11M', numberOfMonths: 2,
137        dateFormat: 'dd-M-yy',
138        changeMonth: false, changeYear: false, highlight: true,
139        onSelect: function (dateText, inst) {
140            var dates = $.datepicker.parseDate('dd-M-yy', dateText);
141            var theDate = new Date(Date.parse($(this).datepicker('getDate')));
142
143            var tosetDate = new Date();
144            tosetDate.setDate(theDate.getDate() + 1);
145            $("#txtdepdate6").datepicker("option", "minDate", theDate);
146            //$('#txtdepdate6').datepicker('setDate', tosetDate);
147        }
148
149    });
150
151    $('#txtdepdate6').datepicker({
152        minDate: -0, maxDate: '+11M', numberOfMonths: 2,
153        dateFormat: 'dd-M-yy',
154        changeMonth: false, changeYear: false
155
156    })
157
158
159
160    $(".openmydrop").click(function () {
161        $(".myopendropbox").toggle();
162    });
163
164
165    $(".typeahead").on('keyup', function (e) {
166        if (this.id == "txtfrom") {
167            if ($(this).val() != '') {
168                $('.clrfrom').show();
169            }
170            else { $('.clrfrom').hide(); }
171        }
172        if (this.id == "txtto") {
173            if ($(this).val() != '') {
174                $('.clrto').show();
175            }
176            else { $('.clrto').hide(); }
177        }
178        if (e.which == 13) {
179            if (this.id == "txtfrom") {
180                setTimeout(function () { $("#txtto").focus() }, 50);
181            }
182            if (this.id == "txtto") {
183                setTimeout(function () { $("#txtdptdate").focus() }, 50);
184            }
185            if (this.id == "txtfrom1") {
186                setTimeout(function () { $("#txtto1").focus() }, 50);
187            }
188            if (this.id == "txtto1") {
189                setTimeout(function () { $("#txtdptdate1").focus() }, 50);
190            }
191            if (this.id == "txtfrom2") {
192                setTimeout(function () { $("#txtto2").focus() }, 50);
193            }
194            if (this.id == "txtto2") {
195                setTimeout(function () { $("#txtdptdate2").focus() }, 50);
196            }
197            if (this.id == "txtfrom3") {
198                setTimeout(function () { $("#txtto3").focus() }, 50);
199            }
200            if (this.id == "txtto3") {
201                setTimeout(function () { $("#txtdptdate3").focus() }, 50);
202            }
203            if (this.id == "txtfrom4") {
204                setTimeout(function () { $("#txtto4").focus() }, 50);
205            }
206            if (this.id == "txtto4") {
207                setTimeout(function () { $("#txtdptdate4").focus() }, 50);
208            }
209            if (this.id == "txtfrom5") {
210                setTimeout(function () { $("#txtto5").focus() }, 50);
211            }
212            if (this.id == "txtto5") {
213                setTimeout(function () { $("#txtdptdate5").focus() }, 50);
214            }
215        }
216    });
217
218    $("#txttraveller").on("keypress", function () { return false; });
219});
220
221$('.typeahead').typeahead({
222    autoselect: true,
223    hint: true,
224    highlight: true,
225    minLength: 2, maxLength: 8
226},
227    {
228
229        source: function (q, cb) {
230            var url1 = "";
231            url1 = "/CommonForms";
232
233            $.ajax({
234                type: 'POST',
235                url: url1 + "/select.aspx/getAirportSuggestion",
236                data: "{'qy':'" + q + "'}",
237                contentType: "application/json; charset=utf-8",
238                //contentType:"application/x-www-form-urlencoded; charset=UTF-8",
239                dataType: "json",
240                success: function (response) {
241                    data = response.d;//.replace('{\"d\":\"', '"');
242                    var hh = data.split(",");
243                    hh.splice(-1, 1);
244                    var result = [];
245                    $.each(hh, function (index, val) {
246                        result.push({
247                            value: val
248                        });
249                    });
250                    cb(result);
251                },
252                error: function (xhr, status, error) {
253                    //hh = "";
254                }
255            });
256
257        }
258    });
259
260    function clrfld(id) {
261        $('#txt' + id).val('');
262        $('.clr' + id).hide();
263    }
264function showhideSearch(objid) {
265    try {
266        $("#trip").val(objid);
267        if (objid != "M") {
268            $(".multicity").hide();
269            $("#returndiv").show();
270            $("#advancediv").show();
271            $("#flaxdiv").show();
272            if (objid == "R") {
273                $("#R").addClass("active");
274                $("#O").removeClass("active");
275                $("#M").removeClass("active");
276                $("#returndt *").prop('disabled', false);
277                $("#txtretdate").removeClass("disabled_div_color");
278                $("#txtrettime").removeClass("disabled_div_color");
279            }
280            else {
281
282                $("#returndt *").prop('disabled', true);
283                $("#txtretdate").addClass("disabled_div_color");
284                $("#txtrettime").addClass("disabled_div_color");
285                $("#R").removeClass("active");
286                $("#O").addClass("active");
287                $("#M").removeClass("active");
288
289
290            }
291
292        }
293        else {
294            $(".multicity").show();
295            $("#returndiv").hide();
296            $("#R").removeClass("active");
297            $("#O").removeClass("active");
298            $("#M").addClass("active");
299            $("#advancediv").hide();
300            $("#flaxdiv").hide();
301        }
302    }
303    catch (err) { }
304}
305
306function travelValidation() {
307    try {
308        var pax = 0;
309        var adt, inf, cnn;
310        adt = 0; cnn = 0; inf = 0;
311        $(".adltbox").each(function () {
312            if (this.id == "txtadt") {
313                pax = $(this).val() + " Adult";
314                adt = parseInt($(this).val());
315            }
316            if (this.id == "txtcnn" && parseInt($(this).val()) > 0 && (parseInt($(this).val()) + adt) <= 9) {
317                pax = pax + "," + $(this).val() + " Child";
318                cnn = parseInt($(this).val());
319            }
320            else if (this.id == "txtcnn" && parseInt($(this).val()) > 0 && (parseInt($(this).val()) + adt) > 9) {
321                $(this).val("0");
322                parent.alertBox("Pax can't be greater than 9.");
323            }
324            if (this.id == "txtinf" && parseInt($(this).val()) > 0 && parseInt($(this).val()) <= adt) {
325                pax = pax + "," + $(this).val() + " Infant";
326                inf = parseInt($(this).val());
327            }
328            else if (this.id == "txtinf" && parseInt($(this).val()) > 0 && parseInt($(this).val()) > adt) {
329                $(this).val("0");
330                parent.alertBox("Infant Can't be greater than adult.");
331            }
332
333        });
334
335        $("#txttraveller").val(pax);
336        $("#adult").val($("#txtadt").val());
337        $("#child").val($("#txtcnn").val());
338        $("#infant").val($("#txtinf").val());
339    }
340    catch (err) { }
341}
342
343function searchvalue(callMthd) {
344    try {
345        var srchStr = {};
346        var airline = jrn = tripstr = gds = faretype = flax = nonstop = "";
347        if ($("#txtairline").val() == null) {
348            airline = "Any";
349        }
350        else {
351            airline = $("#txtairline").val().toString();
352
353        }
354        jrn = $("#trip").val();
355
356        nonstop = $("#chknonstop").is(':checked');
357        flax = $("#chkflex").is(':checked');
358        gds = "ALL";
359        faretype = "ALL";
360
361        $("#faretype").val(faretype);
362        $("#gds").val(gds);
363        $("#flex").val(flax);
364        $("#nonstop").val(nonstop);
365        $("#currency").val("GBP");
366        $("#airline").val(airline);
367
368        var tripVal = "", country = "";
369        if ($("#trip").val() == "R") {
370            tripVal = "R";
371            country = extractCountryCode($("#txtfrom").val());
372            srchtype = "SIMPLE";
373        }
374        else if ($("#trip").val() == "O") {
375            tripVal = "O";
376            country = extractCountryCode($("#txtfrom").val());
377            srchtype = "SIMPLE";
378        }
379        else {
380            tripVal = "M";
381            country = extractCountryCode($("#txtfrom1").val());
382            srchtype = "MULCITY";
383        }
384
385        //var fromDest = "", toDest = "";
386        //var country = "";
387        //var frmA = $("#txtfrom").val();
388        //if (frmA != "") {
389        //    frmA = frmA.split("(");
390        //    fromDest = frmA[1].replace(")", "");
391        //    frmA = frmA[0].split(":");
392        //    country = frmA[1].replace(' ', '');
393
394        //}
395
396        //var frmT = $("#txtto").val();
397        //if (frmT != "") {
398        //    frmT = frmT.split("(");
399        //    toDest = frmT[1].replace(")", "");
400        //}
401
402        //srchStr.departureAirport = fromDest;
403        //srchStr.arrivalAirport = toDest;
404        //srchStr.departureDate = $("#txtdptdate").val();
405        //srchStr.departureTime = $("#txtdeptime").val();
406        //srchStr.arrivalDate = $("#txtretdate").val();
407        //srchStr.arrivalTime = $("#txtrettime").val();
408        if (jrn == "R" || jrn == "O") {
409            srchStr.departureAirport = extractDestCode($("#txtfrom").val());
410            srchStr.arrivalAirport = extractDestCode($("#txtto").val());
411            srchStr.departureDate = $("#txtdptdate").val();
412            srchStr.departureTime = $("#txtdeptime").val();
413            srchStr.arrivalDate = $("#txtretdate").val();
414            srchStr.arrivalTime = $("#txtrettime").val();
415        }
416        else if (jrn == "M") {
417            srchStr.departureAirport = extractDestCode($("#txtfrom1").val());
418            srchStr.arrivalAirport = extractDestCode($("#txtto1").val());
419            srchStr.departureDate = $("#txtdepdate1").val();
420            srchStr.departureAirport2 = extractDestCode($("#txtfrom2").val());
421            srchStr.arrivalAirport2 = extractDestCode($("#txtto2").val());
422            srchStr.departureDate2 = $("#txtdepdate2").val();
423            srchStr.departureAirport3 = extractDestCode($("#txtfrom3").val());
424            srchStr.arrivalAirport3 = extractDestCode($("#txtto3").val());
425            srchStr.departureDate3 = $("#txtdepdate3").val();
426            srchStr.departureAirport4 = extractDestCode($("#txtfrom4").val());
427            srchStr.arrivalAirport4 = extractDestCode($("#txtto4").val());
428            srchStr.departureDate4 = $("#txtdptdate4").val();
429            srchStr.departureAirport5 = extractDestCode($("#txtfrom5").val());
430            srchStr.arrivalAirport5 = extractDestCode($("#txtto5").val());
431            srchStr.departureDate5 = $("#txtdptdate5").val();
432            srchStr.departureAirport6 = extractDestCode($("#txtfrom6").val());
433            srchStr.arrivalAirport6 = extractDestCode($("#txtto6").val());
434            srchStr.departureDate6 = $("#txtdepdate6").val();
435        }
436        srchStr.adults = parseInt($("#txtadt").val());
437        srchStr.children = parseInt($("#txtcnn").val());
438        srchStr.infant = parseInt($("#txtinf").val());
439        srchStr.carrier = airline;
440        srchStr.roundTrip = tripVal;
441        srchStr.cabin = $("#txtcabin").val();
442        srchStr.nonStop = nonstop;
443        srchStr.search = srchtype;//flax==false?"":"flex";
444        srchStr.currency = "GBP"
445        srchStr.commission = 0;
446        srchStr.faretype = faretype;
447        srchStr.gds = gds;
448        srchStr.agencyid = "A000001";
449        srchStr.userid = "";
450        srchStr.ipAddress = "";
451        srchStr.AgencyDB = "";
452        srchStr.CountryCode = country;
453        srchStr.CurentDateTime = "";
454        srchStr.CurentDate = "";
455
456        if (SrchValidation(srchStr)) {
457            callMthd(srchStr);
458        }
459
460    }
461    catch (err) {
462        alert(err);
463    }
464}
465function extractDestCode(dest) {
466    var fromDest = "";
467    if (dest != "" && dest != undefined) {
468        var frmA = dest.split("(");
469        fromDest = frmA[1].replace(")", "");
470    }
471    return fromDest;
472}
473
474function extractCountryCode(dest) {
475    var country = "";
476    if (dest != "" && dest != undefined) {
477        var frmA = dest.split(" ");
478        country = frmA[2];
479    }
480    return country;
481}
482function callSearchSuccess(srchStr) {
483//    var fSrch = JSON.stringify(srchStr);
484//    var fltSrchStr = $.param({ "FlightSearch": fSrch });
485//    var agencyid = "A000001";
486
487//    $("#frmsearch").append($("<input/>").attr({ name: "FlightSearch", value: fSrch, type: "hidden" }));
488//    $("#frmsearch").append($("<input/>").attr({ name: "frmDest", value: $("#txtfrom").val(), type: "hidden" }));
489//    $("#frmsearch").append($("<input/>").attr({ name: "toDest", value: $("#txtto").val(), type: "hidden" }));
490//    $("#frmsearch").append($("<input/>").attr({ name: "agencyid", value: agencyid, type: "hidden" }));
491//    $("#frmsearch").submit();
492    flightsearch(srchStr);
493
494
495
496}
497function flightsearch(srchStr) {
498
499    var searchString = srchStr.carrier + "|" + "F" + "|ticketstoworld|" + srchStr.cabin + "|" + ($("#chknonstop").is(':checked') ? "1" : "0") + "|" + ($("#trip").val() == "R" ? "" : "1") + "|" + srchStr.adults + "|" + srchStr.children + "|" + srchStr.infant + "|" + srchStr.departureAirport + "|" + srchStr.arrivalAirport + "|" + srchStr.departureDate + "|" + srchStr.arrivalDate + "|" + srchStr.arrivalAirport + "|" + srchStr.CountryCode + "|" + ($("#chkflex").is(':checked') ? "1" : "0") + "|ticketstoworld"; var name = "ticketstoworld";
500
501    var Base64 = { _keyStr: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
501+/=", encode: function (e) { var t = ""; var n, r, i, s, o, u, a; var f = 0; e = Base64._utf8_encode(e); while (f < e.length) { n = e.charCodeAt(f++); r = e.charCodeAt(f++); i = e.charCodeAt(f++); s = n >> 2; o = (n & 3) << 4 | r >> 4; u = (r & 15) << 2 | i >> 6; a = i & 63; if (isNaN(r)) { u = a = 64 } else if (isNaN(i)) { a = 64 } t = t + this._keyStr.charAt(s) + this._keyStr.charAt(o) + this._keyStr.charAt(u) + this._keyStr.charAt(a) } return t }, decode: function (e) { var t = ""; var n, r, i; var s, o, u, a; var f = 0; e = e.replace(/[^A-Za-z0-9\+\/\=]/g, ""); while (f < e.length) { s = this._keyStr.indexOf(e.charAt(f++)); o = this._keyStr.indexOf(e.charAt(f++)); u = this._keyStr.indexOf(e.charAt(f++)); a = this._keyStr.indexOf(e.charAt(f++)); n = s << 2 | o >> 4; r = (o & 15) << 4 | u >> 2; i = (u & 3) << 6 | a; t = t + String.fromCharCode(n); if (u != 64) { t = t + String.fromCharCode(r) } if (a != 64) { t = t + String.fromCharCode(i) } } t = Base64._utf8_decode(t); return t }, _utf8_encode: function (e) { e = e.replace(/\r\n/g, "\n"); var t = ""; for (var n = 0; n < e.length; n++) { var r = e.charCodeAt(n); if (r < 128) { t += String.fromCharCode(r) } else if (r > 127 && r < 2048) { t += String.fromCharCode(r >> 6 | 192); t += String.fromCharCode(r & 63 | 128) } else { t += String.fromCharCode(r >> 12 | 224); t += String.fromCharCode(r >> 6 & 63 | 128); t += String.fromCharCode(r & 63 | 128) } } return t }, _utf8_decode: function (e) { var t = ""; var n = 0; var r = c1 = c2 = 0; while (n < e.length) { r = e.charCodeAt(n); if (r < 128) { t += String.fromCharCode(r); n++ } else if (r > 191 && r < 224) { c2 = e.charCodeAt(n + 1); t += String.fromCharCode((r & 31) << 6 | c2 & 63); n += 2 } else { c2 = e.charCodeAt(n + 1); c3 = e.charCodeAt(n + 2); t += String.fromCharCode((r & 15) << 12 | (c2 & 63) << 6 | c3 & 63); n += 3 } } return t } }
502    var sstring = Base64.encode(searchString); window.location = "https://flights.ticketstoworld.co.uk/waiting.aspx?srchId=" + sstring; return false;
503}
504function SrchValidation(srchStr) {
505    var srchA = [];
506    srchA = srchStr;
507    var rtn = 1;
508    if (srchA.departureAirport == "") {
509        parent.alertBox("Please enter departure airport");
510        rtn = 0;
511    }
512    else if (srchA.roundTrip == "R") {
513        if (srchA.arrivalAirport == "") {
514            parent.alertBox("Please enter arrival airport");
515            rtn = 0;
516        }
517        else if (srchA.departureDate == "") {
518            parent.alertBox("Please select departure date");
519            rtn = 0;
520        }
521        else if (srchA.arrivalDate == "") {
522            parent.alertBox("Please select arrival date");
523            rtn = 0;
524        }
525        else if (srchA.gds == "") {
526            parent.alertBox("Please select gds");
527            rtn = 0;
528        }
529    }
530    else if (srchA.departureDate == "") {
531        parent.alertBox("Please select departure date");
532        rtn = 0;
533    }
534    else if (srchA.gds == "") {
535        parent.alertBox("Please select gds");
536        rtn = 0;
537    }
538    return rtn;
539}
540
541//////////////////////
542function sendckout(frmob, JourneyType, segid, total) {
543    Loading("show");
544    frmob = frmob + segid;
545
546    var form = $("#" + frmob);
547    var outstr = "";
548    var instr = "";
549    //var abc;
550    // abc = $("#FareStr0")[0].outerHTML;
551    // alert(abc);
552    var fstr = $("#FareStr" + segid).val();
553    var dis = $("#distribution" + segid).val();
554    if (JourneyType == "R") {
555        outstr = findSelectedSeg('OUT', segid);
556        instr = findSelectedSeg('IN', segid);
557        if (outstr == '' || instr == '') {
558            alertBox("please Select Outbound and Inbound Options");
559            return false;
560        }
561    }
562    else if (JourneyType == "O") {
563        outstr = findSelectedSeg('OUT', segid);
564        if (outstr == '') {
565            alert("please Select Outbound  Options");
566            return false;
567        }
568    }
569    else if (JourneyType == "M") {
570        outstr = findSelectedSeg('M', segid);
571
572    }
573    var encodeseg = makesegment(outstr, instr, JourneyType);
574    var encodefare = fstr;// makefare(fstr);
575    var agtid = $("#agentuserid").val();
576
577
578    //form.append($("<input/>").attr({ name: "encodeseg", value: encodeseg, type: "hidden" }));
579    //form.append($("<input/>").attr({ name: "encodefare", value: encodefare, type: "hidden" }));
580    //form.append($("<input/>").attr({ name: "agentuserid", value: agtid, type: "hidden" }));
581
582    var param = "{'segment':'" + encodeseg + "','fare':'" + encodefare + "'}";
583    Request("FlightResult.aspx/validateSeg", param, afterValidate);
584
585    //document.forms[frmob].submit();
586    //}
587
588
589}
590
591function afterValidate(rslt) {
592    Loading("hide");
593    var valRs = JSON.parse(rslt);
594    var cursym = getSysmbol(valRs.getRevalidationResult.Fares[0].Currency);
595    var cursym = valRs.getRevalidationResult.Fares[0].Currency;
596    var fareDiff = valRs.getRevalidationResult.Fares[0].FareDiff;
597    // var diff =  parseFloat(fareDiff);
598    //if(diff>0)
599    //{
600    //    parent.swal({
601    //        title: 'Confirm',
602    //        text: "Fare has been up by "+cursym+" "+diff+" .Do you want to continue ?",
603    //        type: 'warning',
604    //        showCancelButton: true,
605    //        //confirmButtonColor: '#FF3B30',
606    //        confirmButtonClass: 'btn btn-danger',
607    //        cancelButtonColor: '#d33',
608    //        confirmButtonText: 'Yes',
609    //        closeOnConfirm: true
610    //    },
611    //   function (isConfirm) {
612
613    //       if (isConfirm) {
614    //           var form = $("#frmValid");
615    //           form.append($("<input/>").attr({ name: "valjson", value: rslt, type: "hidden" }));
616    //           document.forms["frmValid"].submit();
617
618    //       } 
619    //   });
620    //}
621    //else
622    //{
623    var form = $("#frmValid");
624    form.append($("<input/>").attr({ name: "valjson", value: rslt, type: "hidden" }));
625    document.forms["frmValid"].submit();
626    // }
627
628}
629
630//find selected segment
631//function findSelectedSeg(segtype, segid) {
632//    var segstr = "";
633//    if (segtype == 'OUT') {
634//        segstr = $('input[type=radio][name=Outbound' + segid + ']:checked').val();
635//    }
636//    else if (segtype == 'IN') {
637//        segstr = $('input[type=radio][name=Inbound' + segid + ']:checked').val();
638//    }
639//    else if (segtype == 'M') {
640//        var mcount = $("#mcount").val();
641//        // for (var m = 0; m < parseInt(mcount); m++) {
642//        segstr = segstr + $('#seggroupout' + segid).val();
643//        // }
644//    }
645
646
647
648//    return segstr;
649//}
650function findSelectedSeg(segtype, segid) {
651    var segstr = "";
652    if (segtype == 'OUT') {
653        segstr = $('input[type=radio][name=Outbound' + segid + ']:checked').val();
654    }
655    else if (segtype == 'IN') {
656        segstr = $('input[type=radio][name=Inbound' + segid + ']:checked').val();
657    }
658    else if (segtype == 'M') {
659        var segs = $('input[type=radio][data-rslttyp="MULCITY"][data-grp="' + segid + '"]');//.val();
660        var segArrN = [];
661        for (var r = 0; r < segs.length; r++) {
662
663            var segArr = JSON.parse($(segs[r]).val());
664            for (var j = 0; j < segArr.length; j++) {
665                segArrN.push(segArr[j]);
666            }
667            //segstr += $(segs[r]).val();
668        }
669        segstr = JSON.stringify(segArrN);
670    }
671    return segstr;
672}
673
674function makesegment(segout, segin, rtype) {
675    try {
676        var rcount = 1;
677        var segment = [];
678        var x = 1;
679        if (rtype == "R") {
680            rcount = 2;
681        }
682        //for (var n = 1; n <= rcount; n++) {
683        //    var arr = segout.split('^');
684        //    if (n == 1) {
685        //        arr = segout.split('^');
686        //    }
687        //    else {
688        //        arr = segin.split('^');
689        //    }
690        //    for (var i = 0; i <= arr.length - 2; i++) {
691        //        var strseg = arr[i].split('|');
692        //        var obseg = {};
693        //        obseg.DepDest = strseg[0];
694        //        obseg.ToDest = strseg[1];
695        //        obseg.MarketingAirline = strseg[2];
696        //        obseg.FlightNo = strseg[3];
697        //        obseg.DepDate = strseg[4];
698        //        obseg.DepTime = strseg[5];
699        //        obseg.ArrDate = strseg[6];
700        //        obseg.ArrTime = strseg[7];
701        //        obseg.OperatingAirline = strseg[8];
702        //        obseg.DepTerminal = strseg[9];
703        //        obseg.arrTerminal = strseg[10];
704        //        obseg.Equipment = strseg[11];
705        //        obseg.groundtime = strseg[12];
706        //        obseg.EFT = strseg[13];
707        //        obseg.journeyTime = strseg[14];
708        //        obseg.Cls = strseg[15];
709        //        obseg.Seat = strseg[16];
710        //        obseg.FareBasis = strseg[17];
711
712        //        obseg.Ftype = strseg[18];
713        //        obseg.Baggage = strseg[19];
714        //        obseg.Group = 0;
715        //        obseg.Validatestr = strseg[20];
716        //        obseg.Segament = strseg[21];
717        //        obseg.MarriageGrp = strseg[22];
718        //        if (n == 1)
719        //        { obseg.Return = "Outbound"; }
720        //        else
721        //        { obseg.Return = "Inbound"; }
722        //        segment.push(obseg);
723        //        x++;
724        //    }
725        //}
726        //var encodeddata = encodeURIComponent(JSON.stringify(segment));
727        //    var encodeddata = JSON.stringify(segment);
728        //    return encodeddata;
729        //}
730        //catch(err)
731        //{
732
733        //}
734        var encodeddata;
735        if (rtype == "O" || rtype == "M") {
736            encodeddata = segout;
737        }
738        else {
739            var jsnOSeg = encodeURIComponent(JSON.stringify(segout));
740            var jsnISeg = encodeURIComponent(JSON.stringify(segin));
741            var allseg = jsnOSeg.concat(jsnISeg);
742            encodeddata = JSON.stringify(allseg);
743        }
744        return encodeddata;
745    }
746    catch (err) {
747
748    }
749
750}
751
752
753
754function Loading(act) {
755    if (act.toUpperCase() == "SHOW") {
756        $("#loading").show();
757    }
758    else {
759        $("#loading").hide();
760    }
761
762
763}
764
765function chkCredit() {
766    var rm = 1;
767    var RmAmt = parseFloat(parent.$("#prtRmAmt").val());
768    var CLimitReminderAmt = parseFloat(parent.$("#prtCdLimitR").val());
769    if (RmAmt <= CLimitReminderAmt) {
770        parent.prtalertBox("Your credit amount is less and you can not make booking.");
771        rm = 0;
772    }
773    return rm;
774}
775
776function DashBookings() {
777
778    var usertype = parent.$("#prtALev").val();
779    var agencyID = "", agentID = "";
780    agencyID = parent.$("#prtAgnID").val();
781    agentID = parent.$("#prtAgID").val();
782    var parms = "{'usertype':'" + usertype + "','agencyid':'" + agencyI
782D + "','agentid':'" + agentID + "'}";
783    Request("CommonForms/select.aspx/DashBookings", parms, bindData);
784
785}
786function Request(method, parms, func) {
787
788    $.ajax({
789        type: 'post',
790        url: method,
791        data: parms,
792        contentType: "application/json; charset=utf-8",
793        dataType: "json",
794        success: function (response) {
795            func(response.d);
796        },
797        error: function (xhr, status, error) {
798            swal('Oops...', error, "error");
799        }
800    });
801}
802function bindData(rslt) {
803    try {
804        var rJson = JSON.parse(rslt);
805        var arr = [];
806        $.each(rJson.Table, function (indx, item) {
807
808            arr.push(["",
809                this.BookingID,
810                this.FLocator,
811                this.Pax,
812                this.DepAirport,
813                this.ArrAirport,
814                this.DptDate,
815                this.Carrier,
816                this.AgencyID
817
818            ]);
819        });
820
821        $('#tblBookings').dataTable({
822            "bDestroy": true,
823            "bScrollCollapse": true,
824            "bJQueryUI": false,
825            "bPaginate": false,
826            "bLengthChange": false,
827            "bInfo": false,
828            "bFilter": false,
829            "bSort": true,
830            "aaData": arr,
831            "aoColumns": [
832                {
833                    "sTitle": "",
834                    "orderable": true,
835                    "data": null,
836                    "defaultContent": ''
837                },
838                { "sTitle": "Booking ID" },
839                { "sTitle": "Locator", "visible": false },
840                { "sTitle": "Lead Pax" },
841                { "sTitle": "Dep" },
842                { "sTitle": "Arr" },
843                { "sTitle": "DptDate" },
844
845                { "sTitle": "Carrier" },
846
847
848            ]
849        });
850
851        $('#tblBookings tr').css('cursor', 'pointer');
852    }
853    catch (e) {
854
855    }
856
857}
858$("#tblBookings").on("dblclick", "tr", function () {
859    var oTable = $('#tblBookings').DataTable();
860    var aData = oTable.row(this).data();
861    $(this).addClass('selectedRecord').siblings().removeClass('selectedRecord');
862    var Url = 'Flight/BookingDetail.aspx?Type=chk&BookingID=' + aData[1] + "&FLocator=" + aData[2] + "&AgencyID=" + aData[8];
863    parent.addTab(aData[2], Url);
864
865});

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.