
970 S.W.2d 777 (1998)
SOUTHWEST GUARANTY TRUST COMPANY, Successor to NationsBank of Texas, N.A., as Trustee for the Benefit of Dalia Acosta, Daphne Acosta, Jorge Acosta, Lillian Acosta, Michael Avery, William Avery, Joe Bonura, Timothy Bonura II, Rian Butler, et al., Appellant,
v.
PROVIDENCE TRUST COMPANY, in Liquidation, Appellee.
No. 03-97-00806-CV.
Court of Appeals of Texas, Austin.
July 2, 1998.
*778 J. Robin Lindley, Binion & Lindley, P.C., Houston, for Appellant.
H. Christopher Mott, Krafsur Gordon Mott Davis & Woody P.C., El Paso, for Appellee.
Before POWERS, KIDD and B.A. SMITH, JJ.
KIDD, Justice.
This appeal arises from a motion for summary judgment granted in favor of appellee Providence Trust Co. ("Providence"). In its sole point of error, appellant Southwest Guaranty Trust Co. ("Southwest") argues that the trial court erred in granting Providence's motion for summary judgment because Providence failed to establish any of its affirmative defenses as a matter of law. Moreover, Southwest contends that the trial court erred in granting summary judgment because the terms of the trust agreement do not absolve Providence of potential liability. Because we conclude that Providence has not proved any of its grounds for summary judgment as a matter of law, we will reverse the trial court's summary judgment and remand the cause for further proceedings.

BACKGROUND
This case arises out of a massive "toxic tort" dispute which resulted in the creation of ninety-seven separate trusts established for the benefit of numerous minor children (the "Children") who were plaintiffs in an underlying series of lawsuits. More specifically, the trusts were created as a result of two lawsuits, Cordova v. King's Park Apartments, Cause No. 87-28345, and Flores v. Truck Insurance Exchange, Cause No. 91-01595 (the "King's Park Litigation") filed in the 157th District Court of Harris County ("the 157th Court"). The King's Park Litigation involved "toxic tort" personal injury claims against two apartment complexes, their management companies, and their insurance companies. Because the Children were minors when the King's Park Litigation was filed, suit was brought on the Children's behalf by their parents, acting as next friends.
Three separate settlements of the King's Park Litigation occurred in 1991, 1992, and 1993, each with different groups of defendants. The 157th Court appointed a guardian ad litem pursuant to Rule 173 of the Texas Rules of Civil Procedure to represent the Children's interests.[1] At that point in *779 time, the guardian ad litem displaced the next friend as the personal representative of the Children.
The first King's Park Litigation settlement occurred in January 1991. Eileen Fowler was appointed guardian ad litem for the Children. Fowler placed the settlement funds in a special account at Dean Witter Reynolds, Inc. under her name. A portion of the settlement funds were used to purchase annuities from Northbrook Insurance Company. Mike Cook, a financial advisor with Dean Witter, assisted Fowler in managing the settlement funds.
The second settlement was reached in July 1992. Prior to approving the second settlement, the 157th Court appointed a special master, Michael J. Wood, to review the handling of the first settlement funds by Fowler and Dean Witter. After reviewing the special master's report, the 157th Court removed Fowler as ad litem for the Children and appointed Susan Spruce to replace her.
Spruce continued using Cook's services as financial advisor. Spruce and Cook wanted to use a substantial portion of the 1992 settlement funds to purchase additional Northbrook annuities for the Children. After determining that trusts would have to be created for the Children under Section 142 of the Texas Property Code,[2] Spruce approached appellee, Providence Trust Company, to discuss its willingness to act as trustee.[3] Providence was not the trustee at the time of the purchase of the 1991 annuities, and the trusts had not been established at that time.
The parties are in dispute as to exactly what role Providence played in deciding to purchase Northbrook annuities. Southwest contends that Providence agreed to the annuity purchases and signed off on the trust agreements before they were submitted to the court for approval; conversely, Providence maintains that it was merely authorized and directed to purchase the annuities by the court and that it had very little to do with the decision. In any event, the proposed trust agreements directed Providence to purchase variable annuities for the Children from Northbrook. These annuities were purchased by Providence for the trusts with the approval and authorization of the 157th Court, the guardian ad litem for the Children, the respective next friend of each Child, the attorneys for the Children, Mike Cook, and Michael J. Wood, the special master appointed by the 157th Court.

THE CONTROVERSY
In order to understand the issues underlying the dispute, we will describe the most salient features of the trust agreements, which include their purpose clauses, provisions for purchasing the annuities, annuity payout provisions, early withdrawal provisions, and termination provisions.[4]
The purpose of the trusts was to provide for the health, education, maintenance, and support of the Children.[5] As specified in *780 Section 4 of the original trust agreement, "the primary purpose of the trust [was] to pay educational and uninsured medical expenses of the beneficiary."
In order to accomplish this purpose, Section 4 of the trust agreement directed Providence to use a portion of the trust principal toward the purchase of a variable rate annuity from Northbrook for the benefit of the beneficiary. In particular, Section 4 authorized Providence to purchase an annuity that would provide a monthly payout of the principal and interest over a five-year period (i.e., a sixty-month period) beginning when the beneficiary reached eighteen years of age.[6] This provision also provided for early withdrawal of the annuity principal "if no penalty is incurred under the annuity contract for the withdrawal."
Finally, Section 5 of the trust agreement, the "Termination" clause, stated that:
The Trust shall terminate when the Beneficiary attains the age of twenty-five (25) years, or upon the Beneficiary's death prior to attaining such age. Upon termination, the Trustee shall pay all of the then remaining Trust estate of the Trust to the Beneficiary free of any further trust; or, if the Beneficiary is then deceased, to the personal representative of the Beneficiary's estate.
In accordance with the trust agreements, the 157th Court rendered an order appointing Providence as trustee. Important to this appeal, we note that paragraph five (5) of the order states as follows:
Providence Trust Company is authorized as Trustee to purchase custom annuities from Northbrook Life Insurance Company for all Minor Plaintiffs whose trust agreement as approved by the next friend and guardian ad Litem, permits such a purpose. The Trustee shall exercise its discretion in negotiating the terms and conditions of the annuity contracts to achieve a reasonable rate of return for the individual Minor Plaintiff Beneficiaries, taking into consideration the present age of the Minor Plaintiff, current market conditions, and the payout instruction contained in each trust agreement. Although the trust agreement may specify the purchase of a "variable rate annuity," this is not meant to limit the Trustee's discretion to purchase a fixed rate custom annuity for some of the Minor Plaintiffs if believed by the Trustee to be in the best interest of said Minor Plaintiffs.
(Emphasis added.)
In other words, the 157th Court specifically authorized Providence to exercise its discretion to purchase the type of annuity from Northbrook that would best serve the minor plaintiffs according to the terms of the trust.
Exercising this discretion, the record indicates that Providence purchased what is commonly referred to as non-qualified "retirement annuities." Accordingly, the interest earned on the annuities was taxable and there was a ten percent tax penalty on gross income for withdrawals prior to age of fiftynine and one-half. Moreover, such annuities imposed a surrender penalty on the first years of each contract. The penalties which will be imposed upon the Children in order to access their funds total more than $356,280. As stated earlier, the trust documents specified that the trust distributions were to be made as necessary for "the health, education, maintenance and support" of the Children. *781 The purchase of the annuities represented an investment of a significant portion of the trust principal. Since the annuities were purchased, the record shows that many of the Children have had needs which exceeded the reserve amounts retained as liquid assets in the trusts. Therefore, these children have been forced to obtain early distribution from Northbrook with significant penalties resulting. The record indicates that many beneficiaries are now "out of cash" and must curb requests even for education and health because funds are not available.
Given this result, Southwest as the successor trustee for the Children[7] sued Providence claiming that, as trustee, Providence breached its fiduciary duty to the Children as beneficiaries of the trust, breached its duty of good faith and fair dealing, and committed negligence in its role as trustee. Specifically, Southwest claimed that Providence's purchase of Northbrook annuities caused the trusts to be unsuitable for the statutorily mandated requirements of a Section 142 trust. Moreover, Southwest claimed that the purchase of Northbrook annuities resulted in an unacceptably low rate of return compared to a properly managed and diversified trust portfolio. Southwest claimed that Providence breached its duties by, among other things, failing to properly exercise its investment and disbursement discretion, improperly delegating its investment and disbursement discretion, failing to properly invest, manage, and diversify the trusts' assets, and failing to adequately protect the Children's interests by objecting to improper, illegal, and/or void trust terms. Southwest sued for the difference between the amounts realized on the annuity investments and the amounts that would have been realized by a proper investment portfolio. Southwest also sought the recovery of expenses associated with penalties incurred under the annuity contracts.
In response to Southwest's claims, Providence filed a motion for summary judgment asserting several affirmative defenses including derived judicial immunity, res judicata, collateral estoppel, as well as judicial and equitable estoppel. Providence also claimed that the suit was barred under Section 11(b) of the trust agreement which provided that as long as Providence was acting in "good faith reliance on any order or proceeding of the Court," it was immune from liability.
After hearing arguments, the trial court granted Providence's motion for summary judgment without stating a specific ground. Because we conclude that Providence has not conclusively proved any of its grounds for summary judgment as a matter of law, we will reverse and remand this cause for further proceedings.

STANDARD OF REVIEW
The standards for reviewing a motion for summary judgment are well established: (1) the movant for summary judgment has the burden of showing that no genuine issue of material fact exists and that it is entitled to judgment as a matter of law; (2) in deciding whether there is a disputed material fact issue precluding summary judgment, evidence favorable to the nonmovant will be taken as true; and (3) every reasonable inference must be indulged in favor of the nonmovant and any doubts resolved in its favor. Nixon v. Mr. Property Management Co., 690 S.W.2d 546, 548-49 (Tex.1985). The function of summary judgment is not to deprive litigants of the right to trial by jury, but to eliminate patently unmeritorious claims and defenses. See Swilley v. Hughes, 488 S.W.2d 64, 68 (Tex.1972).
Summary judgment for a defendant is proper when the summary-judgment evidence negates an essential element of the plaintiff's cause of action as a matter of law or establishes all the elements of an affirmative defense as a matter of law. Black v. Victoria Lloyds Ins. Co., 797 S.W.2d 20, 27 (Tex.1990). In this case, Providence moved *782 for summary judgment on the basis of its affirmative defenses. Therefore, Providence was required to come forward with summary-judgment evidence conclusively establishing each element of at least one affirmative defense. Nichols v. Smith, 507 S.W.2d 518, 520 (Tex.1974). Unless Providence conclusively establishes each element of one of its affirmative defenses, we must reverse the grant of summary judgment and remand to the trial court for further proceedings.

DISCUSSION
In its sole point of error, Southwest argues that the trial court's grant of summary judgment was erroneous because Providence failed to conclusively establish its right to summary judgment based on the affirmative defenses of derived judicial immunity, judicial estoppel, equitable estoppel, and res judicata and/or collateral estoppel. Moreover, Southwest contends that the terms of the trust agreement do not absolve Providence of liability as a matter of law. We will address each of Providence's affirmative defenses individually.
Derived Judicial Immunity
In Byrd v. Woodruff, 891 S.W.2d 689 (Tex.App.Dallas 1994, writ denied), the court of appeals explained the doctrine of derived judicial immunity as follows:
Judges are immune from tort liability for acts performed or not performed in the course of judicial proceedings over which they have jurisdiction. Turner v. Pruitt, 161 Tex. 532, 342 S.W.2d 422, 423 (1961). When judges delegate their authority or appoint persons to perform services for the court, their judicial immunity may follow that delegation or appointment. In Texas, judicial immunity applies to officers of the court who are integral parts of the judicial process, such as a prosecutor performing typical prosecutorial functions, court clerks, law clerks, bailiffs, constables issuing writs, and court-appointed receivers and trustees. The supreme court has held that as "arms of the court," bankruptcy trustees are immune from tort liability for actions grounded in their conduct as trustees. 891 S.W.2d at 707. See also Delcourt v. Silverman, 919 S.W.2d 777, 782 (Tex.App. Houston [14th Dist.] 1996, writ denied) (policy underlying derived judicial immunity is to prevent harassment and intimidation that might otherwise result if disgruntled litigants could vent anger by suing person who either presents decision-maker with adverse information or renders adverse opinion). Providence contends that a trustee under Section 142 is analogous to a bankruptcy trustee. Therefore, Providence contends that, as court-appointed trustee, it was acting as an "arm of the court" and is therefore entitled to immunity in this case. See generally Clements v. Barnes, 834 S.W.2d 45, 46 (Tex. 1992) (court-appointed bankruptcy trustee is protected from liability by derived judicial immunity).
Southwest counters that under the "functional approach" to derived judicial immunity, a court-appointed trustee may not always be immune from liability. The widely followed "functional approach" directs appellate courts to determine "whether the activities of a party seeking immunity are intimately associated with the judicial process" when deciding if such party is entitled to derived judicial immunity. See Delcourt, 919 S.W.2d at 782 (court-appointed psychiatrist in child custody case who performed court-ordered custody evaluation and guardian ad litem appointed pursuant to section 11.10 of the Texas Family Code were entitled to absolute derived judicial immunity); Byrd, 891 S.W.2d at 708 (court refused to extend immunity to guardian ad litem since court held that ad litem was not an agent of the court). In response, Providence rejoins that even under this functional analysis it should enjoy derived judicial immunity from tort liability.
We agree that Providence was acting at the direction of the 157th Court. Providence was appointed by the court and acted pursuant to a court order. However, that does not end our inquiry. The crucial question is whether the 157th Court's direction was ministerial as Providence argues, or cloaked with discretion as Southwest contends.
After examining the 157th Court's order, we hold that Providence was clearly afforded considerable discretion by the court. Paragraph *783 five (5) of the court order directs the purchase of custom annuities and rejects outright the automatic purchase of variable annuities as provided for in the trust agreement. The order clearly states, "Although the trust agreement may specify the purchase of a `variable rate annuity,' this is not meant to limit the Trustee's discretion to purchase a fixed rate custom annuity for some of the Minor Plaintiffs if believed by the Trustee to be in the best interests of said Minor Plaintiffs." The order directs Providence, in purchasing the annuities, to consider such factors as the "present age of the Minor Plaintiff, current market conditions, and the payout instruction contained in each trust agreement."
Providence responds that it eventually purchased the variable rate annuities at the behest and counsel of the guardian ad litem and the investment counselor, and therefore acted reasonably and in good faith when it purchased the annuities in question. While this might be a valid defense at a trial on the merits, such an issue remains to be determined by the trier of fact. Questions of reasonableness or negligence are generally for the jury to decide. See Hunsucker v. Omega Indus., 659 S.W.2d 692, 698 (Tex. App.Dallas 1983, no writ); Smith v. Muckleroy Enters., 537 S.W.2d 104, 106 (Tex.Civ. App.Tyler 1976, no writ). We cannot say that as a matter of law Providence is entitled to summary judgment based on derived judicial immunity.
The Terms of the Trust Agreement
Providence also maintains that, under the express terms of the underlying trust agreements, liability is precluded because Providence was merely following the directive of a court order. Providence relies on Paragraph 11(b) of the trust agreement which specifically provides:
The Trustee shall not be responsible or liable to the Beneficiary or any other person on account of any actions that the Trustee may take or fail to take in Trustee's good faith reliance on any order or proceeding of the Court.
(Emphasis added.) Providence maintains that all claims asserted by Southwest are precluded because it acted "in good faith reliance" on the provisions of the trust agreement which were adopted by court order.
This argument is without merit. Paragraph five (5) of the court order allowed Providence considerable discretion in the type of annuities it purchased from Northbrook. Given this fact, we cannot say that Providence is shielded from liability by the terms of the underlying trusts. Therefore, we hold that summary judgment is improper on this ground.
Judicial or Equitable Estoppel
Judicial estoppel prevents a party from contradicting a previous position successfully maintained in a prior judicial proceeding. See Long v. Knox, 155 Tex. 581, 291 S.W.2d 292, 295 (1956); Moore v. Neff, 629 S.W.2d 827, 829 (Tex.App.Houston [14th Dist.] 1982, writ ref'd n.r.e.). Similarly, equitable estoppel prevents parties from asserting claims against another party which arise out of their false representations relied upon by said party. See Steubner Realty 19 v. Cravens Road 88, 817 S.W.2d 160, 163 (Tex.App.Houston [14th Dist.] 1991, no writ) (equitable estoppel requires: false representation was made with intent that another party act on the false representation; false representation was made by party with knowledge of the facts; party to whom false representation was made was without knowledge or means of knowledge of real facts, and detrimental reliance on false representation).
Providence attempts to utilize judicial estoppel to prevent Southwest from asserting claims against Providence because the representatives of the Children in the King's Park Litigation settlement signed an agreed order authorizing Providence to purchase the variable rate annuities in question. Similarly, Providence contends that under the doctrine of equitable estoppel, all claims regarding the purchase of annuities are barred because Providence was merely "relying" on the directives of the parties to the King's Park Litigation settlement who took the position that Providence should invest in variable rate annuities.
*784 Having already observed that neither the trust documents nor the orders of the 157th Court conclusively establish as a matter of law that Providence acted without discretion, we hold that the summary-judgment record does not establish that judicial or equitable estoppel apply to the facts of this case. Had the 157th Court instructed Providence to buy only specific variable rate annuities, then the outcome of this case might have been different. Such is not the case before us based upon the record presented.
Res Judicata and/or Collateral Estoppel
In support of its contention that res judicata and collateral estoppel bar Southwest from bringing the instant cause, Providence argues that the claims and issues underlying the causes of action asserted by Southwest were litigated, or should have been litigated, in the King's Park Litigation and its resulting creation of the Section 142 trusts. Specifically, Providence argues that any objection to the variable rate annuities that were acquired for the Children should have been expressed in the King's Park Litigation settlement proceeding.
The doctrine of res judicata (also known as "claim preclusion") requires proof of the following elements: (i) a prior final judgment on the merits by a court of competent jurisdiction; (ii) identity of parties or those in privity with them; and (iii) a second action based on the same claims that were raised or could have been raised in the first action. Amstadt v. U.S. Brass Corp., 919 S.W.2d 644, 652 (Tex.1996). None of these elements can be established in the case at bar.
Comparing the elements of res judicata in light of the argument presented by Providence, we conclude that Providence has not conclusively established a res judicata bar. Southwest was not a party to the King's Park Litigation, which is an absolute requirement for res judicata. Additionally, Providence has never been sued nor could it have been sued for the claims brought by Southwest because any claim arising from the agreed order establishing the trusts could arise only after the trusts were established. Moreover, even though Southwest has now assumed the role of successor trustee and stepped into the shoes of Providence, this certainly does not bar a lawsuit between Southwest and Providence under the principles of res judicata. Providence's argument that Southwest is in privity with Providence might impact a claim by Southwest against other parties to the King's Park Litigation, but it is irrelevant in a suit between Southwest and Providence. Therefore, because the prior suit as asserted by Providence contained neither the same parties nor the same claims as the present case, we hold that res judicata is an improper ground for summary judgment.
Collateral estoppel, or "issue preclusion," bars relitigation of any ultimate issue that was litigated and essential to the judgment in a prior suit and: (i) the issue sought to be litigated in the second action was fully and fairly litigated in the first action; (ii) the issue was essential to the judgment in the first action; and (iii) the parties were cast as adversaries. Eagle Properties, Ltd. v. Scharbauer, 807 S.W.2d 714, 721 (Tex.1991); Bonniwell v. Beech Aircraft Corp., 663 S.W.2d 816, 818 (Tex.1984).
Similar to our discussion above regarding the applicability of res judicata, the doctrine of collateral estoppel is not and cannot be a bar to Southwest's suit against Providence. As stated above, the issues sought to be litigated in the present suit were not and could not have been "fully and fairly" litigated in the King's Park Litigation because such issues arose only after the trusts were created. Therefore, we hold that Providence has not shown as a matter of law that it is entitled to the defense of collateral estoppel.

CONCLUSION
Having held that no ground for summary judgment asserted by Providence is proper, we sustain Southwest's sole point of error. Accordingly, we reverse the trial court's summary judgment and remand the cause for further proceedings.
NOTES
[1]  Rule 173 provides:

When a minor, lunatic, idiot or a non-compos mentis may be a defendant to a suit and has no guardian within this State, or where such person is a party to a suit either as plaintiff, defendant or intervenor and is represented by a next friend or a guardian who appears to the court to have an interest adverse to such minor, lunatic, idiot or non-compos mentis, the court shall appoint a guardian ad litem for such person and shall allow him a reasonable fee for his services to be taxed as a part of the costs.
Tex.R. Civ. P. 173.
[2]  In relevant part, Section 142.005 provides:

Trust for Property
(a) In a suit in which a minor who has no legal guardian or an incapacitated person is represented by a next friend or an appointed guardian ad litem, the court may, on application by the next friend or the guardian ad litem and on a finding that the creation of a trust would be in the best interests of the minor or incapacitated person, enter a decree in the record directing the clerk to deliver any funds accruing to the minor or incapacitated person under the judgment to a trust company or a state or national bank having trust powers in this state.
Tex. Prop.Code Ann. § 142.005(a) (West 1998).
[3]  As we noted earlier, there were three different settlements reached on behalf of the Children. The third and final King's Park Litigation settlement was reached in February 1993. The dollar amount of the third settlement was significantly larger than the earlier two; however, fewer of the children participated in the third settlement. Portions of these funds were also used to purchase Northbrook annuities.
[4]  Our record contains a single sample trust agreement which was used as an exemplar at trial. Southwest Guaranty Trust Co. indicated that the sample was representative of the trust agreement form used for each of the Children.
[5]  Providence as trustee was directed to:

pay to or apply for the benefit of the Beneficiary such amounts out of the net income and principal [if income is insufficient] of the Trust as were reasonably necessary in the sole discretion of the trustee to provide for the health, education, support and maintenance of the Beneficiary.
[6]  In relevant part, Section 4 of the trust agreement provides:

The Trustee shall as soon as possible distribute $_______ of the Trust principal to purchase a variable rate annuity from Northbrook Life Insurance Company for the benefit of the Beneficiary under the general terms and conditions approved by separate order of the 157th District Court. The annuity shall provide for a monthly payout of the principal and interest over a five-year period ... to the Trustee under this Trust agreement beginning when the Beneficiary reaches 18 years of age.
The Trustee in its discretion may make application to the Northbrook Life Insurance Company for early distribution of interest or a portion of the annuity principal if the funds are needed to pay for educational or uninsured medical expenses of the child and no penalty is incurred under the annuity contract for the withdrawal. The Trustee shall not terminate the annuity contract or apply for early distribution of interest or any portion of the annuity principal for purposes other than to pay educational or uninsured medical expenses without an order from the 157th District Court authorizing such termination or withdrawal.
[7]  While still serving as trustee, Providence was closed by the Texas Banking Commissioner in August of 1994, and placed in liquidation. In January 1995, the trust business of Providence was conveyed through a purchase and assumption transaction to Charter National Bank-Houston ("Charter"). Charter was then purchased by NationsBank of Texas, N.A. ("NationsBank"), who filed a suit asserting this claim against the Providence estate. In 1997, NationsBank sold Charter's trust business to Southwest Guaranty Trust Company which is now serving as the trustee for the Children and has been substituted as the moving party in this cause.
