In rebuilding any county bridge and the approaches thereto, the department and any city, county, or railroad company, or any two or more of them, may enter into agreements for the joint payment, in proportions to be agreed upon, of the cost of such rebuilding of said bridge and the approaches.
36 P.S. § 670-773