(a) A vicious dog shall be immediately confiscated by the dog control officer or by a law enforcement officer or by another person authorized by the dog control officer if the dog is not maintained in a proper enclosure or is outside a proper enclosure. (b) Any dog that has been confiscated under the provisions of this section shall be returned to its owner upon the owner's compliance with the provisions of this division and upon the payment of reasonable confiscation costs. In the event the owner has not complied with the provisions of this division within 40 days of the date the dog was confiscated, the dog shall be destroyed in an expeditious and humane manner.