If the charges when due are not paid within 10 days after demand therefor, such keeper, owner, or proprietor is authorized, on giving 10 days' notice of the time and place of such sale, by advertisement in some newspaper published in the county in which the stable is located, once a week for three successive weeks, or, if there be no such paper, by posting the notice in three conspicuous places in the county, to sell the stock for the payment of the charges and expenses of keeping and of the sale; and the balance, if any there be, he shall pay over to the owner.