Any county legislative body within the provisions of this part is hereby authorized to enter into an agreement with any other county for the use of the facility in its department of children's services. The county having such a department shall be entitled to reimbursement from the state in the same manner for any juvenile committed from such contracting county. Guardianship of all such juveniles committed from another county under this section shall immediately transfer to the director of the department of children's services to which the juvenile is committed.