
360 S.E.2d 554 (1987)
STATE ex rel. M.L.N., G.F. & M.L.W.
v.
Stephen F. GREINER, Sheriff, etc., et al.
No. 17536.
Supreme Court of Appeals of West Virginia.
June 4, 1987.
Jeffrey B. Reed, Lantz, Rudolph & Palmer, Annette L. Fantasia, Parkersburg, for appellants.
*555 Harry Deitzler, Pros. Atty., Parkersburg, Mary Beth Kershner, Asst. Atty. Gen., Facility Review Panel, Mary Downey, for appellees.
McGRAW, Chief Justice:
The relators in this original jurisdiction action are three eighteen year old male persons who remain under continuing juvenile court jurisdiction pursuant to West Virginia Code § 49-5-2 (1986 Replacement Vol.).[1] They allege that their confinement in the "juvenile detention portion" of the Wood County Correctional Center violates certain minimal standards of confinement mandated by the Legislature and that the overall conditions of their confinement are unconstitutionally deficient. Based on these allegations, the relators have asked this Court to compel their permanent release from the Wood County Correctional Center and to compel their transfer to the West Central Regional Juvenile Detention Center.
Because the Wood County Correctional Center does not have an adequate separate section designed exclusively for detaining juveniles who are under continuing juvenile court jurisdiction, we find that confinement of such juveniles in the Correctional Center is illegal. Accordingly, we hereby issue a writ of mandamus ordering that neither the relators nor any other juveniles be confined in the Wood County Correctional Center until a separate juvenile detention section which meets the minimum statutory, regulatory and constitutional standards is completed. Because the relators are over the age of eighteen, we do not order that they be placed in the West Central Regional Juvenile Detention Center; however, the committing judge may order that they be confined in a suitable juvenile section of another county jail, or he may commit them to the custody of the commissioner of the Department of Corrections as youthful offenders.

I.
This action was originated on February 6, 1987, by the filing of a petition for a writ of mandamus by M.L.N. and G.F.'s motion to intervene as a party. M.L.N. and G.F. were then being temporarily confined in the juvenile detention portion of the Wood County Correctional Center while awaiting probation modification hearings before Judge Arthur N. Gustke of the Circuit Court of Wood County. This portion of the jail is a single room, originally used as a counselling room, measuring 13'2" by 7'6". The room lacks running water and toilet facilities.
Both M.L.N. and G.F. have histories as troubled, delinquent juveniles. Numerous placement alternatives have been tried since their respective delinquency adjudications for acts which if committed by adults would have been crimes, but none have proven successful. Most recently, M.L.N. and G.F., although not travelling together, absconded to Florida in violation of probation orders. While in Florida, both were taken into custody and charged with the commission of other crimes. The Florida authorities subsequently transferred M.L.N. and G.F. back to West Virginia under the Interstate Compact On Juveniles. W.Va.Code §§ 49-8-1 to -7 (1986 Replacement Vol.). Because of these and previous probation violations, the juvenile court concluded that more restrictive alternatives should be considered with respect to both *556 youths.[2] Pending hearings on motions to modify the court's prior dispositional orders, the juvenile judge ordered that M.L.N. and G.F. be temporarily detained in the juvenile detention portion of the Wood County Correctional Center.[3]
Upon the filing of M.L.N.'s petition we issued a rule to show cause against the respondents, the sheriff of Wood County, the county commissioners of Wood County and the West Virginia Department of Human Services, and we granted the motion to intervene by G.F. Simultaneously with the issuance of our rule, M.L.N. and G.F. were released on their own recognizance pending our disposition of this case.
Oral arguments were presented on March 3, 1987. On March 11, 1987, we granted the motion of M.L.W. to also intervene as a party to this proceeding. M.L.W. had originally been adjudicated delinquent and placed on probation at the age of seventeen. He, too, violated the terms of his probation and was placed in the West Central Regional Juvenile Detention Center, where he remained until his eighteenth birthday. On October 23, 1986, Judge Gustke entered the order sentencing M.L.W. to not more than six months in the Correctional Center. During a portion of that time, M.L.W. was housed in the juvenile detention room. Even though his release date, April 15, 1987, has passed, the issues arising from his intervention are capable of repetition and are not, therefore, rendered moot.[4]

II.
As noted in the amicus curiae brief filed by counsel for the Facility Review Panel of the Juvenile Justice Committee,[5] the threshold issue which we must address is whether delinquent eighteen year old youths who are under continuing juvenile court jurisdiction should be treated as juveniles or adults. The relators contend that, since by definition West Virginia Code § 49-5-2 includes "a person subject to the juvenile jurisdiction of the court," they must be treated as juveniles when jailed and must be housed, pursuant to West Virginia Code § 49-5-16(a) (1986 Replacement Vol.), out of the sight and sound of adult prisoners.[6] The respondents, on the *557 other hand, submit that it is permissible, under West Virginia Code § 49-5-2, to commit delinquent eighteen year old youths to adult jails for a period not to exceed six months and that, therefore, no adverse legal consequences should arise when such persons are jailed within the sight and sound of adult inmates.
After careful review of the applicable statutes, we conclude that the relators, who remain under continuing juvenile court jurisdiction, do come within the definition set forth in West Virginia Code § 49-5-2 and must be afforded the same commitment and rehabilitation rights as delinquent juveniles under the age of eighteen who are under juvenile court jurisdiction. Furthermore, we find that the relators were unlawfully detained in the Wood County Correctional Center in violation of West Virginia Code §§ 49-5-16(a), 49-5A-2 (1986 Replacement Vol.)[7] and other relevant statutory provisions. We agree with the relators and the Facility Review Panel that the Wood County jail lacks adequate facilities for the incarceration of such juveniles.
In reaching this conclusion, we have applied general principles of statutory construction to reconcile the various statutes dealing with the disposition and detention of juveniles, including West Virginia Code §§ 49-5-2, 49-5-16(a), 49-5A-2 and 49-5-13 (1986 Replacement Vol.). Judicial interpretation is warranted in this case because of the ambiguous and possibly conflicting nature of the statutes involved. Syl. Pt. 1, Ohio County Commission v. Manchin, ___ W.Va. ___, 301 S.E.2d 183 (1983).
Under West Virginia Code § 49-5-2, a person over the age of eighteen and subject to the circuit court's juvenile jurisdiction may be sentenced to "not more than six months in jail." This section provides no guidelines on where in the jail or with whom such children may be confined. The Department of Human Services relies principally on this section to support its argument that eighteen year olds who are within continuing juvenile court jurisdiction may be incarcerated in a county jail with adults.
Under West Virginia Code § 49-5-16(a), however, there is a restriction on where in the county jail and with whom such juveniles may be confined. As we have previously recognized:
[A] child over fourteen years of age who is charged with a crime which would be a violent felony if committed by an adult, may, upon an order of the circuit court, be housed in a juvenile detention portion of a county facility, but not within sight [or sound] of adult prisoners.
Syl. Pt. 2, State ex rel. R.C.F. v. Wilt, 162 W.Va. 424, 252 S.E.2d 168 (1979) (second brackets in original). Additionally, under the relevant portions of West Virginia Code §§ 49-5-8(d) (1986 Replacement Vol.), 49-5-13(b) (1986 Replacement Vol.), 49-5-14(b) (1986 Replacement Vol.) and 49-5A-2, the circuit court judge has a duty to seek the least restrictive disposition and avoid placing a juvenile in jail.
Finally, under West Virginia Code § 49-5-13(b), the section which sets forth dispositional alternatives available to the circuit court, the commitment of juveniles to jail is not among the alternatives listed. The most restrictive alternative found in that section is the commitment of juveniles found delinquent to an "industrial home or correctional institution for children." W.Va.Code § 49-5-13(b)(5). We note, however, that West Virginia Code § 49-5-13 must be read in pari materia with West *558 Virginia Code §§ 49-5-2 and 49-5-16(a), which provide additional, more restrictive alternatives to a juvenile court.
Thus, the conflict central to our analysis is presented: (1) whether the Legislature intended to confer authority upon circuit courts under West Virginia Code § 49-5-2 to incarcerate those persons who are under continuing juvenile jurisdiction and who are between the ages of eighteen and twenty years to county jails with adult prisoners; or, (2) whether the Legislature intended a prohibition under West Virginia Code §§ 49-5A-2 and 49-5-16(a) against the incarceration of such persons within the sight and sound of adult prisoners in county jails.

III.
The statutes which we are called upon to construe deal with the same subject matter, juvenile justice, and must be read and applied in pari materia in order to give effect to the Legislative intent gathered from the whole of the enactments. See State ex rel. R.C.F., 162 W.Va. 424, 427, 252 S.E.2d 168, 170; Syl.Pt. 1, Syl.Pt. 2, and Syl.Pt. 3, Smith v. State Workmen's Compensation Commissioner, 159 W.Va. 108, 219 S.E.2d 361 (1975); Spencer v. Yerace, 155 W.Va. 54, 60, 180 S.E.2d 868, 872 (1971); Syl. Pt. 3, State v. Sims, 144 W.Va. 72, 105 S.E.2d 886 (1958); Syl.Pt. 8, Syl.Pt. 9, and Syl.Pt. 13, Vest v. Cobb, 138 W.Va. 660, 76 S.E.2d 885 (1953); Pond Creek Pocahontas Co. v. Alexander, 137 W.Va. 864, 74 S.E.2d 590 (1953), appeal dismissed, 346 U.S. 803, 74 S.Ct. 36, 98 L.Ed.2d 334 (1953).
"It is a cardinal rule of construction governing the interpretation of statutes that the purpose for which a statute has been enacted may be resorted to by the courts in ascertaining the legislative intent." Syl. Pt. 4, State ex rel. Bibb v. Chambers, 138 W.Va. 701, 77 S.E.2d 297 (1953); see also State ex rel. Simpkins v. Harvey, ___ W.Va. ___, 305 S.E.2d 268 (1983); Syl. Pt. 2, Smith, 159 W.Va. 108, 219 S.E.2d 361. The purpose of our juvenile justice system is to provide for the rehabilitation of delinquent children. State ex rel. R.S. v. Trent, 169 W.Va. 493, 508, 289 S.E.2d 166, 175 (1982); State ex rel. D.D.H. v. Dostert, 165 W.Va. 448, 269 S.E.2d 401 (1980); State ex rel. Harris v. Calendine, 160 W.Va. 172, 233 S.E.2d 318 (1977); see W.Va.Code § 49-1-1(a) (1986 Replacement Vol.).
As we recognized in State ex rel. R.S. v. Trent, the State's interest in taking custody of delinquents is rehabilitation. Due process therefore requires that the nature of the custody bear a relation to that rehabilitative purpose. Id. 169 W.Va. at 508, 289 S.E.2d at 175 (citing Jackson v. Indiana, 406 U.S. 715, 92 S.Ct. 1845, 32 L.Ed.2d 435 (1972)). This due process consideration weighs heavily in our resolution of the current statutory conflict.
In the case of State ex rel. R.C.F., 162 W.Va. 424, 252 S.E.2d 168, we were asked to determine whether one under the age of eighteen who was being proceeded against as a juvenile delinquent for the commission of a criminal offense could be incarcerated in a county jail, prior to an adjudication of delinquency. We answered in the negative and ordered that the juvenile be discharged from further confinement in the jail, which, like the jail in this case, had no acceptable separate section designed for detaining juveniles exclusively. In so ordering, we recognized the unsatisfactory consequences of confining juveniles in a jail with adult prisoners:
The Legislature has recognized in its wisdom that the incarceration of juveniles in a jail with adult offenders violates the fundamental rehabilitative purpose of a juvenile system. The loss of liberty and the exposure of juveniles to adult offenders even for a short time can do but ill for the child. The theory held by some well-meaning but untrained and misguided souls that the "shock effect" of temporary incarceration can be beneficial to juveniles is hereby disapproved. The confinement of juveniles in jails is a precursor to suicide, to sexual and physical abuse and to psychological harm; the confinement of juveniles with adults in poorly constructed, ill-equipped and *559 sometimes mismanaged jails may well contribute to crime rather than reduce it.
Id. at 429, 252 S.E.2d at 171.
Unquestionably, the same unsatisfactory consequences apply to youths who remain under juvenile court jurisdiction, if those youths are jailed within the sight and sound of adult prisoners.[8] Thus, we must conclude that the Legislature intended a prohibition under West Virginia Code §§ 49-5-16(a) and 49-5A-2, read in pari materia, against jailing youths between the ages of eighteen and twenty years, who remain under juvenile jurisdiction, within the sight or sound of adult prisoners.[9] We, therefore, hold that such persons may be incarcerated in county jails only if they are housed in a separate section designed for housing juveniles exclusively, which is not within the sight or sound of adult prisoners. To hold otherwise would promote situations where the manner of custody, incarceration with adult prisoners, would not bear a relation to the rehabilitative purpose of our juvenile justice system.[10]
Based on the foregoing, the writ prayed for by the relators is granted insofar as we order that neither the relators nor any other persons under juvenile jurisdiction be confined in the Wood County Correctional Center until a separate juvenile detention section is completed which meets the minimum statutory, regulatory and constitutional standards discussed by us in State ex rel. J.D.W. v. Harris, ___ W.Va. ___, ___, 319 S.E.2d 815, 820-23 (1984). See also Facility Review Panel v. Holden, ___ W.Va. ___, 356 S.E.2d 457 (1987); Crain v. Bordenkircher, ___ W.Va. ___, 342 S.E.2d 422 (1986); Hickson v. Kellison, ___ W.Va. ___, 296 S.E.2d 855 (1982). As soon as possible after the filing of this opinion, the circuit court should hold modification hearings with regard to M.L.N. and G.F.[11] If the circuit court judge finds that it is necessary to incarcerate either M.L.N. or M.F.,[12] he may order that they *560 be confined in a suitable juvenile section of another county jail,[13] or he may commit them to the custody of the commissioner of the West Virginia Department of Corrections as youthful offenders.[14] Under no circumstances may the relators be confined in the West Central Regional Juvenile Detention Center.[15]
Writ granted as moulded.
NOTES
[1]  West Virginia Code § 49-5-2 (1986 Replacement Vol.) provides in pertinent part, as follows:

As used in this article, a "child" shall include a person under the age of eighteen years or a person subject to the juvenile jurisdiction of the court pursuant to this section. If a child sixteen years of age or older commits an act which if committed by an adult would be a crime and for such act is adjudged delinquent, the jurisdiction of the court shall continue until the child becomes twenty years of age with the same power over the child that the court had prior to the child's becoming an adult, and the further power to sentence such person to not more than six months in jail if the offender is over the age of eighteen years. This shall not preclude the exercise of criminal jurisdiction in case the offender, after becoming an adult, commits a violation of law.
[2]  If there is "an alleged violation of a court order, the court may modify the dispositional order to a more restrictive alternative if it finds clear and convincing proof of substantial violation." W.Va. Code § 49-5-14(a) (1986 Replacement Vol.).
[3]  The juvenile judge concluded that confinement was necessary given the likelihood that M.L.N. and G.F. would not appear at further proceedings if not detained. See West Virginia Code §§ 49-5-8 and 49-5A-2 (1986 Replacement Vol.) and Syl.Pt. 4 of State ex rel. M.C.H. v. Kinder, ___ W.Va. ___, 317 S.E.2d 150 (1984) for the relevant factors to be considered for detention of juveniles pending further court proceedings.
[4]  "A case is not rendered moot even though a party to the litigation has had a change in status such that he no longer has a legally cognizable interest in the litigation or the issues have lost their adversarial vitality, if such issues are capable of repetition and yet will evade review." Syl. Pt. 1, Kinder, ___ W.Va. ___, 317 S.E.2d 150.
[5]  This five-member review panel is appointed pursuant to West Virginia Code § 49-5-16b (1986 Replacement Vol.) for the purpose of inspecting all places in West Virginia wherein juveniles may be held involuntarily. In a report dated December 24, 1985, the review panel concluded that the Wood County jail lacked adequate facilities for the incarceration of juveniles who are under juvenile jurisdiction. The amicus curiae brief reiterates the concerns expressed in the December 1985 report.
[6]  West Virginia Code § 49-5-16(a) provides for the commitment of juveniles to jails, in pertinent part, as follows:

A child under eighteen years of age shall not be committed to a jail or police station, except that ... a child over fourteen years of age who is charged with a crime which would be a violent felony if committed by an adult, may, upon an order of the circuit court, be housed in a juvenile detention portion of a county facility, but not within sight of adult prisoners.
See Syl. Pt. 2, State ex rel. R.C.F. v. Wilt, 162 W.Va. 424, 252 S.E.2d 168 (1979). The relators assert that West Virginia Code § 49-5-16(a) applies. Based on this assertion and the lack of a challenge to the propriety of confining the relators under this Code section, we will assume for the purposes of this opinion that the relators have been charged with crimes which would have been violent felonies if committed by adults, even though the factual record before us is sparse.
[7]  West Virginia Code § 49-5A-2 (1986 Replacement Vol.) reads as follows:

A child who has been arrested or who under color of law is taken into the custody of any officer or employee of the State or any political subdivision thereof shall be forthwith afforded a hearing to ascertain if such child shall be further detained. In connection with any such hearing, the provisions of article five [§ 49-5-1 et seq.] of this chapter shall apply. It shall be the duty of the judge or referee to avoid incarceration of such child in any jail. Unless the circumstances of the case otherwise require, taking into account the welfare of the child as well as the interest of society, such child shall be released forthwith into the custody of his parent or parents, relative, custodian or other responsible adult or agency.
[8]  The record in this case reveals that one of the relators attempted to commit suicide while incarcerated in the small room designated as the "juvenile detention portion" of the Wood County Correctional Center.
[9]  This conclusion is bolstered by the statement of policy found in Article IX of the Interstate Compact On Juveniles, West Virginia Code § 49-8-2, which states the following policy concerning the detention of juveniles: "That, to every extent possible, it shall be the policy of states party to this compact that no juvenile or delinquent juvenile shall be placed or detained in any prison, jail or lockup nor be detained or transported in association with criminal, vicious or dissolute persons."
[10]  In reaching this holding, we have applied the following fundamental rules of statutory construction: (1) "Statutes which are in pari materia should be construed, if possible to do so, so that none should fail." Syl. Pt. 13, Vest v. Cobb, 138 W.Va. 660, 76 S.E.2d 885; see also Syl. Pt. 3, State v. Jackson, 120 W.Va. 521, 199 S.E. 876 (1938), and (2) "The general rule of statutory construction requires that a specific statute be given precedence over a general statute relating to the same subject matter where the two cannot be reconciled." Syl. Pt. 1, UMWA By Trumka v. Kingdon, ___ W.Va. ___, 325 S.E.2d 120 (1984). See also State ex rel. Simpkins v. Harvey, ___ W.Va. at ___, 305 S.E.2d at 273; Syl. Pt. 2, State ex rel. Myers v. Wood, 154 W.Va. 431, 175 S.E.2d 637 (1970); Elite Laundry Co. v. Dunn, 126 W.Va. 858, 30 S.E.2d 454, 459 (1944). Here, West Virginia Code § 49-5-2 specifically addresses continuing juvenile jurisdiction of the circuit court, but only generally mentions that persons under continuing juvenile court jurisdiction may be sentenced to jail if they are over the age of eighteen years. Consistent with the policy announced in West Virginia Code § 49-5A-2 against jailing juveniles, State ex rel. R.C.F., 162 W.Va. 424, 427, 252 S.E.2d 168, 170, West Virginia Code § 49-5-16(a) specifically establishes the rule that "a child over fourteen years of age who is charged with a crime which would be a violent felony if committed by an adult, may, upon an order of the circuit court, be housed in a juvenile detention portion of a county facility, but not within sight of adult prisoners." Our construction allows each of these sections of the Code to stand and is consistent with the rule favoring the more specific statute.
[11]  Because M.L.W.'s release date has passed, our discussion of dispositional alternatives applies only to M.L.N. and G.F.
[12]  Under West Virginia Code § 49-5-13(b) and 49-5-14(b), the juvenile court must "give precedence to the least restrictive" of the dispositional alternatives available "consistent with the best interest and welfare of the public and the child." Syl.Pt. 1, State ex rel. R.S. v. Trent, 169 W.Va. 493, 289 S.E.2d 166; Syl. Pt. 1, State v. McDonald, ___ W.Va. ___, 314 S.E.2d 854 (1984); Syl. Pt. 4, State ex rel. H.K. v. Taylor, 169 W.Va. 639, 289 S.E.2d 673 (1982); see also Syl.Pt. 2, State ex rel. C.A.H. v. Strickler, 162 W.Va. 535, 251 S.E.2d 222 (1979). Even if a substantial probation violation is found under West Virginia Code § 49-5-14, nothing requires that the juvenile's probation be revoked. McDonald, ___ W.Va. at ___, 314 S.E.2d at 858.
[13]  As we noted in the recent case of Facility Review Panel v. Holden, ___ W.Va. ___, 356 S.E.2d 457 (1987), the West Virginia Regional Jail and Prison Authority Act, West Virginia Code § 31-20-1 to -24 (Supp.1986), provides for the creation of multi-county jails. This type of facility provides an additional alternative to counties like Wood County who may lack funding to maintain separate juvenile detention portions.
[14]  West Virginia Code § 28-1-2(a) (1986 Replacement Vol.) provides, in pertinent part, that:

"[A]ny male youth who has been adjudged delinquent pursuant to subdivision one, section four [§ 49-1-4], article one, chapter forty-nine of this Code, who, as a result thereof, was placed on probation and has been found, in a proceeding pursuant to the procedural requirements of article five [§ 49-5-1 et seq.], chapter forty-nine of this Code, to have violated a term of probation, prior to the attainment of his twentieth birthday, which constitutes a criminal offense, may be committed to the custody of the commissioner of corrections as a youthful offender."
Under West Virginia Code § 28-1-2(e) (1986 Replacement Vol.), the commissioner of corrections is then given authority to place such youth in an appropriate facility.
[15]  Pursuant to West Virginia Code § 49-5A-6a (1986 Replacement Vol.), the Legislative Commission on Juvenile Law and the Department of Human Services has developed a plan for a unified state system of predispositional detention of juveniles. The plan mandates that "[p]ersons admitted to detention centers must be under the age of eighteen...." Because the relators are over the age of eighteen, we will not order that they be placed in the West Central Regional Juvenile Detention Center.
