(1) A person commits the crime of tampering with a witness if he:
(a) Intentionally or knowingly attempts to induce a witness or a person he reasonably believes will be called as a witness in any official proceeding to:
(i) Testify falsely or unlawfully withhold testimony;
(ii) Absent himself from any official proceeding to which he has been legally summoned; or
(b) Solicits, encourages, threatens, harasses or intimidates or attempts to solicit, encourage, threaten, harass or intimidate a witness in an effort to prevent or dissuade the witness from testifying or to provide a false version of events exonerating or incriminating another person of commission of a crime.
(2) Tampering with a witness is a Class 2 felony.
(3) It is not a defense to a prosecution under this section if the actual completion of the threat, harassment or intimidation was prevented from occurring.