(b) Any person violating the provisions of this section is, for the first offense, guilty of a misdemeanor and, upon conviction thereof, shall be fined not more than five hundred dollars, or confined in the county or regional jail not more than six months, or both; for the second offense, is guilty of a felony and, upon conviction thereof, shall be fined not more than three thousand dollars, or imprisoned in a state correctional facility for not less than one nor more than three years, or imprisoned in a regional jail for not more than one year, or both fined and imprisoned; for third or subsequent offenses, is guilty of a felony and, upon conviction thereof, shall be fined not more than five thousand dollars, or imprisoned in a state correctional facility for not less than one nor more than three years or both.