It will load up after restart, passing the grey apple logo. When it looks like it's about to finish loading up Mac OSX it gets stuck at blue screen. Tried using Diskwarrior on it but it gets stuck in repair.
First thing to do in this situation is load the MacOS install disk, and reboot the system holding the C key down when you hear the chime until MacOS shows it is loading. This will not on;y show whether the system is basically sound and capable of booting, but also then give you the opportunity to run Disk Utility (in the Utilities menu of the installer) to check the hard drive for errors, and if any are found, attempt to repair them.
You'll need a wired USB keyboard (almost any will do, but NOT the Apple aluminium model) to boot to the installer.
When Disk Utility had finished the Repair Disk task, it if shows no faults, then you have a MacOS problem and likely need to perform an archive and install to set up a new copy of MacOS while preserving your files and applications. If Disk Utility shows errors it cannot repair, particularly reporting 'error on exit', it generally means the drive has suffered a problem. In those situations DiskWarrior is sometimes successful at recovery, though often a reformat is needed. In a small proportion of cases this problem is indicative of hardware failure - usually the hard drive itself, in which case a reformat would generally be expected to fail.
Be aware of course that reformatting the drive will wipe any and all data, so should not be done unless and until you have secured essential data.
Thanks for the reply Andy. We are running Disk Utility but it is also getting stuck while running it. The disk utility is just showing a spinning wheel saying "gathering information".
In that case, I would suspect the drive itself to be faulty - though there is also a possibility it could be a fault on the logic board. The latter seems unlikely if the drive is correctly identified however.
Sorry, I got side-tracked - I meant to add that the next step is to insert the original install disk, and reboot the system, this time holding down the D key, to boot into the Apple hardware test. While this can't be assured to identify the fault, it may be able to deliver an error code at least, and possibly even point to something like problematic memory if the disk appears OK.
We have switched to running Disk Warrior again. It is running pretty slow. Right now it is rebuilding the directory but the message on the bottom reads "speed reduced by disk malfunction:808 (number constantly increasing)". Does this mean the hard drive is still repairable?
I'm not familiar with that message, but the fact it is increasing suggests that DiskWarrior is discovering errors at it progresses. That would generally point to a failed, failing or damaged drive.
Do you have an external drive that you could (or already do) connect to the system? This might be a good time to try and boot the system from an external drive to make sure it is in good working order (except for the drive of course), and possibly to try and rescue any data that might not have been backed up - though if the drive is failing, that is less likely to successful.