Updated

Britney Spears' decision to check into rehab could help her in court as she to tries to retain custody of her two young children with estranged husband Kevin Federline, according to family law attorneys. That is, of course, if she actually completes a rehab program.

When Spears checked into Promises Malibu drug and alcohol rehabilitation center Thursday, it was said to be the third time in a week she has checked into a rehab center.

"It actually may reflect well on her that she's now gone back, if she stays and sees herself through the program," said Jason Adess, a family law attorney in Chicago. "That way she can present to the court that she has an issue, she has acknowledged the issue, she has gotten help and now she is able to resume primary custody of the children."

Spears' manager, Larry Rudolph, confirmed in an e-mail to The Associated Press on Thursday that Spears is in the Malibu center. He provided no further details.

The 25-year-old pop star reportedly first checked into Promises on Tuesday, then left Wednesday morning, returning that night after visiting with lawyers and her family. Late last week she reportedly checked into a rehab center in the Caribbean, only to leave the next day.

Another family law attorney, Joshua Forman of New York, said such a merry-go-round approach to rehab isn't that unusual for people new to the process. It takes awhile, he said, for someone to admit they have a substance abuse problem and to feel comfortable being treated in a confined program that can last four to six weeks.

"There's ins and outs and a lot of false starts with this sort of stuff," he said Thursday, adding he has had several clients go in and out of rehab. Often, he said, family members and friends must intervene and persuade people that for the good of themselves and their children they must stay.

If they do, Forman said, courts are often willing to forgive the false starts.

"As long as she finishes what she's done, goes in, gets help, gets treatment and stays clean, the court will look positively on that," he said.

Hours after Spears checked into Promises, Federline's attorney, Mark Vincent Kaplan, canceled an appearance in family court he had scheduled for Thursday and announced that no hearings in the couple's child custody case are scheduled for the future.

Neither Kaplan nor Spears' attorney, Laura Wasser, responded to messages Thursday asking who was caring for Spears' children in her absence.

Under a temporary agreement reached in January, Spears and Federline have joint custody of their sons, Jayden James, 5 months, and Sean Preston, 17 months. Spears was granted custodial custody, with Federline allowed lengthy visits on Mondays, Wednesdays and Fridays. The order expires at the end of this month.

Spears filed for divorce from the 28-year-old aspiring rapper in November, citing irreconcilable differences.

Since then she has engaged in bizarre public behavior. It culminated last weekend when, after reportedly leaving rehab the first time, she arrived at a hair salon and shaved her head bald, moved on to a tattoo parlor where she had red-and-pink lips inked onto her wrist, then went club-hopping across Los Angeles.