WASHINGTON - Elizabeth Edwards, stoic as her husband's presidential ambitions collapsed, her marriage crumbled, and cancer sapped her strength, thanked her supporters online Monday as word spread that the disease may take her life within weeks.

"The days of our lives, for all of us, are numbered," Edwards wrote on her Facebook page. "We know that. . . . But I have found that in the simple act of living with hope, and in the daily effort to have a positive impact in the world, the days I do have are made all the more meaningful and precious. And for that I am grateful."

The Edwards family issued a statement that said doctors had told Edwards that further treatment for her cancer would be unproductive. A family friend at Edwards' North Carolina home told the Associated Press that she was gravely ill.

Edwards was briefly hospitalized last week and received treatment, but doctors have now told her that she may only have up to a couple of months to live, the friend said.

Edwards' estranged husband, former presidential candidate John Edwards, and their three children were at her side at the Chapel Hill home. Her sister, brother, nieces, nephews, former campaign advisers, and other friends were also there. The friend said Elizabeth Edwards was not in pain and was in good spirits despite the seriousness of her condition.

"It isn't possible to put into words the love and gratitude I feel towards everyone who has and continues to support and inspire me every day. To you I simply say: you know," Edwards, a popular figure among Democratic activists, wrote on the Facebook post.

Edwards separated from her husband after he admitted to an extramarital affair and fathering a child with a campaign videographer. She has battled breast cancer since 2004, diagnosed in the final days of the campaign when her husband, then a North Carolina senator, was Massachusetts Sen. John Kerry's Democratic vice presidential nominee.

After retreating from public life, she became an advocate for changes in the country's health-care system.