(a) by order of the family court pursuant to section 353.5 of the family court act; or
(b) after a hearing pursuant to regulations of the division, with the written approval of the director of the division or his or her designee. 4. The division shall promulgate regulations governing secure facilities of the division, including but not limited to:
(a) limitations as to capacity;
(b) services to be provided and conditions to be maintained;
(c) a grievance procedure for residents to be run by the division, with the use of personnel separate from that of the facility;
(d) procedures for admission to and release or transfer from the facility;
(e) periodic inspection by the division, not to be conducted by personnel of the facility. 5. A juvenile delinquent residing in a facility operated pursuant to this title may be maintained in group confinement if he constitutes a serious and evident danger to himself or other persons, if such confinement is clearly necessary to prevent escape, if the child demonstrates by his behavior that he is in need of special care and attention in a living unit separate from his normal surroundings, or if such confinement is necessary for purposes of the child's own protection. The division shall promulgate regulations providing for a procedure governing transfers to group confinement and periodic review of such confinement.