Hilly,
Parts is parts. As logn as you're replacing an ATA drive with an ATA drive (or a SATA drive with a SATA drive) they're interchangeable. Hell, they're all made in the same factories in China anyways.
But your error messages are troubling, and sound to me like your hard drive is on it's last legs. On the other hand, it might just be a loose connection to the motherboard or something else equally mundane. If yo know a local TRUSTWORTHY computer repair place, you should take it there. DO NOT take it to BestBuy, etc.