The several agencies of the state authorized to administer within the state the various federal acts providing federal moneys to assist in the cost of establishing facilities for community health and mental health and facilities for persons with intellectual disabilities, are authorized to apply for and disburse federal grants, matching funds, or other funds, including gifts or donations from any source, available for use by counties, cities, other municipal corporations or nonprofit corporations. Upon application, these agencies shall also be authorized to distribute such state funds as may be appropriated by the legislature for such local construction projects: PROVIDED, That where state funds have been appropriated to assist in covering the cost of constructing a comprehensive community health center, or a facility for community health and mental health or a facility for persons with intellectual disabilities, and where any county, city, other municipal corporation or nonprofit corporation has submitted an approved application for such state funds, then, after any applicable federal grant has been deducted from the total cost of construction, the state agency or agencies in charge of each program may allocate to such applicant an amount not to exceed fifty percent of that particular program's contribution toward the balance of remaining construction costs.