(1) Prior to the preliminary examination or trial a defendant may move to suppress as evidence any confession or admission given by him on the ground that it is not admissible as evidence.(2) The motion shall be in writing and shall allege the grounds upon which it is claimed that the confession or admission is not admissible as evidence.(3) If the motion alleges grounds which, if proved, would show the confession or admission not to be admissible the court shall conduct a hearing into the merits of the motion.(4) The burden of proving that a confession or admission is admissible shall be on the prosecution.(5) The issue of the admissibility of the confession or admission shall not be submitted to the jury. The circumstances surrounding the making of the confession or admission may be submitted to the jury as bearing upon the credibility or the weight to be given to the confession or admission.(6) The motion shall be made before preliminary examination or trial, unless opportunity therefor did not exist or the defendant was not aware of the ground for the motion, but the court in its discretion may entertain the motion at the preliminary examination or the trial.