A federal judge told Cecily Coleman here yesterday she was free to use all but $25,000 of the nearly $500,000 she won last week in an out-of-court settlement of her sexual harassment lawsuit against the American Broadcasting Co.

But U.S. District Judge Barrington D. Parker told Coleman she could not touch the $25,000 until he completes an unusual investigation into who leaked the supposedly secret amount of the damages. At the same time, Parker ordered ABC and James D. Abernathy, Coleman's one-time boss and the man she accused of sexually harassing her, to post a $25,000 bond in the case.

In the last week, Parker, at the request of ABC's lawyer, Stuart Gerson, has ordered his courtroom locked to the public as he listened to three days of testimony about how the leak occurred. Although the amount of the damages was not publicly disclosed when ABC and Coleman reached the settlement on July 2, The Washington Post, citing "other sources," published the amount in the next day's editions.

Gerson immediately asked Parker for the investigation. Yesterday, he asked the judge to "order significant sanctions against those persons found to have breached the confidentiality provisions of the settlement" and Parker's order that the terms of the settlement be kept secret.

Gerson said the "sanctions should be of a magnitude proportionate to the outrageous conduct that has injured the defendants." At the same time, Gerson said he would not try to overturn the settlement because of the disclosure.

He said ABC and Abernathy felt that the confidentiality of the agreement "was the most essential feature of the settlement to them. Its breach has particularly aggrieved him and ABC as well."

Judges can impose legal sanctions, such as holding lawyers and others in contempt of court or fining them, when they disobey court orders.

Mark Lane, one of Coleman's attorneys, blamed the leak earlier this week on the National Organization for Women's Legal Defense and Education Fund and its lawyers, who assisted Coleman in her case. The continuing investigation has now focused on Kathy Bonk, a NOW spokeswoman, who is currently in Kenya and is not expected back in the United States until July 22.

Parker has said he wants to hear her testimony and also suggested that some members of the media might be called to testify. However, no reporters have been subpoenaed.

When the investigation was started July 3, Parker told Coleman she could not use the money she had won until noon yesterday. With Bonk unavailable to testify, Gerson tried at first to get the deadline extended for Coleman's use of the money. Yesterday, Gerson suggested that she be required to hold back on use of $100,000, but Parker settled on $25,000.

Coleman, once executive director of ABC's voter-education program, claimed in her lawsuit that Abernathy had made repeated physical and verbal advances to her and "told her she could enjoy a promising future 'if she played her cards right.' " She was fired from her $60,000-a-year job after she complained about the alleged harassment.

Both ABC and Abernathy denied her charges.