If any such animal or animals shall break into an enclosure surrounded by a fence of the height and sufficiency prescribed by this act, or shall be wrongfully upon the premises of another, the owner or occupier of such enclosure or premises may take into possession such animal or animals trespassing, and keep the same until damages, with reasonable charges for keeping and feeding, and all costs of action be paid, to be recovered in the circuit court, and any person who shall take or rescue any such animal so taken up from the possession of the holder of the animal without such holder's consent, shall be liable to a fine of not less than 3 nor more than 5 dollars for each of such animals so rescued, to be recovered in the circuit court of the county where such offense has been committed, for the use of the school fund of the proper county. Within 24 hours after taking such animal into his or her possession, such holder of the animal shall give notice to the owner thereof, if known, or if unknown, he or she shall post notices at some public place near the premises.
765 ILCS 130/21