(2) whether the respondent is in custody;

(3) the manner in which the respondent was advised of the respondent’s rights;

E. In determining whether the child knowingly, intelligently and voluntarily waived the child’s rights, the court shall consider the following factors:

(1) the age and education of the respondent;

A. A child subject to the provisions of the Delinquency Act is entitled to the same basic rights as an adult, except as otherwise provided in the Children’s Code, including rights provided by the Delinquency Act, except as otherwise provided in the Children’s Code [32A-1-1 NMSA 1978].

B. If after due notice to the parent, guardian or custodian and after a hearing determining indigency, the parent, guardian or custodian is declared indigent by the court, the public defender shall represent the child. If the court finds that the parent, guardian or custodian is financially able to pay for an attorney but is unwilling to do so, the court shall order the parent, guardian or custodian to reimburse the state for public defender representation.

C. No person subject to the provisions of the Delinquency Act who is alleged or suspected of being a delinquent child shall be interrogated or questioned without first advising the child of the child’s constitutional rights and securing a knowing, intelligent and voluntary waiver.

D. Before any statement or confession may be introduced at a trial or hearing when a child is alleged to be a delinquent child, the state shall prove that the statement or confession offered in evidence was elicited only after a knowing, intelligent and voluntary waiver of the child’s constitutional rights was obtained.

(4) the length of questioning and circumstances under which the respondent was questioned;

(5) the condition of the quarters where the respondent was being kept at the time of being questioned;

(6) the time of day and the treatment of the respondent at the time of being questioned;

(7) the mental and physical condition of the respondent at the time of being questioned; and

(8) whether the respondent had the counsel of an attorney, friends or relatives at the time of being questioned.

F. Notwithstanding any other provision to the contrary, no confessions, statements or admissions may be introduced against a child under the age of thirteen years on the allegations of the petition. There is a rebuttable presumption that any confessions, statements or admissions made by a child thirteen or fourteen years old to a person in a position of authority are inadmissible.

G. An extrajudicial admission or confession made by the child out of court is insufficient to support a finding that the child committed the delinquent acts alleged in the petition unless it is corroborated by other evidence.

H. The child and the parent, guardian or custodian of the child shall be advised by the court or its representative that the child shall be represented by counsel at all stages of the proceedings on a delinquency petition, including all post-dispositional court proceedings. If counsel is not retained for the child or if it does not appear that counsel will be retained, counsel shall be appointed for the child.

I. A child under the age of thirteen alleged or adjudicated to be a delinquent child shall not be fingerprinted or photographed for identification purposes without obtaining a court order.

J. The court, at any stage of the proceeding on a petition under the Children’s Code, may appoint a guardian ad litem for a child who is a party if the child has no parent, guardian or custodian appearing on behalf of the child or if the parent’s, guardian’s or custodian’s interests conflict with those of the child. A party to the proceeding or an employee or representative of a party shall not be appointed as guardian ad litem.

K. The court shall appoint a guardian for a child if the court determines that the child does not have a parent or a legally appointed guardian in a position to exercise effective guardianship. No officer or employee of an agency that is vested with the legal custody of the child shall be appointed guardian of the child except when parental rights have been terminated and the agency is authorized to place the child for adoption.

L. A person afforded rights under the Delinquency Act shall be advised of those rights at that person’s first appearance before the court on a petition under that act.

M. A serious youthful offender who is detained prior to trial in an adult facility has a right to bail as provided under SCRA 1986, Rule 5-401. A child held in a juvenile facility designated as a place of detention prior to adjudication does not have a right to bail but may be released pursuant to the provisions of the Delinquency Act.

N. The provisions of the Delinquency Act shall not be interpreted to limit the right of a child to petition a court for a writ of habeas corpus.