Except as hereinafter provided, the Public Defender shall in the manner prescribed by P.L. 1967, c. 43 (C. 2A:158A-1 et seq.) provide for the legal representation of any person who is charged as a juvenile delinquent or as a juvenile in need of supervision and where in the opinion of the juvenile judge the prosecution of the complaint may result in the institutional commitment of such person.
N.J.S. § 2A:158A-24