
19 Cal.App.4th 1686 (1993)
24 Cal. Rptr.2d 126
In re SHAWNA M., a Person Coming Under the Juvenile Court Law.
SAN BENITO COUNTY HUMAN SERVICES AGENCY, Plaintiff and Respondent,
v.
PATRICIA B., Defendant and Appellant.
Docket No. H009907.
Court of Appeals of California, Sixth District.
October 25, 1993.
*1687 COUNSEL
Mary Willans-Izett, under appointment by the Court of Appeal, for Defendant and Appellant.
Steven R. Sanders, County Counsel, and Karen R. Forcum, Deputy County Counsel, for Plaintiff and Respondent.
*1688 OPINION
ELIA, J.
Patricia B. appeals from a dispositional order on a second supplemental petition under Welfare and Institutions Code[1] section 342. At this hearing, the juvenile court ordered that appellant's daughter, Shawna M., remain a dependent of the juvenile court under section 300, subdivisions (b), (c) and (d); ordered her retained in out-of-home custody, and ordered that supervised visitation be permitted "with visitation to be arranged through, and approved by, the San Benito County Human Services Agency." Appellant challenges the latter part of this order, arguing that it was an improper delegation of judicial authority. We agree, and will reverse that part of the juvenile court's order.

FACTUAL AND PROCEDURAL BACKGROUND
Shawna, then eight years old, was first taken into protective custody on April 4, 1991 when her father, Jess M., who is not a party to this appeal, was arrested for driving under the influence. Shawna was with her father in the car. A petition was filed alleging that Shawna came within the provisions of section 300, subdivision (b). Appellant's whereabouts were unknown at this time. The allegations of this petition were sustained after a contested jurisdictional hearing on April 22, and Shawna was adjudicated dependent at a dispositional hearing on May 6. In the interim, Shawna was placed in the children's shelter.
On May 31, Jess M. kidnapped Shawna from her school. They were found a week later at a carnival in Hayward, and Shawna was returned to the children's shelter.
On September 30, 1991, a subsequent petition was filed under section 342 alleging that Shawna had been sexually molested by Jess M. and thus came within the provisions of section 300, subdivision (d).
A six-month review hearing was held on December 2, 1991. At this hearing, Shawna was ordered to remain a dependent of the juvenile court and a further psychological evaluation of her was ordered. This evaluation concluded that Shawna was suffering from posttraumatic stress syndrome.
Jess M. admitted the allegations of the subsequent petition at a jurisdictional hearing on February 21, 1992. Appellant first appeared at the dispositional hearing on this petition on March 6, 1992. Counsel was appointed *1689 for appellant and the matter was continued. On April 1, 1992, a second subsequent petition was filed alleging that Shawna came under the provisions of section 300, subdivisions (b), (c) and (d). A jurisdictional hearing on this petition was held on May 11, and disposition was continued to May 28. After this hearing, the juvenile court adjudicated Shawna dependent under section 300, subdivisions (b), (c) and (d), denied appellant's motions to terminate jurisdiction and to transfer the case to Butte County, her county of residence, and ordered supervised visitation between appellant and Shawna in the terms recited above. Appellant filed a timely notice of appeal from this order on June 5, 1992.

DISCUSSION
(1a) Appellant's sole argument on appeal is that the juvenile court improperly delegated the power to determine visitation to respondent San Benito County Human Services Agency.
At the dispositional hearing on the second subsequent petition, the juvenile court asked the social worker how much time appellant was going to spend with Shawna. In response, the social worker told the court that Dr. Jennett, the psychiatrist treating Shawna, wanted to "work with the mother in conjunction with the child as often as possible, and she will gauge Shawna's emotional condition and reaction to the visits so she'll know better how often to plan it based on how Shawna reacts."
The court then questioned whether the court should not "put this on hold for six months" while the psychiatrist evaluated the situation with appellant.
Shawna's attorney then suggested that "perhaps it might be to the benefit of everybody if we had some more specific order on visitation." She noted that the agency had recommended that the social worker would "arrange and approve all visitation" and questioned how frequent that visitation would be.
The social worker then responded that "It will have to be coordinated with the therapist. And I feel that we need to have that liberty to adjust it with her, because Shawna's condition can  she can become overwhelmed, and we may have to reduce the number of visits until she can manage better."
Mother's attorney then objected that her client had a right to see her daughter as often as possible. The court responded "Isn't this a matter of good faith, really, on the part of the social worker, that she really does a good-faith job with the psychiatrist and tries to get the visitation and the conferences and so forth and does it in a good-faith way to build it up gradually rather than stonewalling it or goofing off?"
*1690 Respondent's counsel noted that everything had been worked out cooperatively in terms of previous visitation but "should something happen with Shawna's progress that would require easing up visitation, that would be something that would be within the discretion of the Department."
Appellant's counsel then objected that the case law did not allow a court to "rubber stamp" a social service agency's visitation arrangements, and that appellant needed to know when she could visit with Shawna.
The court suggested that the psychiatrist was in the best position to determine what should be done in Shawna's best interests, and proceeded to adopt respondent's recommendation regarding visitation.
We agree with appellant that the court's order regarding visitation was an improper delegation of judicial authority. (2) "There is no question but that the power to regulate visitation between minors determined to be dependent children [citation] and their parents rests in the judiciary. The judicial power in this state is vested in the courts. [Citation.] `"The judicial function is to `declare the law and define the rights of the parties under it.' ... and `to make binding orders or judgments.'"'" (In re Jennifer G. (1990) 221 Cal. App.3d 752, 756 [270 Cal. Rptr. 326].) Thus, Jennifer G. held, it is the court which must define the rights of the parties to visitation. In balancing the interests of the parent and child, "the court in the exercise of its judicial discretion should determine whether there should be any right to visitation and, if so, the frequency and length of visitation. The court may, of course, impose any other conditions or requirements to further define the right to visitation in light of the particular circumstances of the case before it." (Id. at p. 757; In re Elizabeth M. (1991) 232 Cal. App.3d 553, 570 [283 Cal. Rptr. 483].) The court can properly delegate to a social services agency "the ministerial tasks of overseeing the right as defined by the court.... Such matters as the time, place, and manner of visitation do not affect the defined right of a parent to see his or her child and thus do not infringe upon the judicial function." (In re Jennifer G., supra, 221 Cal. App.3d at p. 757.)
(1b) It is apparent from this record that in adopting the recommended visitation order, the juvenile court was appropriately attempting to balance appellant's interest in visiting Shawna with Shawna's best interests; that visitation not proceed at the expense of Shawna's emotional well-being. The court's order, although it does not authorize respondent to determine whether appellant had the right to visitation, gives respondent no guidance as to when, how often, and under what circumstances visitation is to occur. It did not specify, as it could have, that the frequency of visitation should be determined in consultation with Dr. Jennett, for instance. No matter what the *1691 court's intention, it is the written order that controls. (In re Jennifer G., supra, 221 Cal. App.3d at pp. 757-758, fn. 3.) Had such a specific condition been part of this order, it might have been valid. As it stands, however, it grants too much discretion to respondent, and is therefore an invalid order. (In re Danielle W. (1989) 207 Cal. App.3d 1227, 1237 [255 Cal. Rptr. 344].)
Respondent argues that any error in the court's visitation order is harmless because it was not reasonably probable the juvenile court would have ordered more extensive visitation. As appellant points out, however, she is not arguing the visitation she was allowed was inadequate, but that the juvenile court's order failed to specify whether, and under what circumstances visitation would be allowed. We have already concluded this lack of specificity invalidates the order.
We recognize, however, that more than a year has transpired since this visitation order was made and that circumstances may have changed in the interim. On remand, the juvenile court should consider appellant's, and Shawna's, current circumstances in crafting any new visitation order.

DISPOSITION
That part of the juvenile court's order regarding visitation is reversed. The cause is remanded for further proceedings consistent with this opinion.
Premo, Acting P.J., and Mihara, J., concurred.
NOTES
[1]  All further section references are to the Welfare and Institutions Code unless otherwise indicated.
