A written statement of an accused may be used in evidence against him if it appears that the same was freely and voluntarily made without compulsion or persuasion.

A written statement of an accused means a statement signed by the accused or a statement made by the accused in his own handwriting.

No written statement made by an accused juvenile as the result of interrogation in a detention facility or other place of confinement or in the custody of an officer is admissible as evidence against him in any criminal proceeding unless:

(a) the statement is made in writing and the statement shows that the accused, prior to making the statement, received from a magistrate a warning that:

(1) he has the right to remain silent and not make any statement at all and that any statement he makes may be used in evidence against him;

(2) he has the right to have an attorney present to advise him prior to or during any questioning;

(3) if he is unable to employ an attorney, he has the right to have an attorney appointed to counsel with him prior to or during any interviews with peace officers or attorneys representing the state; and

(4) he has the right to terminate the interview at any time;

(b) the statement is signed in the presence of a magistrate by the juvenile with no law enforcement officer or prosecuting attorney present, except that a magistrate may require that a bailiff (or a law enforcement officer if a bailiff is not available) be present if the magistrate determines that the presence of the bailiff or law enforcement officer is necessary for the personal safety of the magistrate or other court personnel, provided that the bailiff or law enforcement officer may not carry a weapon in the presence of the child;

(c) the magistrate is fully convinced that the juvenile understands the nature and contents of the statement and that the juvenile is signing the same voluntarily, and the magistrate must sign a written statement verifying the foregoing requisites have been met, and

(d) the juvenile must knowingly, intelligently and voluntarily waive these rights prior to and during the making of the statement and sign the statement in the presence of the magistrate who must certify that he examined the juvenile independently of any law enforcement officer or prosecuting attorney and determined that the juvenile understands the nature and contents of the statement and has knowingly, intelligently and voluntarily waived these rights.

So in this case, if you find from the evidence, or if you have a reasonable doubt thereof, that prior to the time the defendant gave the alleged statement to (NAME) if he did give it, the foregoing provisions were not complied with, then you will wholly disregard the alleged statement and not consider it for any purpose; if, however, you find beyond a reasonable doubt that the defendant was warned in the respects outlined above prior to his having made such statement, if he did make it, still, before you may consider such statement as evidence in this case, you must find from the evidence beyond a reasonable doubt that prior to and during such statement, if any, the defendant knowingly, intelligently and voluntarily waived the rights hereinabove set out in the said warning, and unless you so find, or if you have a reasonable doubt thereof, you will not consider the statement for any purpose.