The functions and facilities related to youth detention facilities, licensed by the department of youth services of each county or counties, acting together may, upon the express written agreement of each such county or such counties acting together and the department, receive funds from the department according to formulae for disbursement established by the department and in accordance with the terms of written agreements between each such county or such counties acting together and the department, relative to detention care. Any county or counties acting together shall retain control of such detention functions and detention facilities and shall continue to have financial responsibility for their operation, unless otherwise provided for by the department. All detention programs and facilities shall maintain standards prescribed by the department. All funds expended by the department will be contingent upon the recipients of said funds meeting the standards established by the department.
Ala. Code § 44-1-28 (1975)