protected void onAutofill(object sender, EventArgs e)
    {
        if (this.AutoFill != null)
        {
            int             takeoffSpeed = Convert.ToInt32(rblTakeOffSpeed.SelectedValue, CultureInfo.InvariantCulture);
            AutoFillOptions afo          = new AutoFillOptions()
            {
                TimeZoneOffset     = mfbTimeZone1.TimeZoneOffset,
                TakeOffSpeed       = takeoffSpeed,
                LandingSpeed       = AutoFillOptions.BestLandingSpeedForTakeoffSpeed(takeoffSpeed),
                IncludeHeliports   = ckIncludeHeliports.Checked,
                AutoSynthesizePath = ckEstimateNight.Checked,
                Night        = (AutoFillOptions.NightCritera)Enum.Parse(typeof(AutoFillOptions.NightCritera), rblNightCriteria.SelectedValue, true),
                NightLanding = (AutoFillOptions.NightLandingCriteria)Enum.Parse(typeof(AutoFillOptions.NightLandingCriteria), rblNightLandingCriteria.SelectedValue, true),
                RoundToTenth = ckRoundNearest10th.Checked,
                IgnoreErrors = true
            };

            afo.ToCookies(Response.Cookies);

            string szTelemetry = Telemetry;
            // Load from the DB if needed
            if (String.IsNullOrEmpty(szTelemetry) && !LogbookEntry.IsNewFlightID(FlightID))
            {
                szTelemetry = new LogbookEntry(FlightID, Page.User.Identity.Name, LogbookEntry.LoadTelemetryOption.LoadAll).FlightData;
            }

            this.AutoFill(this, new AutofillEventArgs(afo, szTelemetry));
        }
    }