The governing bodies which are entitled to appoint a member of the board of directors are hereby authorized to appropriate their respective shares of the cost of construction of the facilities as determined upon by agreement between the board of directors and the respective governing bodies; and the said governing bodies are hereby authorized to appropriate their respective shares of the cost of operating such programs as the corporation shall have elected to implement, as determined by agreement between the Alabama Department of Mental Health, the board of directors and the respective governing bodies, notwithstanding the fact that the said facilities may be located in a county other than the county whose governing body makes the said appropriations.