': This program uses
': InForm - GUI library for QB64 - v1.1
': Fellippe Heitor, 2016-2019 - fellippe@qb64.org - @fellippeheitor
': https://github.com/FellippeHeitor/InForm
'-----------------------------------------------------------

': Controls' IDs: ------------------------------------------------------------------
REM NOTICE: THIS FORM HAS BEEN RECENTLY EDITED
'>> The controls in the list below may have been added or renamed,
'>> and previously existing controls may have been deleted since
'>> this program's structure was first generated.
'>> Make sure to check your code in the events SUBs so that
'>> you can take your recent edits into consideration.
': ---------------------------------------------------------------------------------
DIM SHARED HC AS LONG
DIM SHARED Chartowner AS LONG
DIM SHARED Sun AS LONG
DIM SHARED moon AS LONG
DIM SHARED AscendantMC AS LONG
DIM SHARED mercury AS LONG
DIM SHARED venus AS LONG
DIM SHARED mars AS LONG
DIM SHARED jupiter AS LONG
DIM SHARED saturn AS LONG
DIM SHARED chiron AS LONG
DIM SHARED uranus AS LONG
DIM SHARED neptune AS LONG
DIM SHARED pluto AS LONG
DIM SHARED moon_node AS LONG
DIM SHARED lilith AS LONG
DIM SHARED TextBox1 AS LONG
DIM SHARED __name AS LONG
DIM SHARED TextBox2 AS LONG
DIM SHARED birthdate AS LONG
DIM SHARED TextBox3 AS LONG
DIM SHARED birthtime AS LONG
DIM SHARED TextBox4 AS LONG
DIM SHARED birthplace AS LONG
DIM SHARED DropdownList_sunHouse AS LONG
DIM SHARED sun_House AS LONG
DIM SHARED DropdownList_sunSign AS LONG
DIM SHARED sun_Sign AS LONG
DIM SHARED DropdownList_moonHouse AS LONG
DIM SHARED moon_House AS LONG
DIM SHARED moon_Sign AS LONG
DIM SHARED DropdownList_moonSign AS LONG
DIM SHARED DropdownList_ascendantSign AS LONG
DIM SHARED ascendant_Sign AS LONG
DIM SHARED mc_Sign AS LONG
DIM SHARED DropdownList_MCSign AS LONG
DIM SHARED DropdownList_mercuryHouse AS LONG
DIM SHARED mercury_House AS LONG
DIM SHARED DropdownList_mercurySign AS LONG
DIM SHARED mercury_Sign AS LONG
DIM SHARED DropdownList_venusHouse AS LONG
DIM SHARED venus_House AS LONG
DIM SHARED venus_Sign AS LONG
DIM SHARED DropdownList_venusSign AS LONG
DIM SHARED DropdownList_marsHouse AS LONG
DIM SHARED mars_House AS LONG
DIM SHARED mars_Sign AS LONG
DIM SHARED DropdownList_marsSign AS LONG
DIM SHARED DropdownList_jupiterHouse AS LONG
DIM SHARED jupiter_House AS LONG
DIM SHARED DropdownList_jupiterSign AS LONG
DIM SHARED jupiter_Sign AS LONG
DIM SHARED DropdownList_saturnHouse AS LONG
DIM SHARED saturn_House AS LONG
DIM SHARED saturn_Sign AS LONG
DIM SHARED DropdownList_saturnSign AS LONG
DIM SHARED DropdownList_chironHouse AS LONG
DIM SHARED chiron_House AS LONG
DIM SHARED chiron_Sign AS LONG
DIM SHARED DropdownList_chironSign AS LONG
DIM SHARED DropdownList_uranusHouse AS LONG
DIM SHARED uranus_House AS LONG
DIM SHARED DropdownList_uranusSign AS LONG
DIM SHARED uranus_Sign AS LONG
DIM SHARED DropdownList_neptuneHouse AS LONG
DIM SHARED neptune_House AS LONG
DIM SHARED neptune_Sign AS LONG
DIM SHARED DropdownList_neptuneSign AS LONG
DIM SHARED DropdownList_plutoHouse AS LONG
DIM SHARED pluto_House AS LONG
DIM SHARED pluto_Sign AS LONG
DIM SHARED DropdownList_plutoSign AS LONG
DIM SHARED DropdownList_moonnodeHouse AS LONG
DIM SHARED moonnode_House AS LONG
DIM SHARED moonnode_Sign AS LONG
DIM SHARED DropdownList_moonnodeSign AS LONG
DIM SHARED DropdownList_lilithHouse AS LONG
DIM SHARED lilith_House AS LONG
DIM SHARED lilith_Sign AS LONG
DIM SHARED DropdownList_lilithSign AS LONG
DIM SHARED Button1 AS LONG
DIM SHARED PictureBox1 AS LONG
DIM SHARED Label33 AS LONG
DIM SHARED PictureBox2 AS LONG
DIM SHARED PictureBox3 AS LONG
DIM SHARED Label34 AS LONG
DIM SHARED Label35 AS LONG
DIM SHARED Label36 AS LONG
DIM SHARED Label37 AS LONG
DIM SHARED Label38 AS LONG
DIM SHARED Label39 AS LONG
DIM SHARED Label40 AS LONG
DIM SHARED Label41 AS LONG
DIM SHARED ListBox1 AS LONG

DIM SHARED elements_Table$(3), elements_table_Values(3)
DIM SHARED signs_Table$(11), signs_table_Values(11)
DIM SHARED qualities_Table$(2), qualities_table_Values(2)
DIM SHARED polarities_Table$(1), polarities_table_Values(1)
DIM SHARED houses_Table$(11), houses_table_Values(11)
DIM SHARED quadrants_Table$(3), quadrants_table_Values(3)

END


': External modules: ---------------------------------------------------------------
'$INCLUDE:'InForm\InForm.ui'
'$INCLUDE:'InForm\xp.uitheme'
'$INCLUDE:'Horoscope calculator.frm'

': Event procedures: ---------------------------------------------------------------
SUB __UI_BeforeInit

END SUB

SUB __UI_OnLoad
    SetCaption TextBox1, ""
    SetCaption TextBox2, ""
    SetCaption TextBox3, ""
    SetCaption TextBox4, ""
END SUB

SUB __UI_BeforeUpdateDisplay
    'This event occurs at approximately 30 frames per second.
    'You can change the update frequency by calling SetFrameRate DesiredRate%

END SUB

SUB __UI_BeforeUnload
    'If you set __UI_UnloadSignal = False here you can
    'cancel the user's request to close.

END SUB

SUB __UI_Click (id AS LONG)
    SELECT CASE id
        CASE Button1
            sun$ = GetItem$(DropdownList_sunSign, Control(DropdownList_sunSign).Value)
            sun_House = VAL(GetItem$(DropdownList_sunHouse, Control(DropdownList_sunHouse).Value))
            moon$ = GetItem$(DropdownList_moonSign, Control(DropdownList_moonSign).Value)
            moon_House = VAL(GetItem$(DropdownList_moonHouse, Control(DropdownList_moonHouse).Value))
            ascendent$ = GetItem$(DropdownList_ascendantSign, Control(DropdownList_ascendantSign).Value)
            'MC$ = VAL(GetItem$(DropdownList_MCSign, Control(DropdownList_MCSign).Value))
            mercury$ = GetItem$(DropdownList_mercuryHouse, Control(DropdownList_mercuryHouse).Value)
            mercury_House = VAL(GetItem$(DropdownList_mercurySign, Control(DropdownList_mercurySign).Value))
            Venus$ = GetItem$(DropdownList_venusSign, Control(DropdownList_venusSign).Value)
            venus_House = VAL(GetItem$(DropdownList_venusHouse, Control(DropdownList_venusHouse).Value))
            mars$ = GetItem$(DropdownList_marsSign, Control(DropdownList_marsSign).Value)
            mars_House = VAL(GetItem$(DropdownList_marsHouse, Control(DropdownList_marsHouse).Value))
            Jupiter$ = GetItem$(DropdownList_jupiterSign, Control(DropdownList_jupiterSign).Value)
            jupiter_House = VAL(GetItem$(DropdownList_jupiterHouse, Control(DropdownList_jupiterHouse).Value))
            Saturn$ = GetItem$(DropdownList_saturnSign, Control(DropdownList_saturnSign).Value)
            saturn_House = VAL(GetItem$(DropdownList_saturnHouse, Control(DropdownList_saturnHouse).Value))
            Chiron$ = GetItem$(DropdownList_chironSign, Control(DropdownList_chironSign).Value)
            chiron_House = VAL(GetItem$(DropdownList_chironHouse, Control(DropdownList_chironHouse).Value))
            Uranus$ = GetItem$(DropdownList_uranusSign, Control(DropdownList_uranusSign).Value)
            uranus_House = VAL(GetItem$(DropdownList_uranusHouse, Control(DropdownList_uranusHouse).Value))
            neptune$ = GetItem$(DropdownList_neptuneSign, Control(DropdownList_neptuneSign).Value)
            neptune_House = VAL(GetItem$(DropdownList_uranusHouse, Control(DropdownList_uranusHouse).Value))
            Pluto$ = GetItem$(DropdownList_plutoSign, Control(DropdownList_plutoSign).Value)
            pluto_House = VAL(GetItem$(DropdownList_plutoHouse, Control(DropdownList_plutoHouse).Value))
            moon_Node$ = GetItem$(DropdownList_moonnodeSign, Control(DropdownList_moonnodeSign).Value)
            moon_node_House = VAL(GetItem$(DropdownList_moonnodeHouse, Control(DropdownList_moonnodeHouse).Value))
            Lilith$ = GetItem$(DropdownList_lilithSign, Control(DropdownList_lilithSign).Value)
            lilith_House = VAL(GetItem$(DropdownList_lilithHouse, Control(DropdownList_lilithHouse).Value))
            DIM house(12) AS INTEGER 'Defining 12 houses that numerical values can be added to which can be subjected to mathematical operations.
            house(sun_House) = house(sun_House) + 12 'Adds 12 points to the house that has the Sun in it.
            house(moon_House) = house(moon_House) + 12 'Adds 12 points to the house that has the Moon in it.
            house(mercury_House) = house(mercury_House) + 6 'Adds 6 points to the house that has Mercury in it.
            house(venus_House) = house(venus_House) + 6 'Adds 6 points to the house that has Venus in it.
            house(mars_House) = house(mars_House) + 6 'Adds 6 points to the house that has Mars in it.
            house(jupiter_House) = house(jupiter_House) + 5 'Adds 5 points to the house that has Jupiter in it.
            house(saturn_House) = house(saturn_House) + 5 'Adds 5 points to the house that has Saturn in it.
            house(chiron_House) = house(chiron_House) + 2 'Adds 2 points to the house that has Chiron in it.
            house(uranus_House) = house(uranus_House) + 2 'Adds 2 points to the house that has Uranus in it.
            house(neptune_House) = house(neptune_House) + 2 'Adds 2 points to the house that has neptune in it.
            house(pluto_House) = house(pluto_House) + 2 'Adds 2 points to the house that has Pluto in it.
            house(moon_node_House) = house(moon_node_House) + 2 'Adds 2 points to the house that has the Moon Node in it.
            house(lilith_House) = house(lilith_House) + 1 'Adds 1 point to the house that has Lilith in it.

            SELECT CASE sun$
                CASE "Aries"
                    fire = fire + 12
                    aries_Value = aries_Value + 12
                    cardinals = cardinals + 12
                CASE "Taurus"
                    earth = earth + 12
                    taurus_Value = taurus_Value + 12
                    fixed = fixed + 12
                CASE "Gemini"
                    air = air + 12
                    gemini_Value = gemini_Value + 12
                    mutable = mutable + 12
                CASE "Cancer"
                    water = water + 12
                    cancer_Value = cancer_Value + 12
                    cardinals = cardinals + 12
                CASE "Leo"
                    fire = fire + 12
                    leo_Value = leo_Value + 12
                    fixed = fixed + 12
                CASE "Virgo"
                    earth = earth + 12
                    virgo_Value = virgo_Value + 12
                    mutable = mutable + 12
                CASE "Libra"
                    air = air + 12
                    libra_Value = libra_Value + 12
                    cardinals = cardinals + 12
                CASE "Scorpio"
                    water = water + 12
                    scorpio_Value = scorpio_Value + 12
                    fixed = fixed + 12
                CASE "Sagittarius"
                    fire = fire + 12
                    sagittarius_Value = sagittarius_Value + 12
                    mutable = mutable + 12
                CASE "Capricorn"
                    earth = earth + 12
                    capricorn_Value = capricorn_Value + 12
                    cardinals = cardinals + 12
                CASE "Aquarius"
                    air = air + 12
                    Aquarius_Value = Aquarius_Value + 12
                    fixed = fixed + 12
                CASE "Pisces"
                    water = water + 12
                    pisces_Value = pisces_Value + 12
                    mutable = mutable + 12
            END SELECT

            SELECT CASE moon$
                CASE "Aries"
                    fire = fire + 12
                    aries_Value = aries_Value + 12
                    cardinals = cardinals + 12
                CASE "Taurus"
                    earth = earth + 12
                    taurus_Value = taurus_Value + 12
                    fixed = fixed + 12
                CASE "Gemini"
                    air = air + 12
                    gemini_Value = gemini_Value + 12
                    mutable = mutable + 12
                CASE "Cancer"
                    water = water + 12
                    cancer_Value = cancer_Value + 12
                    cardinals = cardinals + 12
                CASE "Leo"
                    fire = fire + 12
                    leo_Value = leo_Value + 12
                    fixed = fixed + 12
                CASE "Virgo"
                    earth = earth + 12
                    virgo_Value = virgo_Value + 12
                    mutable = mutable + 12
                CASE "Libra"
                    air = air + 12
                    libra_Value = libra_Value + 12
                    cardinals = cardinals + 12
                CASE "Scorpio"
                    water = water + 12
                    scorpio_Value = scorpio_Value + 12
                    fixed = fixed + 12
                CASE "Sagittarius"
                    fire = fire + 12
                    sagittarius_Value = sagittarius_Value + 12
                    mutable = mutable + 12
                CASE "Capricorn"
                    earth = earth + 12
                    capricorn_Value = capricorn_Value + 12
                    cardinals = cardinals + 12
                CASE "Aquarius"
                    air = air + 12
                    Aquarius_Value = Aquarius_Value + 12
                    fixed = fixed + 12
                CASE "Pisces"
                    water = water + 12
                    pisces_Value = pisces_Value + 12
                    mutable = mutable + 12
            END SELECT

            SELECT CASE ascendent$
                CASE "Aries"
                    fire = fire + 12
                    aries_Value = aries_Value + 12
                    cardinals = cardinals + 12
                    IF mars_House = 1 THEN fire = fire + 6: aries_Value = aries_Value + 6
                    IF mars_House = 2 THEN earth = earth + 6: taurus_Value = taurus_Value + 6
                    IF mars_House = 3 THEN air = air + 6: gemini_Value = gemini_Value + 6
                    IF mars_House = 4 THEN water = water + 6: cancer_Value = cancer_Value + 6
                    IF mars_House = 5 THEN fire = fire + 6: leo_Value = leo_Value + 6
                    IF mars_House = 6 THEN earth = earth + 6: virgo_Value = virgo_Value + 6
                    IF mars_House = 7 THEN air = air + 6: libra_Value = libra_Value + 6
                    IF mars_House = 8 THEN water = water + 6: scorpio_Value = scorpio_Value + 6
                    IF mars_House = 9 THEN fire = fire + 6: sagittarius_Value = sagittarius_Value + 6
                    IF mars_House = 10 THEN earth = earth + 6: capricorn_Value = capricorn_Value + 6
                    IF mars_House = 11 THEN air = air + 6: Aquarius_Value = Aquarius_Value + 6
                    IF mars_House = 12 THEN water = water + 6: pisces_Value = pisces_Value + 6
                CASE "Taurus"
                    earth = earth + 12
                    taurus_Value = taurus_Value + 12
                    fixed = fixed + 12
                    IF chiron_House = 1 THEN fire = fire + 6: aries_Value = aries_Value + 6
                    IF chiron_House = 2 THEN earth = earth + 6: taurus_Value = taurus_Value + 6
                    IF chiron_House = 3 THEN air = air + 6: gemini_Value = gemini_Value + 6
                    IF chiron_House = 4 THEN water = water + 6: cancer_Value = cancer_Value + 6
                    IF chiron_House = 5 THEN fire = fire + 6: leo_Value = leo_Value + 6
                    IF chiron_House = 6 THEN earth = earth + 6: virgo_Value = virgo_Value + 6
                    IF chiron_House = 7 THEN air = air + 6: libra_Value = libra_Value + 6
                    IF chiron_House = 8 THEN water = water + 6: scorpio_Value = scorpio_Value + 6
                    IF chiron_House = 9 THEN fire = fire + 6: sagittarius_Value = sagittarius_Value + 6
                    IF chiron_House = 10 THEN earth = earth + 6: capricorn_Value = capricorn_Value + 6
                    IF chiron_House = 11 THEN air = air + 6: Aquarius_Value = Aquarius_Value + 6
                    IF chiron_House = 12 THEN water = water + 6: pisces_Value = pisces_Value + 6
                CASE "Gemini"
                    air = air + 12
                    gemini_Value = gemini_Value + 12
                    mutable = mutable + 12
                    IF mercury_House = 1 THEN fire = fire + 6: aries_Value = aries_Value + 6
                    IF mercury_House = 2 THEN earth = earth + 6: taurus_Value = taurus_Value + 6
                    IF mercury_House = 3 THEN air = air + 6: gemini_Value = gemini_Value + 6
                    IF mercury_House = 4 THEN water = water + 6: cancer_Value = cancer_Value + 6
                    IF mercury_House = 5 THEN fire = fire + 6: leo_Value = leo_Value + 6
                    IF mercury_House = 6 THEN earth = earth + 6: virgo_Value = virgo_Value + 6
                    IF mercury_House = 7 THEN air = air + 6: libra_Value = libra_Value + 6
                    IF mercury_House = 8 THEN water = water + 6: scorpio_Value = scorpio_Value + 6
                    IF mercury_House = 9 THEN fire = fire + 6: sagittarius_Value = sagittarius_Value + 6
                    IF mercury_House = 10 THEN earth = earth + 6: capricorn_Value = capricorn_Value + 6
                    IF mercury_House = 11 THEN air = air + 6: Aquarius_Value = Aquarius_Value + 6
                    IF mercury_House = 12 THEN water = water + 6: pisces_Value = pisces_Value + 6
                CASE "Cancer"
                    water = water + 12
                    cancer_Value = cancer_Value + 12
                    cardinals = cardinals + 12
                    IF moon_House = 1 THEN fire = fire + 6: aries_Value = aries_Value + 6
                    IF moon_House = 2 THEN earth = earth + 6: taurus_Value = taurus_Value + 6
                    IF moon_House = 3 THEN air = air + 6: gemini_Value = gemini_Value + 6
                    IF moon_House = 4 THEN water = water + 6: cancer_Value = cancer_Value + 6
                    IF moon_House = 5 THEN fire = fire + 6: leo_Value = leo_Value + 6
                    IF moon_House = 6 THEN earth = earth + 6: virgo_Value = virgo_Value + 6
                    IF moon_House = 7 THEN air = air + 6: libra_Value = libra_Value + 6
                    IF moon_House = 8 THEN water = water + 6: scorpio_Value = scorpio_Value + 6
                    IF moon_House = 9 THEN fire = fire + 6: sagittarius_Value = sagittarius_Value + 6
                    IF moon_House = 10 THEN earth = earth + 6: capricorn_Value = capricorn_Value + 6
                    IF moon_House = 11 THEN air = air + 6: Aquarius_Value = Aquarius_Value + 6
                    IF moon_House = 12 THEN water = water + 6: pisces_Value = pisces_Value + 6
                CASE "Leo"
                    fire = fire + 12
                    leo_Value = leo_Value + 12
                    fixed = fixed + 12
                    IF sun_House = 1 THEN fire = fire + 6: aries_Value = aries_Value + 6
                    IF sun_House = 2 THEN earth = earth + 6: taurus_Value = taurus_Value + 6
                    IF sun_House = 3 THEN air = air + 6: gemini_Value = gemini_Value + 6
                    IF sun_House = 4 THEN water = water + 6: cancer_Value = cancer_Value + 6
                    IF sun_House = 5 THEN fire = fire + 6: leo_Value = leo_Value + 6
                    IF sun_House = 6 THEN earth = earth + 6: virgo_Value = virgo_Value + 6
                    IF sun_House = 7 THEN air = air + 6: libra_Value = libra_Value + 6
                    IF sun_House = 8 THEN water = water + 6: scorpio_Value = scorpio_Value + 6
                    IF sun_House = 9 THEN fire = fire + 6: sagittarius_Value = sagittarius_Value + 6
                    IF sun_House = 10 THEN earth = earth + 6: capricorn_Value = capricorn_Value + 6
                    IF sun_House = 11 THEN air = air + 6: Aquarius_Value = Aquarius_Value + 6
                    IF sun_House = 12 THEN water = water + 6: pisces_Value = pisces_Value + 6
                CASE "Virgo"
                    earth = earth + 12
                    virgo_Value = virgo_Value + 12
                    mutable = mutable + 12
                    IF mercury_House = 1 THEN fire = fire + 6: aries_Value = aries_Value + 6
                    IF mercury_House = 2 THEN earth = earth + 6: taurus_Value = taurus_Value + 6
                    IF mercury_House = 3 THEN air = air + 6: gemini_Value = gemini_Value + 6
                    IF mercury_House = 4 THEN water = water + 6: cancer_Value = cancer_Value + 6
                    IF mercury_House = 5 THEN fire = fire + 6: leo_Value = leo_Value + 6
                    IF mercury_House = 6 THEN earth = earth + 6: virgo_Value = virgo_Value + 6
                    IF mercury_House = 7 THEN air = air + 6: libra_Value = libra_Value + 6
                    IF mercury_House = 8 THEN water = water + 6: scorpio_Value = scorpio_Value + 6
                    IF mercury_House = 9 THEN fire = fire + 6: sagittarius_Value = sagittarius_Value + 6
                    IF mercury_House = 10 THEN earth = earth + 6: capricorn_Value = capricorn_Value + 6
                    IF mercury_House = 11 THEN air = air + 6: Aquarius_Value = Aquarius_Value + 6
                    IF mercury_House = 12 THEN water = water + 6: pisces_Value = pisces_Value + 6
                CASE "Libra"
                    air = air + 12
                    libra_Value = libra_Value + 12
                    cardinals = cardinals + 12
                    IF venus_House = 1 THEN fire = fire + 6: aries_Value = aries_Value + 6
                    IF venus_House = 2 THEN earth = earth + 6: taurus_Value = taurus_Value + 6
                    IF venus_House = 3 THEN air = air + 6: gemini_Value = gemini_Value + 6
                    IF venus_House = 4 THEN water = water + 6: cancer_Value = cancer_Value + 6
                    IF venus_House = 5 THEN fire = fire + 6: leo_Value = leo_Value + 6
                    IF venus_House = 6 THEN earth = earth + 6: virgo_Value = virgo_Value + 6
                    IF venus_House = 7 THEN air = air + 6: libra_Value = libra_Value + 6
                    IF venus_House = 8 THEN water = water + 6: scorpio_Value = scorpio_Value + 6
                    IF venus_House = 9 THEN fire = fire + 6: sagittarius_Value = sagittarius_Value + 6
                    IF venus_House = 10 THEN earth = earth + 6: capricorn_Value = capricorn_Value + 6
                    IF venus_House = 11 THEN air = air + 6: Aquarius_Value = Aquarius_Value + 6
                    IF venus_House = 12 THEN water = water + 6: pisces_Value = pisces_Value + 6
                CASE "Scorpio"
                    water = water + 12
                    scorpio_Value = scorpio_Value + 12
                    fixed = fixed + 12
                    IF pluto_House = 1 THEN fire = fire + 6: aries_Value = aries_Value + 6
                    IF pluto_House = 2 THEN earth = earth + 6: taurus_Value = taurus_Value + 6
                    IF pluto_House = 3 THEN air = air + 6: gemini_Value = gemini_Value + 6
                    IF pluto_House = 4 THEN water = water + 6: cancer_Value = cancer_Value + 6
                    IF pluto_House = 5 THEN fire = fire + 6: leo_Value = leo_Value + 6
                    IF pluto_House = 6 THEN earth = earth + 6: virgo_Value = virgo_Value + 6
                    IF pluto_House = 7 THEN air = air + 6: libra_Value = libra_Value + 6
                    IF pluto_House = 8 THEN water = water + 6: scorpio_Value = scorpio_Value + 6
                    IF pluto_House = 9 THEN fire = fire + 6: sagittarius_Value = sagittarius_Value + 6
                    IF pluto_House = 10 THEN earth = earth + 6: capricorn_Value = capricorn_Value + 6
                    IF pluto_House = 11 THEN air = air + 6: Aquarius_Value = Aquarius_Value + 6
                    IF pluto_House = 12 THEN water = water + 6: pisces_Value = pisces_Value + 6
                CASE "Sagittarius"
                    fire = fire + 12
                    sagittarius_Value = sagittarius_Value + 12
                    mutable = mutable + 12
                    IF jupiter_House = 1 THEN fire = fire + 6: aries_Value = aries_Value + 6
                    IF jupiter_House = 2 THEN earth = earth + 6: taurus_Value = taurus_Value + 6
                    IF jupiter_House = 3 THEN air = air + 6: gemini_Value = gemini_Value + 6
                    IF jupiter_House = 4 THEN water = water + 6: cancer_Value = cancer_Value + 6
                    IF jupiter_House = 5 THEN fire = fire + 6: leo_Value = leo_Value + 6
                    IF jupiter_House = 6 THEN earth = earth + 6: virgo_Value = virgo_Value + 6
                    IF jupiter_House = 7 THEN air = air + 6: libra_Value = libra_Value + 6
                    IF jupiter_House = 8 THEN water = water + 6: scorpio_Value = scorpio_Value + 6
                    IF jupiter_House = 9 THEN fire = fire + 6: sagittarius_Value = sagittarius_Value + 6
                    IF jupiter_House = 10 THEN earth = earth + 6: capricorn_Value = capricorn_Value + 6
                    IF jupiter_House = 11 THEN air = air + 6: Aquarius_Value = Aquarius_Value + 6
                    IF jupiter_House = 12 THEN water = water + 6: pisces_Value = pisces_Value + 6
                CASE "Capricorn"
                    earth = earth + 12
                    capricorn_Value = capricorn_Value + 12
                    cardinals = cardinals + 12
                    IF saturn_House = 1 THEN fire = fire + 6: aries_Value = aries_Value + 6
                    IF saturn_House = 2 THEN earth = earth + 6: taurus_Value = taurus_Value + 6
                    IF saturn_House = 3 THEN air = air + 6: gemini_Value = gemini_Value + 6
                    IF saturn_House = 4 THEN water = water + 6: cancer_Value = cancer_Value + 6
                    IF saturn_House = 5 THEN fire = fire + 6: leo_Value = leo_Value + 6
                    IF saturn_House = 6 THEN earth = earth + 6: virgo_Value = virgo_Value + 6
                    IF saturn_House = 7 THEN air = air + 6: libra_Value = libra_Value + 6
                    IF saturn_House = 8 THEN water = water + 6: scorpio_Value = scorpio_Value + 6
                    IF saturn_House = 9 THEN fire = fire + 6: sagittarius_Value = sagittarius_Value + 6
                    IF saturn_House = 10 THEN earth = earth + 6: capricorn_Value = capricorn_Value + 6
                    IF saturn_House = 11 THEN air = air + 6: Aquarius_Value = Aquarius_Value + 6
                    IF saturn_House = 12 THEN water = water + 6: pisces_Value = pisces_Value + 6
                CASE "Aquarius"
                    air = air + 12
                    Aquarius_Value = Aquarius_Value + 12
                    fixed = fixed + 12
                    IF uranus_House = 1 THEN fire = fire + 6: aries_Value = aries_Value + 6
                    IF uranus_House = 2 THEN earth = earth + 6: taurus_Value = taurus_Value + 6
                    IF uranus_House = 3 THEN air = air + 6: gemini_Value = gemini_Value + 6
                    IF uranus_House = 4 THEN water = water + 6: cancer_Value = cancer_Value + 6
                    IF uranus_House = 5 THEN fire = fire + 6: leo_Value = leo_Value + 6
                    IF uranus_House = 6 THEN earth = earth + 6: virgo_Value = virgo_Value + 6
                    IF uranus_House = 7 THEN air = air + 6: libra_Value = libra_Value + 6
                    IF uranus_House = 8 THEN water = water + 6: scorpio_Value = scorpio_Value + 6
                    IF uranus_House = 9 THEN fire = fire + 6: sagittarius_Value = sagittarius_Value + 6
                    IF uranus_House = 10 THEN earth = earth + 6: capricorn_Value = capricorn_Value + 6
                    IF uranus_House = 11 THEN air = air + 6: Aquarius_Value = Aquarius_Value + 6
                    IF uranus_House = 12 THEN water = water + 6: pisces_Value = pisces_Value + 6
                CASE "Pisces"
                    water = water + 12
                    pisces_Value = pisces_Value + 12
                    mutable = mutable + 12
                    IF neptune_House = 1 THEN fire = fire + 6: aries_Value = aries_Value + 6
                    IF neptune_House = 2 THEN earth = earth + 6: taurus_Value = taurus_Value + 6
                    IF neptune_House = 3 THEN air = air + 6: gemini_Value = gemini_Value + 6
                    IF neptune_House = 4 THEN water = water + 6: cancer_Value = cancer_Value + 6
                    IF neptune_House = 5 THEN fire = fire + 6: leo_Value = leo_Value + 6
                    IF neptune_House = 6 THEN earth = earth + 6: virgo_Value = virgo_Value + 6
                    IF neptune_House = 7 THEN air = air + 6: libra_Value = libra_Value + 6
                    IF neptune_House = 8 THEN water = water + 6: scorpio_Value = scorpio_Value + 6
                    IF neptune_House = 9 THEN fire = fire + 6: sagittarius_Value = sagittarius_Value + 6
                    IF neptune_House = 10 THEN earth = earth + 6: capricorn_Value = capricorn_Value + 6
                    IF neptune_House = 11 THEN air = air + 6: Aquarius_Value = Aquarius_Value + 6
                    IF neptune_House = 12 THEN water = water + 6: pisces_Value = pisces_Value + 6
            END SELECT

            SELECT CASE mercury$
                CASE "Aries"
                    fire = fire + 6
                    aries_Value = aries_Value + 6
                    cardinals = cardinals + 6
                CASE "Taurus"
                    earth = earth + 6
                    taurus_Value = taurus_Value + 6
                    fixed = fixed + 6
                CASE "Gemini"
                    air = air + 6
                    gemini_Value = gemini_Value + 6
                    mutable = mutable + 6
                CASE "Cancer"
                    water = water + 6
                    cancer_Value = cancer_Value + 6
                    cardinals = cardinals + 6
                CASE "Leo"
                    fire = fire + 6
                    leo_Value = leo_Value + 6
                    fixed = fixed + 6
                CASE "Virgo"
                    earth = earth + 6
                    virgo_Value = virgo_Value + 6
                    mutable = mutable + 6
                CASE "Libra"
                    air = air + 6
                    libra_Value = libra_Value + 6
                    cardinals = cardinals + 6
                CASE "Scorpio"
                    water = water + 6
                    scorpio_Value = scorpio_Value + 6
                    fixed = fixed + 6
                CASE "Sagittarius"
                    fire = fire + 6
                    sagittarius_Value = sagittarius_Value + 6
                    mutable = mutable + 6
                CASE "Capricorn"
                    earth = earth + 6
                    capricorn_Value = capricorn_Value + 6
                    cardinals = cardinals + 6
                CASE "Aquarius"
                    air = air + 6
                    Aquarius_Value = Aquarius_Value + 6
                    fixed = fixed + 6
                CASE "Pisces"
                    water = water + 6
                    pisces_Value = pisces_Value + 6
                    mutable = mutable + 6
            END SELECT

            SELECT CASE Venus$
                CASE "Aries"
                    fire = fire + 6
                    aries_Value = aries_Value + 6
                    cardinals = cardinals + 6
                CASE "Taurus"
                    earth = earth + 6
                    taurus_Value = taurus_Value + 6
                    fixed = fixed + 6
                CASE "Gemini"
                    air = air + 6
                    gemini_Value = gemini_Value + 6
                    mutable = mutable + 6
                CASE "Cancer"
                    water = water + 6
                    cancer_Value = cancer_Value + 6
                    cardinals = cardinals + 6
                CASE "Leo"
                    fire = fire + 6
                    leo_Value = leo_Value + 6
                    fixed = fixed + 6
                CASE "Virgo"
                    earth = earth + 6
                    virgo_Value = virgo_Value + 6
                    mutable = mutable + 6
                CASE "Libra"
                    air = air + 6
                    libra_Value = libra_Value + 6
                    cardinals = cardinals + 6
                CASE "Scorpio"
                    water = water + 6
                    scorpio_Value = scorpio_Value + 6
                    fixed = fixed + 5
                CASE "Sagittarius"
                    fire = fire + 6
                    sagittarius_Value = sagittarius_Value + 6
                    mutable = mutable + 6
                CASE "Capricorn"
                    earth = earth + 6
                    capricorn_Value = capricorn_Value + 6
                    cardinals = cardinals + 6
                CASE "Aquarius"
                    air = air + 6
                    Aquarius_Value = Aquarius_Value + 6
                    fixed = fixed + 6
                CASE "Pisces"
                    water = water + 6
                    pisces_Value = pisces_Value + 6
                    mutable = mutable + 6
            END SELECT

            SELECT CASE mars$
                CASE "Aries"
                    fire = fire + 6
                    aries_Value = aries_Value + 6
                    cardinals = cardinals + 6
                CASE "Taurus"
                    earth = earth + 6
                    taurus_Value = taurus_Value + 6
                    fixed = fixed + 6
                CASE "Gemini"
                    air = air + 6
                    gemini_Value = gemini_Value + 6
                    mutable = mutable + 6
                CASE "Cancer"
                    water = water + 6
                    cancer_Value = cancer_Value + 6
                    cardinals = cardinals + 6
                CASE "Leo"
                    fire = fire + 6
                    leo_Value = leo_Value + 6
                    fixed = fixed + 6
                CASE "Virgo"
                    earth = earth + 6
                    virgo_Value = virgo_Value + 6
                    mutable = mutable + 6
                CASE "Libra"
                    air = air + 6
                    libra_Value = libra_Value + 6
                    cardinals = cardinals + 6
                CASE "Scorpio"
                    water = water + 6
                    scorpio_Value = scorpio_Value + 6
                    fixed = fixed + 6
                CASE "Sagittarius"
                    fire = fire + 6
                    sagittarius_Value = sagittarius_Value + 6
                    mutable = mutable + 6
                CASE "Capricorn"
                    earth = earth + 6
                    capricorn_Value = capricorn_Value + 6
                    cardinals = cardinals + 6
                CASE "Aquarius"
                    air = air + 6
                    Aquarius_Value = Aquarius_Value + 6
                    fixed = fixed + 6
                CASE "Pisces"
                    water = water + 6
                    pisces_Value = pisces_Value + 6
                    mutable = mutable + 6
            END SELECT

            SELECT CASE Jupiter$
                CASE "Aries"
                    fire = fire + 5
                    aries_Value = aries_Value + 5
                    cardinals = cardinals + 5
                CASE "Taurus"
                    earth = earth + 5
                    taurus_Value = taurus_Value + 5
                    fixed = fixed + 5
                CASE "Gemini"
                    air = air + 5
                    gemini_Value = gemini_Value + 5
                    mutable = mutable + 5
                CASE "Cancer"
                    water = water + 5
                    cancer_Value = cancer_Value + 5
                    cardinals = cardinals + 5
                CASE "Leo"
                    fire = fire + 5
                    leo_Value = leo_Value + 5
                    fixed = fixed + 5
                CASE "Virgo"
                    earth = earth + 5
                    virgo_Value = virgo_Value + 5
                    mutable = mutable + 5
                CASE "Libra"
                    air = air + 5
                    libra_Value = libra_Value + 5
                    cardinals = cardinals + 5
                CASE "Scorpio"
                    water = water + 5
                    scorpio_Value = scorpio_Value + 5
                    fixed = fixed + 5
                CASE "Sagittarius"
                    fire = fire + 5
                    sagittarius_Value = sagittarius_Value + 5
                    mutable = mutable + 5
                CASE "Capricorn"
                    earth = earth + 5
                    capricorn_Value = capricorn_Value + 5
                    cardinals = cardinals + 5
                CASE "Aquarius"
                    air = air + 5
                    Aquarius_Value = Aquarius_Value + 5
                    fixed = fixed + 5
                CASE "Pisces"
                    water = water + 5
                    pisces_Value = pisces_Value + 5
                    mutable = mutable + 5
            END SELECT

            SELECT CASE Saturn$
                CASE "Aries"
                    fire = fire + 5
                    aries_Value = aries_Value + 5
                    cardinals = cardinals + 5
                CASE "Taurus"
                    earth = earth + 5
                    taurus_Value = taurus_Value + 5
                    fixed = fixed + 5
                CASE "Gemini"
                    air = air + 5
                    gemini_Value = gemini_Value + 5
                    mutable = mutable + 5
                CASE "Cancer"
                    water = water + 5
                    cancer_Value = cancer_Value + 5
                    cardinals = cardinals + 5
                CASE "Leo"
                    fire = fire + 5
                    leo_Value = leo_Value + 5
                    fixed = fixed + 5
                CASE "Virgo"
                    earth = earth + 5
                    virgo_Value = virgo_Value + 5
                    mutable = mutable + 5
                CASE "Libra"
                    air = air + 5
                    libra_Value = libra_Value + 5
                    cardinals = cardinals + 5
                CASE "Scorpio"
                    water = water + 5
                    scorpio_Value = scorpio_Value + 5
                    fixed = fixed + 5
                CASE "Sagittarius"
                    fire = fire + 5
                    sagittarius_Value = sagittarius_Value + 5
                    mutable = mutable + 5
                CASE "Capricorn"
                    earth = earth + 5
                    capricorn_Value = capricorn_Value + 5
                    cardinals = cardinals + 5
                CASE "Aquarius"
                    air = air + 5
                    Aquarius_Value = Aquarius_Value + 5
                    fixed = fixed + 5
                CASE "Pisces"
                    water = water + 5
                    pisces_Value = pisces_Value + 5
                    mutable = mutable + 5
            END SELECT

            SELECT CASE MC$
                CASE "Aries"
                    fire = fire + 5
                    aries_Value = aries_Value + 5
                    cardinals = cardinals + 5
                CASE "Taurus"
                    earth = earth + 5
                    taurus_Value = taurus_Value + 5
                    fixed = fixed + 5
                CASE "Gemini"
                    air = air + 5
                    gemini_Value = gemini_Value + 5
                    mutable = mutable + 5
                CASE "Cancer"
                    water = water + 5
                    cancer_Value = cancer_Value + 5
                    cardinals = cardinals + 5
                CASE "Leo"
                    fire = fire + 5
                    leo_Value = leo_Value + 5
                    fixed = fixed + 5
                CASE "Virgo"
                    earth = earth + 5
                    virgo_Value = virgo_Value + 5
                    mutable = mutable + 5
                CASE "Libra"
                    air = air + 5
                    libra_Value = libra_Value + 5
                    cardinals = cardinals + 5
                CASE "Scorpio"
                    water = water + 5
                    scorpio_Value = scorpio_Value + 5
                    fixed = fixed + 5
                CASE "Sagittarius"
                    fire = fire + 5
                    sagittarius_Value = sagittarius_Value + 5
                    mutable = mutable + 5
                CASE "Capricorn"
                    earth = earth + 5
                    capricorn_Value = capricorn_Value + 5
                    cardinals = cardinals + 5
                CASE "Aquarius"
                    air = air + 5
                    Aquarius_Value = Aquarius_Value + 5
                    fixed = fixed + 5
                CASE "Pisces"
                    water = water + 5
                    pisces_Value = pisces_Value + 5
                    mutable = mutable + 5
            END SELECT

            SELECT CASE Chiron$
                CASE "Aries"
                    fire = fire + 2
                    aries_Value = aries_Value + 2
                    cardinals = cardinals + 2
                CASE "Taurus"
                    earth = earth + 2
                    taurus_Value = taurus_Value + 2
                    fixed = fixed + 2
                CASE "Gemini"
                    air = air + 2
                    gemini_Value = gemini_Value + 2
                    mutable = mutable + 2
                CASE "Cancer"
                    water = water + 2
                    cancer_Value = cancer_Value + 2
                    cardinals = cardinals + 2
                CASE "Leo"
                    fire = fire + 2
                    leo_Value = leo_Value + 2
                    fixed = fixed + 2
                CASE "Virgo"
                    earth = earth + 2
                    virgo_Value = virgo_Value + 2
                    mutable = mutable + 2
                CASE "Libra"
                    air = air + 2
                    libra_Value = libra_Value + 2
                    cardinals = cardinals + 2
                CASE "Scorpio"
                    water = water + 2
                    scorpio_Value = scorpio_Value + 2
                    fixed = fixed + 2
                CASE "Sagittarius"
                    fire = fire + 2
                    sagittarius_Value = sagittarius_Value + 2
                    mutable = mutable + 2
                CASE "Capricorn"
                    earth = earth + 2
                    capricorn_Value = capricorn_Value + 2
                    cardinals = cardinals + 2
                CASE "Aquarius"
                    air = air + 2
                    Aquarius_Value = Aquarius_Value + 2
                    fixed = fixed + 2
                CASE "Pisces"
                    water = water + 2
                    pisces_Value = pisces_Value + 2
                    mutable = mutable + 2
            END SELECT

            SELECT CASE Uranus$
                CASE "Aries"
                    fire = fire + 2
                    aries_Value = aries_Value + 2
                    cardinals = cardinals + 2
                CASE "Taurus"
                    earth = earth + 2
                    taurus_Value = taurus_Value + 2
                    fixed = fixed + 2
                CASE "Gemini"
                    air = air + 2
                    gemini_Value = gemini_Value + 2
                    mutable = mutable + 2
                CASE "Cancer"
                    water = water + 2
                    cancer_Value = cancer_Value + 2
                    cardinals = cardinals + 2
                CASE "Leo"
                    fire = fire + 2
                    leo_Value = leo_Value + 2
                    fixed = fixed + 2
                CASE "Virgo"
                    earth = earth + 2
                    virgo_Value = virgo_Value + 2
                    mutable = mutable + 2
                CASE "Libra"
                    air = air + 2
                    libra_Value = libra_Value + 2
                    cardinals = cardinals + 2
                CASE "Scorpio"
                    water = water + 2
                    scorpio_Value = scorpio_Value + 2
                    fixed = fixed + 2
                CASE "Sagittarius"
                    fire = fire + 2
                    sagittarius_Value = sagittarius_Value + 2
                    mutable = mutable + 2
                CASE "Capricorn"
                    earth = earth + 2
                    capricorn_Value = capricorn_Value + 2
                    cardinals = cardinals + 2
                CASE "Aquarius"
                    air = air + 2
                    Aquarius_Value = Aquarius_Value + 2
                    fixed = fixed + 2
                CASE "Pisces"
                    water = water + 2
                    pisces_Value = pisces_Value + 2
                    mutable = mutable + 2
            END SELECT

            SELECT CASE neptune$
                CASE "Aries"
                    fire = fire + 2
                    aries_Value = aries_Value + 2
                    cardinals = cardinals + 2
                CASE "Taurus"
                    earth = earth + 2
                    taurus_Value = taurus_Value + 2
                    fixed = fixed + 2
                CASE "Gemini"
                    air = air + 2
                    gemini_Value = gemini_Value + 2
                    mutable = mutable + 2
                CASE "Cancer"
                    water = water + 2
                    cancer_Value = cancer_Value + 2
                    cardinals = cardinals + 2
                CASE "Leo"
                    fire = fire + 2
                    leo_Value = leo_Value + 2
                    fixed = fixed + 2
                CASE "Virgo"
                    earth = earth + 2
                    virgo_Value = virgo_Value + 2
                    mutable = mutable + 2
                CASE "Libra"
                    air = air + 2
                    libra_Value = libra_Value + 2
                    cardinals = cardinals + 2
                CASE "Scorpio"
                    water = water + 2
                    scorpio_Value = scorpio_Value + 2
                    fixed = fixed + 2
                CASE "Sagittarius"
                    fire = fire + 2
                    sagittarius_Value = sagittarius_Value + 2
                    mutable = mutable + 2
                CASE "Capricorn"
                    earth = earth + 2
                    capricorn_Value = capricorn_Value + 2
                    cardinals = cardinals + 2
                CASE "Aquarius"
                    air = air + 2
                    Aquarius_Value = Aquarius_Value + 2
                    fixed = fixed + 2
                CASE "Pisces"
                    water = water + 2
                    pisces_Value = pisces_Value + 2
                    mutable = mutable + 2
            END SELECT

            SELECT CASE Pluto$
                CASE "Aries"
                    fire = fire + 2
                    aries_Value = aries_Value + 2
                    cardinals = cardinals + 2
                CASE "Taurus"
                    earth = earth + 2
                    taurus_Value = taurus_Value + 2
                    fixed = fixed + 2
                CASE "Gemini"
                    air = air + 2
                    gemini_Value = gemini_Value + 2
                    mutable = mutable + 2
                CASE "Cancer"
                    water = water + 2
                    cancer_Value = cancer_Value + 2
                    cardinals = cardinals + 2
                CASE "Leo"
                    fire = fire + 2
                    leo_Value = leo_Value + 2
                    fixed = fixed + 2
                CASE "Virgo"
                    earth = earth + 2
                    virgo_Value = virgo_Value + 2
                    mutable = mutable + 2
                CASE "Libra"
                    air = air + 2
                    libra_Value = libra_Value + 2
                    cardinals = cardinals + 2
                CASE "Scorpio"
                    water = water + 2
                    scorpio_Value = scorpio_Value + 2
                    fixed = fixed + 2
                CASE "Sagittarius"
                    fire = fire + 2
                    sagittarius_Value = sagittarius_Value + 2
                    mutable = mutable + 2
                CASE "Capricorn"
                    earth = earth + 2
                    capricorn_Value = capricorn_Value + 2
                    cardinals = cardinals + 2
                CASE "Aquarius"
                    air = air + 2
                    Aquarius_Value = Aquarius_Value + 2
                    fixed = fixed + 2
                CASE "Pisces"
                    water = water + 2
                    pisces_Value = pisces_Value + 2
                    mutable = mutable + 2
            END SELECT

            SELECT CASE moon_Node$
                CASE "Aries"
                    fire = fire + 2
                    aries_Value = aries_Value + 2
                    cardinals = cardinals + 2
                CASE "Taurus"
                    earth = earth + 2
                    taurus_Value = taurus_Value + 2
                    fixed = fixed + 2
                CASE "Gemini"
                    air = air + 2
                    gemini_Value = gemini_Value + 2
                    mutable = mutable + 2
                CASE "Cancer"
                    water = water + 2
                    cancer_Value = cancer_Value + 2
                    cardinals = cardinals + 2
                CASE "Leo"
                    fire = fire + 2
                    leo_Value = leo_Value + 2
                    fixed = fixed + 2
                CASE "Virgo"
                    earth = earth + 2
                    virgo_Value = virgo_Value + 2
                    mutable = mutable + 2
                CASE "Libra"
                    air = air + 2
                    libra_Value = libra_Value + 2
                    cardinals = cardinals + 2
                CASE "Scorpio"
                    water = water + 2
                    scorpio_Value = scorpio_Value + 2
                    fixed = fixed + 2
                CASE "Sagittarius"
                    fire = fire + 2
                    sagittarius_Value = sagittarius_Value + 2
                    mutable = mutable + 2
                CASE "Capricorn"
                    earth = earth + 2
                    capricorn_Value = capricorn_Value + 2
                    cardinals = cardinals + 2
                CASE "Aquarius"
                    air = air + 2
                    Aquarius_Value = Aquarius_Value + 2
                    fixed = fixed + 2
                CASE "Pisces"
                    water = water + 2
                    pisces_Value = pisces_Value + 2
                    mutable = mutable + 2
            END SELECT

            SELECT CASE Lilith$
                CASE "Aries"
                    fire = fire + 1
                    aries_Value = aries_Value + 1
                    cardinals = cardinals + 1
                CASE "Taurus"
                    earth = earth + 1
                    taurus_Value = taurus_Value + 1
                    fixed = fixed + 1
                CASE "Gemini"
                    air = air + 1
                    gemini_Value = gemini_Value + 1
                    mutable = mutable + 1
                CASE "Cancer"
                    water = water + 1
                    cancer_Value = cancer_Value + 1
                    cardinals = cardinals + 1
                CASE "Leo"
                    fire = fire + 1
                    leo_Value = leo_Value + 1
                    fixed = fixed + 1
                CASE "Virgo"
                    earth = earth + 1
                    virgo_Value = virgo_Value + 1
                    mutable = mutable + 1
                CASE "Libra"
                    air = air + 1
                    libra_Value = libra_Value + 1
                    cardinals = cardinals + 1
                CASE "Scorpio"
                    water = water + 1
                    scorpio_Value = scorpio_Value + 1
                    fixed = fixed + 1
                CASE "Sagittarius"
                    fire = fire + 1
                    sagittarius_Value = sagittarius_Value + 1
                    mutable = mutable + 1
                CASE "Capricorn"
                    earth = earth + 1
                    capricorn_Value = capricorn_Value + 1
                    cardinals = cardinals + 1
                CASE "Aquarius"
                    air = air + 1
                    Aquarius_Value = Aquarius_Value + 1
                    fixed = fixed + 1
                CASE "Pisces"
                    water = water + 1
                    pisces_Value = pisces_Value + 1
                    mutable = mutable + 1
            END SELECT

            elements = earth + fire + water + air
            Earth_Percentage = 100 / elements * earth
            Fire_Percentage# = 100 / elements * fire
            Water_Percentage# = 100 / elements * water
            Air_Percentage# = 100 / elements * air

            Earth_percentage_Rounded# = INT(Earth_Percentage * 10 ^ 2 + .5): Earth_percentage_Rounded# = Earth_percentage_Rounded# / 100
            Fire_percentage_Rounded# = INT(Fire_Percentage# * 10 ^ 2 + .5): Fire_percentage_Rounded# = Fire_percentage_Rounded# / 100
            Water_percentage_Rounded# = INT(Water_Percentage# * 10 ^ 2 + .5): Water_percentage_Rounded# = Water_percentage_Rounded# / 100
            Air_percentage_Rounded# = INT(Air_Percentage# * 10 ^ 2 + .5): Air_percentage_Rounded# = Air_percentage_Rounded# / 100

            qualities = cardinals + fixed + mutable
            cardinal_Percentage# = 100 / qualities * cardinals
            fixed_Percentage# = 100 / qualities * fixed
            mutable_Percentage# = 100 / qualities * mutable

            cardinal_percentage_Rounded# = INT(cardinal_Percentage# * 10 ^ 2 + .5): cardinal_percentage_Rounded# = cardinal_percentage_Rounded# / 100
            fixed_percentage_Rounded# = INT(fixed_Percentage# * 10 ^ 2 + .5): fixed_percentage_Rounded# = fixed_percentage_Rounded# / 100
            mutable_percentage_Rounded# = INT(mutable_Percentage# * 10 ^ 2 + .5): mutable_percentage_Rounded# = mutable_percentage_Rounded# / 100

            all_Signs = aries_Value + taurus_Value + gemini_Value + cancer_Value + leo_Value + virgo_Value + libra_Value + scorpio_Value + sagittarius_Value + capricorn_Value + Aquarius_Value + pisces_Value
            Aries_Percentage = 100 / all_Signs * aries_Value
            Taurus_Percentage = 100 / all_Signs * taurus_Value
            Gemini_Percentage = 100 / all_Signs * gemini_Value
            Cancer_Percentage = 100 / all_Signs * cancer_Value
            Leo_Percentage = 100 / all_Signs * leo_Value
            Virgo_Percentage = 100 / all_Signs * virgo_Value
            Libra_Percentage = 100 / all_Signs * libra_Value
            Scorpio_Percentage = 100 / all_Signs * scorpio_Value
            Sagittarius_Percentage = 100 / all_Signs * sagittarius_Value
            Capricorn_Percentage = 100 / all_Signs * capricorn_Value
            Aquarius_Percentage = 100 / all_Signs * Aquarius_Value
            Pisces_Percentage = 100 / all_Signs * pisces_Value

            Aries_percentage_Rounded# = INT(Aries_Percentage * 10 ^ 2 + .5): Aries_percentage_Rounded# = Aries_percentage_Rounded# / 100
            Taurus_percentage_Rounded# = INT(Taurus_Percentage * 10 ^ 2 + .5): Taurus_percentage_Rounded# = Taurus_percentage_Rounded# / 100
            Gemini_percentage_Rounded# = INT(Gemini_Percentage * 10 ^ 2 + .5): Gemini_percentage_Rounded# = Gemini_percentage_Rounded# / 100
            Cancer_percentage_Rounded# = INT(Cancer_Percentage * 10 ^ 2 + .5): Cancer_percentage_Rounded# = Cancer_percentage_Rounded# / 100
            Leo_percentage_Rounded# = INT(Leo_Percentage * 10 ^ 2 + .5): Leo_percentage_Rounded# = Leo_percentage_Rounded# / 100
            Virgo_percentage_Rounded# = INT(Virgo_Percentage * 10 ^ 2 + .5): Virgo_percentage_Rounded# = Virgo_percentage_Rounded# / 100
            Libra_percentage_Rounded# = INT(Libra_Percentage * 10 ^ 2 + .5): Libra_percentage_Rounded# = Libra_percentage_Rounded# / 100
            Scorpio_percentage_Rounded# = INT(Scorpio_Percentage * 10 ^ 2 + .5): Scorpio_percentage_Rounded# = Scorpio_percentage_Rounded# / 100
            Sagittarius_percentage_Rounded# = INT(Sagittarius_Percentage * 10 ^ 2 + .5): Sagittarius_percentage_Rounded# = Sagittarius_percentage_Rounded# / 100
            Capricorn_percentage_Rounded# = INT(Capricorn_Percentage * 10 ^ 2 + .5): Capricorn_percentage_Rounded# = Capricorn_percentage_Rounded# / 100
            Aquarius_percentage_Rounded# = INT(Aquarius_Percentage * 10 ^ 2 + .5): Aquarius_percentage_Rounded# = Aquarius_percentage_Rounded# / 100
            Pisces_percentage_Rounded# = INT(Pisces_Percentage * 10 ^ 2 + .5): Pisces_percentage_Rounded# = Pisces_percentage_Rounded# / 100

            all_Houses = house(1) + house(2) + house(3) + house(4) + house(5) + house(6) + house(7) + house(8) + house(9) + house(10) + house(11) + house(12)
            house1_Percentage = 100 / all_Houses * house(1)
            house2_Percentage = 100 / all_Houses * house(2)
            house3_Percentage = 100 / all_Houses * house(3)
            house4_Percentage = 100 / all_Houses * house(4)
            house5_Percentage = 100 / all_Houses * house(5)
            house6_Percentage = 100 / all_Houses * house(6)
            house7_Percentage = 100 / all_Houses * house(7)
            house8_Percentage = 100 / all_Houses * house(8)
            house9_Percentage = 100 / all_Houses * house(9)
            house10_Percentage = 100 / all_Houses * house(10)
            house11_Percentage = 100 / all_Houses * house(11)
            house12_Percentage = 100 / all_Houses * house(12)

            house1_percentage_Rounded# = INT(house1_Percentage * 10 ^ 2 + .5): house1_percentage_Rounded# = house1_percentage_Rounded# / 100
            house2_percentage_Rounded# = INT(house2_Percentage * 10 ^ 2 + .5): house2_percentage_Rounded# = house2_percentage_Rounded# / 100
            house3_percentage_Rounded# = INT(house3_Percentage * 10 ^ 2 + .5): house3_percentage_Rounded# = house3_percentage_Rounded# / 100
            house4_percentage_Rounded# = INT(house4_Percentage * 10 ^ 2 + .5): house4_percentage_Rounded# = house4_percentage_Rounded# / 100
            house5_percentage_Rounded# = INT(house5_Percentage * 10 ^ 2 + .5): house5_percentage_Rounded# = house5_percentage_Rounded# / 100
            house6_percentage_Rounded# = INT(house6_Percentage * 10 ^ 2 + .5): house6_percentage_Rounded# = house6_percentage_Rounded# / 100
            house7_percentage_Rounded# = INT(house7_Percentage * 10 ^ 2 + .5): house7_percentage_Rounded# = house7_percentage_Rounded# / 100
            house8_percentage_Rounded# = INT(house8_Percentage * 10 ^ 2 + .5): house8_percentage_Rounded# = house8_percentage_Rounded# / 100
            house9_percentage_Rounded# = INT(house9_Percentage * 10 ^ 2 + .5): house9_percentage_Rounded# = house9_percentage_Rounded# / 100
            house10_percentage_Rounded# = INT(house10_Percentage * 10 ^ 2 + .5): house10_percentage_Rounded# = house10_percentage_Rounded# / 100
            house11_percentage_Rounded# = INT(house11_Percentage * 10 ^ 2 + .5): house11_percentage_Rounded# = house11_percentage_Rounded# / 100
            house12_percentage_Rounded# = INT(house12_Percentage * 10 ^ 2 + .5): house12_percentage_Rounded# = house12_percentage_Rounded# / 100

            largest = 0
            IF aries_Value > largest THEN largest = aries_Value: dom_Sign$ = "Aries"
            IF taurus_Value > largest THEN largest = taurus_Value: dom_Sign$ = "Taurus"
            IF gemini_Value > largest THEN largest = gemini_Value: dom_Sign$ = "Gemini"
            IF cancer_Value > largest THEN largest = cancer_Value: dom_Sign$ = "Cancer"
            IF leo_Value > largest THEN largest = leo_Value: dom_Sign$ = "Leo"
            IF virgo_Value > largest THEN largest = virgo_Value: dom_Sign$ = "Virgo"
            IF libra_Value > largest THEN largest = libra_Value: dom_Sign$ = "Libra"
            IF scorpio_Value > largest THEN largest = scorpio_Value: dom_Sign$ = "Scorpio"
            IF sagittarius_Value > largest THEN largest = sagittarius_Value: dom_Sign$ = "Sagittarius"
            IF capricorn_Value > largest THEN largest = capricorn_Value: dom_Sign$ = "Capricorn"
            IF Aquarius_Value > largest THEN largest = Aquarius_Value: dom_Sign$ = "Aquarius"
            IF pisces_Value > largest THEN largest = pisces_Value: dom_Sign$ = "Pisces"
            signs_percentage = 100 / all_Signs * largest
            signs_percentage_Rounded# = INT(signs_percentage * 10 ^ 2 + .5): signs_percentage_Rounded# = signs_percentage_Rounded# / 100

            largesthouse = 0
            IF house(1) > largesthouse THEN largesthouse = house(1): dom_House = 1
            IF house(2) > largesthouse THEN largesthouse = house(2): dom_House = 2
            IF house(3) > largesthouse THEN largesthouse = house(3): dom_House = 3
            IF house(4) > largesthouse THEN largesthouse = house(4): dom_House = 4
            IF house(5) > largesthouse THEN largesthouse = house(5): dom_House = 5
            IF house(6) > largesthouse THEN largesthouse = house(6): dom_House = 6
            IF house(7) > largesthouse THEN largesthouse = house(7): dom_House = 7
            IF house(8) > largesthouse THEN largesthouse = house(8): dom_House = 8
            IF house(9) > largesthouse THEN largesthouse = house(9): dom_House = 9
            IF house(10) > largesthouse THEN largesthouse = house(10): dom_House = 10
            IF house(11) > largesthouse THEN largesthouse = house(11): dom_House = 11
            IF house(12) > largesthouse THEN largesthouse = house(12): dom_House = 12
            largesthouse_percentage = 100 / all_Houses * largesthouse
            largesthouse_percentage_Rounded# = INT(largesthouse_percentage * 10 ^ 2 + .5): largesthouse_percentage_Rounded# = largesthouse_percentage_Rounded# / 100

            Quad1 = house(1) + house(2) + house(3)
            Quad2 = house(4) + house(5) + house(6)
            Quad3 = house(7) + house(8) + house(9)
            Quad4 = house(10) + house(11) + house(12)
            all_Quads = Quad1 + Quad2 + Quad3 + Quad4

            largedom_Quad = 0
            IF Quad1 > largedom_Quad THEN largedom_Quad = Quad1: dom_Quad$ = "1st aka Fire or energy quadrant"
            IF Quad2 > largedom_Quad THEN largedom_Quad = Quad2: dom_Quad$ = "2nd aka Water or emotional quadrant"
            IF Quad3 > largedom_Quad THEN largedom_Quad = Quad3: dom_Quad$ = "3rd aka Air or intellectual quadrant"
            IF Quad4 > largedom_Quad THEN largedom_Quad = Quad4: dom_Quad$ = "4th aka Earth or reality quadrant"
            large_dom_Quad_percentage = 100 / all_Quads * largedom_Quad
            large_dom_Quad_percentage_Rounded# = INT(large_dom_Quad_percentage * 10 ^ 2 + .5): large_dom_Quad_percentage_Rounded# = large_dom_Quad_percentage_Rounded# / 100

            quad1_Percentage = 100 / all_Quads * Quad1
            quad2_Percentage = 100 / all_Quads * Quad2
            quad3_Percentage = 100 / all_Quads * Quad3
            quad4_Percentage = 100 / all_Quads * Quad4

            quad1_percentage_Rounded# = INT(quad1_Percentage * 10 ^ 2 + .5): quad1_percentage_Rounded# = quad1_percentage_Rounded# / 100
            quad2_percentage_Rounded# = INT(quad2_Percentage * 10 ^ 2 + .5): quad2_percentage_Rounded# = quad2_percentage_Rounded# / 100
            quad3_percentage_Rounded# = INT(quad3_Percentage * 10 ^ 2 + .5): quad3_percentage_Rounded# = quad3_percentage_Rounded# / 100
            quad4_percentage_Rounded# = INT(quad4_Percentage * 10 ^ 2 + .5): quad4_percentage_Rounded# = quad4_percentage_Rounded# / 100

            earth_String$ = "The sum of the earth signs in this birth chart is" + STR$(earth) + ". Thus, its owner is determined by the element of earth by" + STR$(Earth_percentage_Rounded#) + "%."
            fire_String$ = "The sum of the fire signs in this birth chart is" + STR$(fire) + ". Thus, its owner is determined by the element of fire by" + STR$(Fire_percentage_Rounded#) + "%."
            water_String$ = "The sum of the water signs in this birth chart is" + STR$(water) + ". Thus, its owner is determined by the element of water by" + STR$(Water_percentage_Rounded#) + "%."
            air_String$ = "The sum of the air signs in this birth chart is" + STR$(air) + ". Thus, its owner is determined by the element of air by" + STR$(Air_percentage_Rounded#) + "%."

            active_Signs = fire + earth
            passive_Signs = water + air
            polarity_Percentage = active_Signs + passive_Signs

            active_Percentage = 100 / polarity_Percentage * active_Signs
            passive_Percentage = 100 / polarity_Percentage * passive_Signs

            active_percentage_Rounded# = INT(active_Percentage * 10 ^ 2 + .5): active_percentage_Rounded# = active_percentage_Rounded# / 100
            passive_percentage_Rounded# = INT(passive_Percentage * 10 ^ 2 + .5): passive_percentage_Rounded# = passive_percentage_Rounded# / 100

            active_String$ = "The sum of the active signs in this birth chart is" + STR$(active_Signs) + ". Thus, its owner is characterized by active polarities at" + STR$(active_percentage_Rounded#) + "%."
            passive_String$ = "The sum of the passive signs in this birth chart is" + STR$(passive_Signs) + ". Thus, its owner is characterized by passive polarities at" + STR$(passive_percentage_Rounded#) + "%."

            aries_String$ = "Strength of Aries:" + STR$(aries_Value) + " (" + STR$(Aries_percentage_Rounded#) + "%)"
            taurus_String$ = "Strength of Taurus:" + STR$(taurus_Value) + " (" + STR$(Taurus_percentage_Rounded#) + "%)"
            gemini_String$ = "Strength of Gemini:" + STR$(gemini_Value) + " (" + STR$(Gemini_percentage_Rounded#) + "%)"
            cancer_String$ = "Strength of Cancer:" + STR$(cancer_Value) + " (" + STR$(Cancer_percentage_Rounded#) + "%)"
            leo_String$ = "Strength of Leo:" + STR$(leo_Value) + " (" + STR$(Leo_percentage_Rounded#) + "%)"
            virgo_String$ = "Strength of Virgo:" + STR$(virgo_Value) + " (" + STR$(Virgo_percentage_Rounded#) + "%)"
            libra_String$ = "Strength of Libra:" + STR$(libra_Value) + " (" + STR$(Libra_percentage_Rounded#) + "%)"
            scorpio_String$ = "Strength of Scorpio:" + STR$(scorpio_Value) + " (" + STR$(Scorpio_percentage_Rounded#) + "%)"
            sagittarius_String$ = "Strength of Sagittarius:" + STR$(sagittarius_Value) + " (" + STR$(Sagittarius_percentage_Rounded#) + "%)"
            capricorn_String$ = "Strength of Capricorn:" + STR$(capricorn_Value) + " (" + STR$(Capricorn_percentage_Rounded#) + "%)"
            Aquarius_String$ = "Strength of Aquarius:" + STR$(Aquarius_Value) + " (" + STR$(Aquarius_percentage_Rounded#) + "%)"
            pisces_String$ = "Strength of Pisces:" + STR$(pisces_Value) + " (" + STR$(Pisces_percentage_Rounded#) + "%)"

            cardinal_String$ = "The sum of the cardinal signs in this birth chart is" + STR$(cardinals) + ". Thus, its owner is characterized by cardinal qualities at" + STR$(cardinal_percentage_Rounded#) + "%."
            fixed_String$ = "The sum of the fixed signs in this birth chart is" + STR$(fixed) + ". Thus, its owner is characterized by fixed qualities at" + STR$(fixed_percentage_Rounded#) + "%."
            mutable_String$ = "The sum of the mutable signs in this birth chart is" + STR$(mutable) + ". Thus, its owner is characterized by mutable qualities at" + STR$(mutable_percentage_Rounded#) + "%."

            house1_String$ = "Strength of the 1st house: " + STR$(house(1)) + " (" + STR$(house1_percentage_Rounded#) + "%)"
            house2_String$ = "Strength of the 2nd house: " + STR$(house(2)) + " (" + STR$(house2_percentage_Rounded#) + "%)"
            house3_String$ = "Strength of the 3rd house: " + STR$(house(3)) + " (" + STR$(house3_percentage_Rounded#) + "%)"
            house4_String$ = "Strength of the 4th house: " + STR$(house(4)) + " (" + STR$(house4_percentage_Rounded#) + "%)"
            house5_String$ = "Strength of the 5th house: " + STR$(house(5)) + " (" + STR$(house5_percentage_Rounded#) + "%)"
            house6_String$ = "Strength of the 6th house: " + STR$(house(6)) + " (" + STR$(house6_percentage_Rounded#) + "%)"
            house7_String$ = "Strength of the 7th house: " + STR$(house(7)) + " (" + STR$(house7_percentage_Rounded#) + "%)"
            house8_String$ = "Strength of the 8th house: " + STR$(house(8)) + " (" + STR$(house8_percentage_Rounded#) + "%)"
            house9_String$ = "Strength of the 9th house: " + STR$(house(9)) + " (" + STR$(house9_percentage_Rounded#) + "%)"
            house10_String$ = "Strength of the 10th house: " + STR$(house(10)) + " (" + STR$(house10_percentage_Rounded#) + "%)"
            house11_String$ = "Strength of the 11th house: " + STR$(house(11)) + " (" + STR$(house11_percentage_Rounded#) + "%)"
            house12_String$ = "Strength of the 12th house: " + STR$(house(12)) + " (" + STR$(house12_percentage_Rounded#) + "%)"

            Quad1string$ = "Strength of the 1st quadrant: " + STR$(Quad1) + " (" + STR$(quad1_percentage_Rounded#) + "%)"
            Quad2string$ = "Strength of the 2nd quadrant: " + STR$(Quad2) + " (" + STR$(quad2_percentage_Rounded#) + "%)"
            Quad3string$ = "Strength of the 3rd quadrant: " + STR$(Quad3) + " (" + STR$(quad3_percentage_Rounded#) + "%)"
            Quad4string$ = "Strength of the 4th quadrant: " + STR$(Quad4) + " (" + STR$(quad4_percentage_Rounded#) + "%)"

            DECLARE SUB quicksort (min%, max%)
            DECLARE SUB display ()

            elements_Table$(0) = earth_String$
            elements_table_Values(0) = earth
            elements_Table$(1) = fire_String$
            elements_table_Values(1) = fire
            elements_Table$(2) = water_String$
            elements_table_Values(2) = water
            elements_Table$(3) = air_String$
            elements_table_Values(3) = air

            signs_Table$(0) = aries_String$
            signs_table_Values(0) = aries_Value
            signs_Table$(1) = taurus_String$
            signs_table_Values(1) = taurus_Value
            signs_Table$(2) = gemini_String$
            signs_table_Values(2) = gemini_Value
            signs_Table$(3) = cancer_String$
            signs_table_Values(3) = cancer_Value
            signs_Table$(4) = leo_String$
            signs_table_Values(4) = leo_Value
            signs_Table$(5) = virgo_String$
            signs_table_Values(5) = virgo_Value
            signs_Table$(6) = libra_String$
            signs_table_Values(6) = libra_Value
            signs_Table$(7) = scorpio_String$
            signs_table_Values(7) = scorpio_Value
            signs_Table$(8) = sagittarius_String$
            signs_table_Values(8) = sagittarius_Value
            signs_Table$(9) = capricorn_String$
            signs_table_Values(9) = capricorn_Value
            signs_Table$(10) = Aquarius_String$
            signs_table_Values(10) = Aquarius_Value
            signs_Table$(11) = pisces_String$
            signs_table_Values(11) = pisces_Value

            qualities_Table$(0) = cardinal_String$
            qualities_table_Values(0) = cardinals
            qualities_Table$(1) = fixed_String$
            qualities_table_Values(1) = fixed
            qualities_Table$(2) = mutable_String$
            qualities_table_Values(2) = mutable

            polarities_Table$(0) = active_String$
            polarities_table_Value(0) = active_Signs
            polarities_Table$(1) = passive_String$
            polarities_table_Value(1) = passive_Signs

            houses_Table$(0) = house1_String$
            houses_table_Values(0) = house(1)
            houses_Table$(1) = house2_String$
            houses_table_Values(1) = house(2)
            houses_Table$(2) = house3_String$
            houses_table_Values(2) = house(3)
            houses_Table$(3) = house4_String$
            houses_table_Values(3) = house(4)
            houses_Table$(4) = house5_String$
            houses_table_Values(4) = house(5)
            houses_Table$(5) = house6_String$
            houses_table_Values(5) = house(6)
            houses_Table$(6) = house7_String$
            houses_table_Values(6) = house(7)
            houses_Table$(7) = house8_String$
            houses_table_Values(7) = house(8)
            houses_Table$(8) = house9_String$
            houses_table_Values(8) = house(9)
            houses_Table$(9) = house10_String$
            houses_table_Values(9) = house(10)
            houses_Table$(10) = house11_String$
            houses_table_Values(10) = house(11)
            houses_Table$(11) = house12_String$
            houses_table_Values(11) = house(12)

            quadrants_Table$(0) = Quad1string$
            quadrants_table_Values(0) = Quad1
            quadrants_Table$(1) = Quad2string$
            quadrants_table_Values(1) = Quad2
            quadrants_Table$(2) = Quad3string$
            quadrants_table_Values(2) = Quad3
            quadrants_Table$(3) = Quad4string$
            quadrants_table_Values(3) = Quad4

            PRINT "Additional astrological calculations based upon the natal chart of"
            PRINT GetItem$(TextBox1, Control(TextBox1).Value)
            PRINT "born " + GetItem$(TextBox2, Control(TextBox2).Value) + "," + GetItem$(TextBox3, Control(TextBox3).Value) + ","
            PRINT GetItem$(TextBox4, Control(TextBox4).Value)
            PRINT
            COLOR 8
            PRINT "Elements:"
            PRINT
            COLOR 0
            quicksort 0, 3, elements_Table$(), elements_table_Values()
            display elements_Table$()
            PRINT
            COLOR 8
            PRINT "Dominance of the signs:"
            PRINT
            COLOR 0
            quicksort 0, 11, signs_Table$(), signs_table_Values()
            display signs_Table$()
            PRINT
            PRINT "At a strength of"; largest; "("; signs_percentage_Rounded#; "% ), "; dom_Sign$; " is the dominant sign."
            PRINT
            COLOR 8
            PRINT "Qualities:"
            PRINT
            COLOR 0
            quicksort 0, 2, qualities_Table$(), qualities_table_Values()
            display qualities_Table$()
            PRINT
            COLOR 8
            PRINT "Polarities:"
            PRINT
            COLOR 0
            quicksort 0, 1, polarities_Table$(), polarities_table_Values()
            display polarities_Table$()
            PRINT
            COLOR 8
            PRINT "Dominance of the houses:"
            PRINT
            COLOR 0
            quicksort 0, 11, houses_Table$(), houses_table_Values()
            display houses_Table$()
            PRINT
            PRINT "The dominant house in this birth chart is house no."; dom_House; "("; largesthouse_percentage_Rounded#; "% )."
            PRINT
            COLOR 8
            PRINT "Dominance of the quadrants:"
            COLOR 0
            PRINT
            quicksort 0, 3, quadrants_Table$(), quadrants_table_Values()
            display quadrants_Table$()
            PRINT
            PRINT "The dominant quadrant is the "; dom_Quad$; " at "; large_dom_Quad_percentage_Rounded#; "%."
            PRINT
            PRINT "For the dominant celestial body in this birth chart, enter its birth place and birth time at www.astro.com and then select the 'Color Oracle'."
    END SELECT
END SUB

SUB display (a$())
    FOR i% = 0 TO UBOUND(a$)
        AddItem ListBox1, a$(i%)
    NEXT
END SUB

SUB quicksort (min%, max%, a$(), b())
    IF min% < max% THEN
        p1% = min%
        p2% = max%
        mid = b((min% + max%) \ 2) '**
        DO UNTIL p1% > p2%
            DO WHILE b(p1%) > mid '**<<invert this unequality to sort ascending
                p1% = p1% + 1
            LOOP
            DO WHILE mid > b(p2%) '**<<this one too
                p2% = p2% - 1
            LOOP
            IF p1% <= p2% THEN
                SWAP a$(p1%), a$(p2%) '**
                SWAP b(p1%), b(p2%) '**
                p1% = p1% + 1
                p2% = p2% - 1
            END IF
        LOOP
        IF min% < p2% THEN quicksort min%, p2%, a$(), b()
        IF p1% < max% THEN quicksort p1%, max%, a$(), b()
    END IF
END SUB


SUB __UI_MouseEnter (id AS LONG)
    SELECT CASE id
        CASE Form1

        CASE Chartowner

        CASE TextBox1

        CASE __name

        CASE TextBox2

        CASE birthdate

        CASE TextBox3

        CASE birthtime

        CASE TextBox4

        CASE birthplace

    END SELECT
END SUB

SUB __UI_MouseLeave (id AS LONG)
    SELECT CASE id
        CASE Form1

        CASE Chartowner

        CASE TextBox1

        CASE __name

        CASE TextBox2

        CASE birthdate

        CASE TextBox3

        CASE birthtime

        CASE TextBox4

        CASE birthplace

    END SELECT
END SUB

SUB __UI_FocusIn (id AS LONG)
    SELECT CASE id
        CASE TextBox1

        CASE TextBox2

        CASE TextBox3

        CASE TextBox4

    END SELECT
END SUB

SUB __UI_FocusOut (id AS LONG)
    'This event occurs right before a control loses focus.
    'To prevent a control from losing focus, set __UI_KeepFocus = True below.
    SELECT CASE id
        CASE TextBox1

        CASE TextBox2

        CASE TextBox3

        CASE TextBox4

    END SELECT
END SUB

SUB __UI_MouseDown (id AS LONG)
    SELECT CASE id
        CASE Form1

        CASE Chartowner

        CASE TextBox1

        CASE __name

        CASE TextBox2

        CASE birthdate

        CASE TextBox3

        CASE birthtime

        CASE TextBox4

        CASE birthplace

    END SELECT
END SUB

SUB __UI_MouseUp (id AS LONG)
    SELECT CASE id
        CASE Form1

        CASE Chartowner

        CASE TextBox1

        CASE __name

        CASE TextBox2

        CASE birthdate

        CASE TextBox3

        CASE birthtime

        CASE TextBox4

        CASE birthplace

    END SELECT
END SUB

SUB __UI_KeyPress (id AS LONG)
    'When this event is fired, __UI_KeyHit will contain the code of the key hit.
    'You can change it and even cancel it by making it = 0
    SELECT CASE id
        CASE TextBox1

        CASE TextBox2

        CASE TextBox3

        CASE TextBox4

    END SELECT
END SUB

SUB __UI_TextChanged (id AS LONG)
    SELECT CASE id
        CASE TextBox1

        CASE TextBox2

        CASE TextBox3

        CASE TextBox4

    END SELECT
END SUB

SUB __UI_ValueChanged (id AS LONG)
    SELECT CASE id
    END SELECT
END SUB

SUB __UI_FormResized

END SUB
