Here's the specs page: http://h18000.www1.hp.com/products/quickspecs/12253_div...
Looks like you can add a PCIe graphics card. Just keep in mind that the specs state that you only have a 200W PSU and you stated that you only have 512MB of memory. That's not much for what you might be wanting to do with it.
The 200w power supply (PSU) is not your only problem, your CPU your PSU are both your problems along with what type of case you have. Is it a slimline or small or mini convertable?
Having a slim line or small, you will be limited to low profile cards. Now if you have the mini convertable you could use a standard card. Now the PSU being 200w, we would need to know how many amps are on the 12v rail.
You would have to open up your case and look to see the sticker on the PSU and write down the numbers you see like 3.3v = 13a + 5.v = 17a + 12v = 14a. Something like that.
Then once we figure out how many amps are on the 12v rail then we will know what kind of GPU you need. Also that is hurting you is your CPU. A P4 will keep you to a very low end card.
So What kind of gaming are you trying to do? And have you thought about building a new rig? Because that rig you have is kinda old if you know what I mean?