Updated

Britney Spears should probably put some underwear on — or at least avoid being photographed without it — and stop her alleged all-night partying if she wants custody of her two young sons.

That's the advice of divorce lawyers who say that an inappropriate photo, like the ones taken this week of Brit going commando as she left a dance club with Paris Hilton, doesn't mean she's an unfit mother. But it certainly gives soon-to-be-ex hubby Kevin Federline some ammo in his battle for their children.

"Her behavior is potentially creating an issue that shouldn't otherwise exist," said matrimonial attorney Dylan Mitchell of the Blank Rome law firm in New York. "She could give Mr. Federline some leverage. If she continues like that, he could turn around and say, she's never home and other people are parenting the children."

• Britney Spears Photographer Tells FOXNews.com: 'I Didn't See Her Try to Cover'

• Partying Without Panties: What Do You Think of Britney Spears?

Do you think Britney did it on purpose? Place your vote on the right side of the FOXLIFE PAGE.

That said, if Federline were to launch an unfit-parent claim against Spears and the courts sensed his motives weren't those of a loving father but of a money-grubbing leech, they wouldn't necessarily be too kind to him.

"Some people use custody as a way to get a better financial settlement," Mitchell said. "The courts abhor such behavior."

Photo Essay: Britney, Then and Now

And Federline hasn't exactly always been a model parent himself. He walked out on his ex-girlfriend Shar Jackson, with whom he has two children, when she was nearing the end of her pregnancy with their second baby. The two have, however, maintained an amicable relationship since their split.

Though Spears' recent actions and previous photos snapped of her driving with her older son Sean Preston on her lap rather than buckled into his car seat might not have a negative impact on her custody case, they aren't helping her cause either, according to Mitchell.

"It's not smart," he said. "My recommendation to her is that she mind her Ps and Qs. Everybody's watching — not only the news media and the paparazzi, but the judge. Now is not the time to party. Now is the time to be Super Mom. If she were my client, that's what I'd tell her to do."

Certified family law specialist Evan T. Sussman, who practices in Beverly Hills, Calif., said the courts tend to put more weight on bad behavior that's recurrent rather than on isolated incidents.

"If it's just a one-time thing, that's not nearly as relevant as if it's habitual," said Sussman. "I don't think one photo is going to be an end-all."

In fact, three different sets of crotch-flashing shots of Britney were apparently taken on three different occasions this week, according to some paparazzi who caught the madness on camera. But one string of wild nights out doesn't make such bawdy behavior a habit.

Sussman said courts look closely at factors like psychological stability and problems with drugs or drinking when determining which parent should have custody.

"A psychologist basically interviews both parents," he said. "They go through psychological testing and they make a recommendation to the court. Something like that is given great weight in custody battles. The courts look at totality of circumstances."

A judge would also consider the parents' prior conduct and determine who has been the primary caregiver, according to Sussman. He said the indiscretions caught on film this week would be much more damaging if Britney's children had been with her at the time.

One family therapist said Brit's shenanigans are an indication that she's going through a selfish phase.

"None of this is in the children's best interests," said Boulder, Colo., clinical psychologist Shirley Thomas, who specializes in separation and divorce. "When someone is acting out, they're rather absent in parenting the child emotionally even when they are with the child."

She doesn't believe Britney's bad behavior means she's an unfit mother. If anything, she said, the custody battle Spears and Federline are embroiled in is more harmful to the kids than anything Spears has done on her own.

"These two need to get onto the co-parenting bandwagon, put down the weapons and work together," said the author of "Parents Are Forever."

One thing is clear: This isn't a matter that's likely to be resolved soon.

"Courts are not inclined to make quick decisions here," Sussman said. "This is going to go on for months."

And Spears isn't the only mother walking around without underwear or engaging in less-than-savory behavior. The difference is that most other moms and dads aren't followed around and photographed incessantly.

"Every day, you see parents at the grocery store doing things that would look pretty bad if they were splashed on a newspaper," said Syracuse University pop culture professor Robert Thompson.

Click Here for more info on the Spears/Federline Divorce

Click Here for the Britney Spears Celebrity Center