The payment to any owner of sheep, goats, cattle, horses, mules, swine, or poultry of monies out of the Animal Control Fund for damages resulting from loss or injury to any such animals, shall not be a bar to an action by such owner against the owner of the dog committing such injury or causing such loss for the recovery of damages therefor. The court or jury, before which such action is tried, shall ascertain from evidence what portion, if any, of the damages sought to be recovered in such action has been paid to the plaintiff in such action by the County Treasurer, and in case the plaintiff in such action recovers damages, the court shall enter judgment against the defendant, in the name of the plaintiff for the use of the county, for the amount which the plaintiff has received on account of such damages from the County Treasurer, if such recovery shall equal or exceed the amount so received by such plaintiff from the County Treasurer; and the residue of such recovery, if any there be, shall be entered in the name of the plaintiff in such action to his own use. If the amount of the recovery in such action shall not equal the amount previously paid the plaintiff on account of such damages by the County Treasurer, then the judgment shall be entered as heretofore stated for the use of the Animal Control Fund, for the full amount of such recovery. The judgment shall show on its face what portion of the judgment is to be paid to the Animal Control Fund, and what portion is to be paid to the plaintiff in such action, and the judgment when collected shall be paid over to the parties entitled thereto in their proper proportions.
510 ILCS 5/20