Where an owner has improved up to and erected upon the line a division fence, and an adjoining owner subsequently improves and occupies up to said line, he shall become liable to the former for such part of the cost of said fence as is just and reasonable, taking into consideration the quantity of the fence, the length of time it had been erected, and its condition. And in case the parties fail to agree on the amount to be paid, the owner who erected said fence may complain to the surveyor aforesaid, who shall assess the amount which, in his opinion, the other party should pay; which amount, together with payment to the surveyor, as in section one provided, may be recovered as provided in section one of this act.
29 P.S. § 42