Interesting problem. Is possible that the battery or mother board has a short or problem.
I would suspect the battery first, unless the jack is loose where the power cord plugs into the computer.
First thing I would try is a linux os. Not to install it and lose windows. Just to boot a live cd and see if you have same problem.
The live cd will boot and run from the cd without installing it.
Will have all the drivers you need, will tell you if it is a driver problem or a hardware problem.
If same thing happens with booting a linux cd, pretty good guess it is a hardware problem and not a windows driver issue.
I am going to suggest this version of linux to test with, is easy to use and comes with most drivers, some do not include as many and want you to install them later.
Click on download, you will get a .iso file.
Now you need a burning app to burn the .iso to a cd, you may already have one, if not I have found this free app infrarecorder to work well.
So you just download the lmde .iso, burn it to a cd, Then reboot your computer the same way you do with installing xp from cd.
You will get a fully functional desktop from the cd, it will not change anything on your hard drive. It will tell you if your problem is windows or hardware related.
Is also handy to have around, if your windows will not boot.
You can boot from lmde and navigate to your hard drive, and rescue files from it transferring them to a thumb drive.
Is many reasons to have a linux cd lying around in your tool box, your current issue is one of them.