Document:

<PAGE>
                                                                    EXHIBIT 10.4

                   SECOND AMENDED AND RESTATED REVOLVING NOTE

$15,000,000.00                   Dallas, Texas                      May 23, 2002

         FOR VALUE RECEIVED, the undersigned, HORIZON MENTAL HEALTH MANAGEMENT,
INC., a Texas corporation ("Borrower") hereby promises to pay to the order of
BANK OF AMERICA, NATIONAL ASSOCIATION ("Bank"), at the Principal Office of the
Agent, in lawful money of the United States of America and in immediately
available funds, the principal amount of FIFTEEN MILLION AND NO/100 DOLLARS
($15,000,000.00) or such lesser amount as shall equal the aggregate unpaid
principal amount of the Loans made by Bank to Borrower under the Credit
Agreement referred to below, on the dates and in the principal amounts provided
in the Credit Agreement, and to pay interest on the unpaid principal amount of
each such Loans, at such office, in like money and funds, for the period
commencing on the date of such Loans until such Loan shall be paid in full, at
the rates per annum and on the dates provided in the Credit Agreement.

         Borrower hereby authorizes Bank to record in its records the amount of
each Loan and Type of Accounts established under each Loan and all
Continuations, Conversions and payments of principal in respect thereof, which
records shall, in the absence of manifest error, constitute prima facie evidence
of the accuracy thereof; provided, however, that the failure to make such
notation with respect to any such Loan or payment shall not limit or otherwise
affect the obligations of Borrower under the Credit Agreement or this Revolving
Note.

         This Revolving Note is one of the Revolving Notes referred to in the
Second Amended and Restated Credit Agreement dated as of May 23, 2002, among
Borrower, Horizon Health Corporation, Bank, the other banks and lending
institutions named therein and JPMorgan Chase Bank, as agent for Bank and such
other banks and lending institutions ("Agent") (such Credit Agreement, as the
same may be amended or otherwise modified from time to time, being referred to
herein as the "Credit Agreement"), and evidences the Loans made by Bank
thereunder. The Credit Agreement, among other things, contains provisions for
acceleration of the maturity of this Revolving Note upon the happening of
certain stated events and for prepayments of the Loans prior to the maturity of
this Revolving Note upon the terms and conditions specified in the Credit
Agreement. Capitalized terms used in this Revolving Note have the respective
meanings assigned to them in the Credit Agreement.

         This Revolving Note shall be governed by and construed in accordance
with the laws of the State of Texas and the applicable laws of the United States
of America.

         Except for any notices expressly required by the Loan Documents,
Borrower and each surety, guarantor, endorser and other party ever liable for
payment of any sums of money payable on this Revolving Note jointly and
severally waive notice, presentment, demand for payment, protest, notice of
protest and non-payment or dishonor, notice of acceleration, notice of intent to
accelerate, notice of intent to demand, diligence in collecting, grace and all
other formalities of any kind, and consent to all extensions without notice for
any period or periods of time and partial payments, before or after maturity,
and any impairment of any collateral securing this Revolving Note, all without
prejudice to the holder. The holder shall similarly have the right to deal in
any way, at any time, with one or more of the foregoing parties without notice
to any other party, and to grant any such party any extensions of time for
payment of any of said indebtedness, or to release any such party or to release
or substitute part or all of the collateral securing this Revolving Note, or to
grant any other indulgences or forbearances whatsoever, without notice to any
other party and without in any way affecting the personal liability of any party
hereunder.

         This Revolving Note is executed in amendment and restatement of (and
not in extinguishment or satisfaction of the indebtedness evidenced by) that
certain Amended and Restated Revolving Note dated as of November 15, 2000,
executed by Borrower pursuant to the Existing Credit Agreement and payable to
the order of The Chase Manhattan Bank (the "2000 Note") to the extent the
indebtedness evidenced thereby has been assigned to the Bank. The 2000 Note was
executed in amendment and restatement of all of those certain Term Notes dated
as of December 9, 1997 executed by Parent pursuant to the Original Credit
Agreement and payable to the order of the

<PAGE>
banks named therein, including The Chase Manhattan Bank, as such notes have been
assigned to The Chase Manhattan Bank and assumed by Borrower (collectively, the
"1997 Notes" and the 1997 Notes and the 2000 Note, herein the "Prior Notes").
This Revolving Note evidences indebtedness previously evidenced by the Prior
Notes. With respect to matters relating to the period prior to the date hereof,
all provisions of the Prior Notes are hereby ratified and confirmed and shall
remain in full force and effect.

                                        HORIZON MENTAL HEALTH MANAGEMENT, INC.

                                        By: /s/ RONALD C. DRABIK
                                            ------------------------------------
                                            Name:  Ronald C. Drabik
                                            Title: CFO<PAGE>
                                                                    EXHIBIT 10.5

                       SECOND AMENDMENT TO LEASE AGREEMENT

         THIS SECOND AMENDMENT TO LEASE AGREEMENT (the "Amendment"), dated as of
May 23, 2002, is by and between NORTH CENTRAL DEVELOPMENT COMPANY, a Texas
corporation (the "Lessor") and HORIZON HEALTH CORPORATION, a Delaware
corporation (formerly known as Horizon Mental Health Management, Inc. and
hereinafter the "Lessee").

                                    RECITALS:

         WHEREAS, Lessor and Lessee have entered into that certain Lease
Agreement dated as of December 20, 1995 (as amended by that certain First
Amendment to Lease Agreement dated as of November 15, 2000, and as the same may
hereafter be further amended or otherwise modified, the "Lease Agreement").

         WHEREAS, Lessee, Lessor, JPMorgan Chase Bank (as successor in interest
by merger to The Chase Manhattan Bank, who was successor in interest by merger
to the Chase Bank of Texas, National Association, formerly known as Texas
Commerce Bank National Association, "Bank"), Horizon Mental Health Management,
Inc., a Texas corporation ("Borrower") have entered into that certain Letter
Loan Agreement dated as of December 20, 1995 (as amended by that certain First
Amendment (as defined below), that certain Amendment Letter dated as of June 30,
1998, that certain Second Amendment to Credit Agreement and Third Amendment to
Letter Loan Agreement dated as of September 30, 1998, that certain Third
Amendment to Credit Agreement and Fourth Amendment to Letter Loan Agreement
dated as of November 6, 1998, that certain Fourth Amendment to Credit Agreement
and Fifth Amendment to Letter Loan Agreement dated as of October 12, 1999, that
certain Sixth Amendment to Letter Loan Agreement dated as of November 15, 2000,
that certain Seventh Amendment to Letter Loan Agreement dated the date hereof,
and as the same may hereafter be further amended or otherwise modified, the
"Loan Agreement").

         WHEREAS, Lessee, Bank in its individual capacity and as agent for
itself and the other lending institutions party thereto, Bank of America, N.A.
(formerly known as Bank of America National Trust and Savings Association),
Comerica Bank-Texas, Cooperatieve Centrale Raiffeisen-Boerenleenbank B.A.,
"Rabobank Nederland", New York Branch, and Banque Paribas, Houston Agency have
entered into that certain Credit Agreement dated as of December 9, 1997 (as
amended by that certain Amended and Restated Credit Agreement dated as of
November 15, 2000, and as the same may hereafter be further amended or otherwise
modified, the "Existing Credit Agreement").

         WHEREAS, Lessee, Borrower, the banks party thereto, and Bank as agent
are entering into that certain Second Amended and Restated Credit Agreement,
dated as of the date hereof, amending the Existing Credit Agreement in its
entirety (herein the "Second Amended and Restated Credit Agreement").

         WHEREAS, Lessor and Lessee now desire to amend the Lease Agreement as
herein set forth and Bank, as Noteholder, consents to this Amendment.

         NOW, THEREFORE, in consideration of the premises herein contained and
other good and valuable consideration, the receipt and sufficiency of which are
hereby acknowledged, the parties hereto agree as follows:

                                    ARTICLE 1

                                   Definitions

         Section 1.1 Definitions. Capitalized terms used in this Amendment, to
the extent not otherwise defined herein, shall have the same meanings as in the
Lease Agreement, as amended hereby.

SECOND AMENDMENT TO LEASE AGREEMENT, Page 1

<PAGE>

                                    ARTICLE 2

                                     Consent

         Section 2.1 Consent to Amendment to Credit Agreement. Lessee has
advised Lessor that the Existing Credit Agreement is being amended and restated
by the Second Amended and Restated Credit Agreement. Lessee requests that Lessor
consent and give effect to the amendments and other modifications included in
the Second Amended and Restated Credit Agreement for purposes of the
incorporation of the terms thereof into the Loan Agreement under subparagraph
10(a).

                                    ARTICLE 3

                                    Amendment

         Section 3.1 Amendment to the Definitions Utilized in Paragraph 1.
Paragraph 1 of the Lease Agreement is modified as follows:

                  (a) the definitions of the following terms are amended in
         their entirety to read as follows:

                  "Applicable LIBOR Margin" means the "Eurodollar Rate Margin"
         as such term is defined in that certain Second Amended and Restated
         Credit Agreement dated as of May 23, 2002 by and among Horizon Health
         Corporation, Horizon Mental Health Management, Inc., each of the banks
         or other lending institutions which is or which may from time to time
         become a signatory thereto or any successor or assignee thereof, and
         JPMorgan Chase Bank, as such credit agreement exists on May 23, 2002
         without giving effect to any amendment or other modification thereto
         unless amended or otherwise modified with the agreement of Noteholder
         and whether or not at any time such credit agreement remains in effect
         as a valid, binding and enforceable agreement (in such form, herein the
         "Credit Agreement").

                  "Bank" means JPMorgan Chase Bank (as successor in interest by
         merger to The Chase Manhattan Bank, who was the successor in interest
         by merger to the Chase Bank of Texas, N.A., formerly known as Texas
         Commerce Bank National Association), and any successors and assigns
         thereof.

                  "Consolidated Entities" means Lessee, Borrower, Outcomes,
         Geriatric, Specialty, Partners, HBS, FPA, HBS FL, Texas, HMHM, HBS CO,
         HBS CA, FPM, OHCA, EAS, REAP, HBS IPA, HBS NJ, and HBS NY, and any
         other Person required to be consolidated with the foregoing in
         accordance with GAAP.

                  "Final Payment Date" means the earliest of (a) the Termination
         Date as defined in the Credit Agreement, (b) such date that Lessor may
         designate as a Final Payment Date following the occurrence of an Event
         of Default, or (c) any date on which Noteholder may require payment of
         the Notes at maturity or upon acceleration thereof.

                  "Guaranteed Amount" means an amount equal to Lessee's,
         Borrower's, Outcomes', Geriatric's, Specialty's, Partners's, HBS's,
         FPA's, HBS FL's, Texas', HMHM's, OHCA's, EAS's, HBS IPA's, HBS NJ's,
         and HBS NY's obligations and liabilities incurred pursuant to a
         guaranty agreement under which such Persons guaranteed, among other
         things, the obligations, liabilities and indebtedness owed by Lessor to
         Bank as evidenced by Term Note B.

SECOND AMENDMENT TO LEASE AGREEMENT, Page 2

<PAGE>

                  (b) the definitions of the following terms are hereby added to
         Paragraph 1 of the Lease Agreement:

                  "EAS" means Employee Assistance Services, Inc., a Kentucky
         corporation.

                  "HBS FL" means Horizon Behavioral Services of Florida, Inc., a
         Florida corporation.

                  "HBS IPA" means Horizon Behavioral Services IPA, Inc., a New
         York corporation.

                  "HBS NJ" means Horizon Behavioral Services of New Jersey,
         Inc., a New Jersey corporation.

                  "HBS NY" means Horizon Behavioral Services of New York, Inc.,
         a New York corporation.

                  "OHCA" means Occupational Health Consultants of America, Inc.,
         a Tennessee corporation.

                  (c) the definition of FPMI is hereby deleted from Paragraph 1
         of the Lease Agreement.

         Section 3.2 Amendment to Paragraph 2. Paragraph 2 of the Lease
Agreement is amended in its entirety to read as follows:

                  2. Term. The term of this Lease shall commence on the date
         first written above, and end at midnight on the Termination Date (as
         defined in the Credit Agreement), (said term hereinafter called the
         "Term"), unless sooner terminated as herein provided.

         Section 3.3 Reference to Second Amended and Restated Credit Agreement
and Loan Agreement. The Lease Agreement is hereby amended so that any reference
in such Lease Agreement to the Credit Agreement means the Existing Credit
Agreement as amended and restated by the Second Amended and Restated Credit
Agreement, and any reference in such Lease Agreement to the Loan Agreement means
the Loan Agreement as amended and as may be further amended.

                                    ARTICLE 4

                              Conditions Precedent

         Section 4.1 Conditions. The effectiveness of Article 2 of this
Amendment is subject to the satisfaction of the following conditions precedent:

                  (a) Bank shall have received all of the following, each dated
         (unless otherwise indicated) the date of this Amendment, in form and
         substance satisfactory to Bank:

                           (i) The Second Amended and Restated Credit Agreement
                  executed and delivered by Lessee and Borrower and evidence
                  that all conditions precedent to its effectiveness thereunder
                  have been satisfied; and

                           (ii) Such other additional approvals, opinions, or
                  documents as Bank may reasonably request;

SECOND AMENDMENT TO LEASE AGREEMENT, Page 3

<PAGE>

                  (b) The representations and warranties contained herein and in
         all other Loan Documents, as amended hereby, shall be true and correct
         as of the date hereof as if made on the date hereof;

                  (c) No Event of Default shall have occurred and be continuing
         and no event or condition shall have occurred that with the giving
         notice or lapse of time or both would be an Event of Default; and

                  (d) All corporate proceedings taken in connection with the
         transactions contemplated by this Amendment and all documents,
         instruments, and other legal matters incident thereto shall be
         satisfactory to Bank and its legal counsel, Jenkens & Gilchrist, a
         Professional Corporation.

                                    ARTICLE 5

                  Ratifications, Representations and Warranties

         Section 5.1 Ratifications. The terms and provisions set forth in this
Amendment shall modify and supersede all inconsistent terms and provisions set
forth in the Lease Agreement and except as expressly modified and superseded by
this Amendment, the terms and provisions of the Lease Agreement and the other
Loan Documents are ratified and confirmed and shall continue in full force and
effect. Lessor and Lessee agree that the Lease Agreement, as amended hereby, and
the other Loan Documents shall continue to be legal, valid, binding, and
enforceable in accordance with their respective terms.

         Section 5.2 Representations and Warranties. Lessee hereby represents
and warrants to Lessor that (i) the execution, delivery, and performance of this
Amendment and any and all other Loan Documents executed and/or delivered by it
in connection herewith have been authorized by all requisite corporate action on
its part and will not violate its articles of incorporation or bylaws, (ii) the
representations and warranties contained in the Lease Agreement, as amended
hereby, and any other Loan Document to which it is a party are true and correct
on and as of the date hereof as though made on and as of the date hereof, except
to the extent such representations and warranties relate specifically to an
earlier date, (iii) no Event of Default has occurred and is continuing and no
event or condition has occurred that with the giving of notice or lapse of time
or both would be an Event of Default, and (iv) Lessee is in full compliance with
all covenants and agreements contained in the Lease Agreement as amended hereby
and the other Loan Documents.

                                    ARTICLE 6

                                  Miscellaneous

         Section 6.1 Reference to Lease Agreement. Each of the Loan Documents,
including the Lease Agreement and any and all other agreements, documents, or
instruments now or hereafter executed and delivered pursuant to the terms hereof
or pursuant to the terms of the Lease Agreement as amended hereby, are hereby
amended so that any reference in such Loan Documents to the Lease Agreement
shall mean a reference to the Lease Agreement as amended hereby.

         Section 6.2 Severability. Any provision of this Amendment held by a
court of competent jurisdiction to be invalid or unenforceable shall not impair
or invalidate the remainder of this Amendment and the effect thereof shall be
confined to the provision so held to be invalid or unenforceable.

         Section 6.3 Applicable Law. This Amendment shall be governed by and
construed in accordance with the laws of the State of Texas.

SECOND AMENDMENT TO LEASE AGREEMENT, Page 4

<PAGE>

         Section 6.4 Successors and Assigns. This Amendment is binding upon and
shall inure to the benefit of Lessor and Lessee and their respective successors
and assigns, except Lessee may not assign or transfer any of its rights or
obligations hereunder without the prior written consent of Lessor and
Noteholder.

         Section 6.5 Counterparts. This Amendment may be executed in one or more
counterparts and on telecopy counterparts, each of which when so executed shall
be deemed to be an original, but all of which when taken together shall
constitute one and the same agreement.

         Section 6.6 Effect of Waiver. No consent or waiver, express or
implied, by Lessor to or for any breach of or deviation from any covenant,
condition or duty by Lessee shall be deemed a consent or waiver to or of any
other breach of the same or any other covenant, condition or duty.

         Section 6.7 Headings. The headings, captions, and arrangements used in
this Amendment are for convenience only and shall not affect the interpretation
of this Amendment.

         Section 6.8 ENTIRE AGREEMENT. THIS AMENDMENT EMBODIES THE FINAL, ENTIRE
AGREEMENT AMONG THE PARTIES HERETO AND SUPERSEDE ANY AND ALL PRIOR COMMITMENTS,
AGREEMENTS, REPRESENTATIONS AND UNDERSTANDINGS, WHETHER WRITTEN OR ORAL,
RELATING TO THE SUBJECT MATTER OF THIS AMENDMENT, AND MAY NOT BE CONTRADICTED OR
VARIED BY EVIDENCE OF PRIOR, CONTEMPORANEOUS OR SUBSEQUENT ORAL AGREEMENTS OR
DISCUSSIONS OF THE PARTIES HERETO. THERE ARE NO ORAL AGREEMENTS AMONG THE
PARTIES HERETO.

SECOND AMENDMENT TO LEASE AGREEMENT, Page 5

<PAGE>

Executed as of the date first written above.

                                  LESSOR:

                                  NORTH CENTRAL DEVELOPMENT COMPANY

                                  By: /s/ DAVID W. AMEND
                                      ------------------------------------------
                                      Name:  DAVID W. AMEND
                                      Title: VICE-PRESIDENT

                                  LESSEE:

                                  HORIZON HEALTH CORPORATION (formerly known as
                                  Horizon Mental Health Management, Inc.)

                                  By: /s/ RONALD C. DRABIK
                                      ------------------------------------------
                                      Name: RONALD C. DRABIK
                                            ------------------------------------
                                            Authorized Officer of all Guarantors

SECOND AMENDMENT TO LEASE AGREEMENT, Page 6

<PAGE>
                                 ACKNOWLEDGMENT

The undersigned hereby consents and agrees to this Amendment.

                                  JP MORGAN CHASE BANK (as successor in interest
                                  by merger to The Chase Manhattan Bank, who
                                  was successor-in-interest by merger to the
                                  Chase Bank of Texas, National Association,
                                  who was formerly known as Texas Commerce
                                  Bank National Association),

                                  By: /s/ D. SCOTT HARVEY
                                      ------------------------------------------
                                      D. Scott Harvey, Senior Vice President

SECOND AMENDMENT TO LEASE AGREEMENT, Page 7

Source: [{"source": "alea-institute/alea-institute/kl3m-data-edgar-agreements/train-00040-of-00352.parquet"}, [{"source": "alea-institute/alea-institute/kl3m-data-edgar-agreements/train-00040-of-00352.parquet"}]]