Well, yes PSes are different. But they are the same within their respective designations.
Like ATX, MicroATX, P4, and so on.
Chances are good you have a "normal" ATX power supply, it's most common. But being that you have a compaq, it may actually be proprietary, so you have to watch out.
If I were you, I might take the power supply to a local store and make sure it is standard. Then thank them kindly and go buy one online

Sometimes OEMs like compaq will rewire it, or add extra plugs just so you have to buy stuff through them. And maybe not.
Best way is to compare to a normal ATX power supply.
As far as the plugs go, look at which plugs go into the motherboard. Never mind plugs into drives and thing, but just in the motherboard. There should probably be two plugs, maybe one, or more. Perhaps tell us what each of these looks like.
As far as size goes, that depends as well. Some OEM PCs have small cases, so they have microATX power supplies. But being that yours is a 300watt, it's probably full ATX. Regardless, sometimes they put smaller supplies for the smaller case, hense, proprietary.
If you get a monster power supply like some $100+ 550W beast, even if it's ATX, it will probably be a bit larger then yours, screw holes the same, but larger in bulk, and may not fit.
I still say, best to take the PC to a shop and verify. It's easier then buying online and then, at best, having to return it, or at worse, possibly frying the new PS or your motherboard.