
535 P.2d 1117 (1975)
C. C. C., Individually and on behalf of all other Juveniles similarly situated, Petitioners,
v.
The DISTRICT COURT FOR the FOURTH JUDICIAL DISTRICT, State of Colorado and the Honorable Donald E. Campbell, as Judge of the Juvenile Division of the District Court, Respondents.
No. 26699.
Supreme Court of Colorado, En Banc.
May 27, 1975.
*1118 Marie S. McCauley, Colorado Springs, for petitioners.
Robert F. Russel, Dist. Atty., J. Tyler Makepeace, Deputy Dist. Atty., Colorado Springs, for respondents.
DAY, Justice.
This is an action to review a general order issued by the juvenile court judge of the El Paso district court. Petitioner brings this action on behalf of himself and all other juveniles similarly situated, and we find him qualified to do so under C.R.C.P. 23(a) and (b)(2).
Petitioner seeks a writ in the nature of prohibition, alleging that the lower court has acted in excess of its jurisdiction. He also seeks a writ in the nature of mandamus restraining those actions. We issued a rule to the respondent court to show cause why relief should not be granted. We now discharge the rule.
In October 1974 the juvenile court judge sent a directive to the warden of the county jail, the director of the juvenile Zebulon Pike detention center (Zeb Pike), referees, and a deputy district attorney. In pertinent part the directive states:
"Because of the number of juveniles being held in the El Paso County Jail, it is necessary to publish standards for such placement to conform with the law, C.R.S.1963 (as amended) 22-3-6(a) and 22-3-6(c), and to fulfill the requirements of the juvenile judge.
"Therefore, after October 1, 1974, the following procedures will be followed before any placement of a juvenile in the El Paso County Jail:
. . . . . .
"B. No child may be detained at the jail at the request of a policeman, deputy sheriff, state patrolman or other peace officer or the district attorney, unless:
. . . . . .
"2. The child has been taken to Zebulon Pike Detention Center and the staff has requested in writing, delivered to the warden, that the child be detained at the jail instead of the detention center and stating the reasons therefore.
"C. The warden of the El Paso County Jail shall receive juveniles over the age of 14 on request of the Zebulon Pike Detention Center pursuant to the following procedure:
"1. The request for confinement at the jail shall be in writing, in duplicate, and shall state the reason for requesting detention at the jail.
"2. The warden shall retain the copy and deliver the original of the request for confinement to the Juvenile Judge at the next Court day after receipt.
. . . . . .
"E. The warden of the El Paso County Jail shall inform the Juvenile Judge and the Juvenile Probation in writing of any juveniles detained in the jail on Monday of each week, and shall notify the Juvenile Judge and the Juvenile Probation Department immediately or on the first Court day following the receipt of any juvenile, regardless of the reason or by whose order the child was placed in the jail . . .."
Pursuant to the directive, petitioner was transferred from the Zeb Pike juvenile detention facility to the county jail. Three days later, on order of the court, he was re-transferred back to Zeb Pike. He and *1119 other residents of Zeb Pike remain subject to transfer under the directive.
Petitioner filed a motion for review of the directive with the respondent judge, which was denied. He thereafter sought relief in this court, contending that the directive is in derogation of the Children's Code (Code), section 19-2-103(6)(a),[1] C.R.S.1973 which states:
"No child under the age of fourteen and, except upon order of the court, no child fourteen years of age or older and under sixteen years of age shall be detained in a jail, lockup, or other place used for the confinement of adult offenders or persons charged with crime. The exception shall be used by the court only if no other suitable place of confinement is available."
Petitioner feels the directive is not a viable court order. Moreover, he alleges it is an unconstitutional delegation of the lower court's statutory powers to another branch of the government in violation of Colo.Const., Art. Ill, and the explicit legislative intent of this section of the Code. Finally, he insists that the directive as applied violates statutory rights under the Code, and the constitutional rights of due process and equal protection guaranteed by both the U.S.Const., amend. XIV and the Colo.Const., Art. II, section 25. We discuss each issue in turn.

I.
The Code does not define "order." See section 19-1-103, C.R.S.1973. However, court order has been broadly defined in case law as any direction of a court not contained or included in a judgment. State ex rel. Chinchilla Ranch v. O'Connell, 261 Wis. 86, 51 N.W.2d 714 (1952); Foreman v. Riley, 88 Okl. 75, 211 P. 495 (1923); Tyvand v. McDonnell, 37 N.D. 251, 164 N.W. 1 (1917). In this instance we accept the established concept, and find that the October 1974 directive is an "order" satisfying the statutory requirement.

II.
The Code gives only a court the power to detain 14 and 15-year old children in an adult detention facility. The court cannot delegate its judicial power to the executive branch. See Denver v. Lynch, 92 Colo. 102, 18 P.2d 907 (1932); People v. Swena, 88 Colo. 337, 296 P. 271 (1931).
However, the separation of powers delineation should be made on a case-by-case basis. MacManus v. Love, 179 Colo. 218, 499 P.2d 609 (1972).
The legislature envisioned a sharing of authority over juveniles under the Code. The interworking of the courts and various executive agencies including the Department of Institutions, is provided for throughout the Code.
In balancing respective powers, the Code contemplates that the courts will provide protection from the possible infringement upon the constitutional rights of juveniles by acts of executive agencies. See People v. Knapp, 180 Colo. 280, 505 P.2d 7 (1973); People v. Reyes, 174 Colo. 377, 483 P.2d 1342 (1971). The order in question provides such protection through a judicial review of the transfer on the following day.
The juvenile court issued the order, and the staff of Zeb Pike and the warden of the El Paso county jail follow its direction under judicial supervision. We cannot say under the circumstances as shown in the answer to show cause that there has been an unconstitutional delegation of power. Nor has legislative intent been thwarted.

III.
Children are entitled to certain constitutional protections under the Code. In Re Gault, 387 U.S. 1, 87 S.Ct. 1428, 18 L.Ed.2d 527 (1967); see generally knapp and Reyes, supra. The statute was designed to benefit youthful offenders, and should not be construed to diminish their *1120 rights. Denver v. Juvenile Court, 182 Colo. 157, 511 P.2d 898 (1973). However, it is for the benefit and best interests of all Colorado's children, so a balancing effect must take place.
The overcrowded nature of the Zeb Pike detention center is a continuing fact in El Paso County. When the facility becomes full and unmanageable, those in charge want to transfer potentially violent juveniles to another place.
Balancing the interests of all the children concerned against the blanket order, we hold this particular directive viable. It does not violate equal protection of the laws for there is a rational reason for its existence. Faced with the overworked, overcrowded and understaffed Zeb Pike facility, the judge has seen numerous juveniles placed at the county jail as the only other suitable place available for confinement. This is not the goal of the Code, but it is nevertheless a fact of life, and the judge so found. To satisfy the requirements of due process and fundamental fairness, he has sought to issue standards for procedural regularity for these transfers. With the careful and selective use of this transfer authority by the Zeb Pike officials and the warden of the county jail, those transferred shall feel no injustice while those left behind at Zeb Pike will have elbow room and the type of care the detention center was meant to provide.
We call attention to section 19-2-103(6)(b) which mandates that the juveniles transferred will not be co-mingled with adult offenders at the county jail. Furthermore, under the order the child once transferred must receive the speedy review anticipated by section 19-2-103(2).
The statute gives no indication that a separate court order would be required under the circumstances facing this judge each time it is necessary to transfer a juvenile to the county jail.
The rule is discharged.
KELLEY and ERICKSON, JJ., do not participate.
NOTES
[1]  Formerly 1971 Perm.Supp., C.R.S.1963, 22-2-3(6)(a).
