(a) When any child is in need of hospitalization and is hospitalized in a state hospital for children under sections 17a-75 to 17a-83, inclusive, or when an applicant is indigent, all fees and expenses incurred upon the court commitment proceedings, except attorneys fees paid pursuant to the provisions of § 17a-77, shall be paid by the state, from funds appropriated to the Department of Children and Families, and if any child is hospitalized in a private hospital or if any child is found not to be mentally disordered and in need of hospitalization, such fees and expenses shall be paid by the applicant, except attorneys fees paid under the provisions of § 17a-77. Compensation shall be determined by the court hearing the matter in accordance with rules adopted by the Superior Court.

(b) The expenses, if any, of necessary transportation to a state hospital for mental illness for hospitalization of any child shall be paid for by the Department of Children and Families, if such child or legally liable relative is unable to pay for the same.

(c) The expenses of medically necessary transportation from any state facility or hospital to any other state facility or hospital shall be assumed by the state facility or hospital which initiated the transfer of such child.