(a) Any person convicted of a second or subsequent offense under this act, who is not subject to a fixed minimum term under section 37-2739B, Idaho Code, may be imprisoned for a term up to twice the term otherwise authorized, fined an amount up to twice that otherwise authorized, or both.
(b) For purposes of this section, an offense is considered a second or subsequent offense, if, prior to his conviction of the offense, the offender has at any time been convicted under this act or under any statute of the United States or of any state relating to narcotic drugs, marijuana, depressant, stimulant, or hallucinogenic drugs.