function OpenAirRequestMVVMForm() {
    debugger;
    //kendo.ui.progress($("body"), true);

    var airRequestViewModel = kendo.observable({
        FlightDestinationSource: function (e) {
            return new kendo.data.DataSource({
                transport: {
                    read: {
                        url: rootUrl("GetData/GetCountry"),
                        dataType: "json"
                    }
                },
                serverFiltering: true
            });
        },
        FlightOriginSource: function (e) {
            return new kendo.data.DataSource({
                transport: {
                    read: {
                        url: rootUrl("GetData/GetCountry"),
                        dataType: "json"
                    }
                },
                serverFiltering: true
            });
        },
        OnOpenOriginAutoComplete: function (e) {

                debugger;
                var target = $(e.sender.element).data("kendoAutoComplete");
                target.list.width(280);
            },
        ViaSource: function (e) {
            debugger;
            var viadata = e.ArriveDepartDetails.via;
            return new kendo.data.DataSource({
                transport: {
                    read: {
                        url: rootUrl("GetData/GetCountry"),
                        dataType: "json",
                        data: function (e) {
                            return {
                                adddata: JSON.stringify(viadata) //viadata != null ? JSON.stringify(viadata) : JSON.stringify([])
                            };
                        }
                    }
                },
                serverFiltering: true
            });
        },
        AirlineIdsSource: function (e) {
            debugger;

            var airdata = e.AirlineIds;
            return new kendo.data.DataSource({
                transport: {
                    read: {
                        url: rootUrl("GetData/GetAirLines"),
                        dataType: "json",
                        data: function (e) {
                            return {
                                data: JSON.stringify(airdata)
                            };
                        }
                    }
                },
                serverFiltering: true
            });
        },
        
        TimeTypeSource: function (e) {
            return new kendo.data.DataSource({
                data: [
                    { Text: "None", Value: "-1" },
                    { Text: "Departs", Value: "D" },
                    { Text: "Arrives", Value: "A" }
                ]
            });
        },
        TimeTypeDataBound: function (e) {
            debugger;
            if (e.data.ArriveDepartDetails.TimeType == null) {
                e.data.ArriveDepartDetails.set("TimeType", "-1");
            }
        },
        SaveAirRequest: function (e) {
            debugger;
         }
        


    });

    $.when(
            $.ajax({
                url: rootUrl("SearchAvailability/GetAirRequestMVVMJsonDataAsync"),
                type: "POST",
                dataType: "json",
                data: { requestId: $("#RequestID").val() }
            }),
            loadTemplate("Content/Templates/AirRequestViewModelNew.tmpl.htm")
        )
        .then(onAirRequestWindowSuccess(airRequestViewModel))
        .fail(onAirRequestWindowFailure);
}