In every city of the first and second class there shall be provided, in the way hereinafter mentioned, a house or houses of detention, for the reception of untried juvenile offenders and neglected and dependent children under the age of sixteen years, who may be in the custody of an officer appointed or elected under any law of this commonwealth, and whose cases may be under judicial investigation under any laws of this commonwealth, pending such investigation and final determination of such case or cases.
11 P.S. § 421