There is some known issues with laptops that get XP loaded on by the users. The laptop didn't get drivers/bios from the maker to do power management or handle the charging proper. It's either that or the battery has failed. Such parts can fail and at 2-3 weeks you should have it exchanged to see if that is the issue.

Just to close this issue. I can not write BIOS and drivers to cure such laptops. You have to deal with HP/Compaq on the issue after you get another battery.