Any money received by
a mortgagee or his transferee under any proceeding commenced in his name at
law or in equity shall after payment by thereout of his costs be applied in
reduction or satisfaction of the moneys secured and subject thereto shall be
disposed of according to the equities of the parties interested.