First backup to a storage drive using the emergency quick copy method, then disconnect the external drive, do NOT rely solely upon TimeMachine.
Next follow this procedure for reinstalling OS X 10.6, Security Zero Erase the entire drive in Disk Utility (important)
Update fully to 10.6.8 and exrtract your free iLife from your 10.5 disks or buy new from AppStore if needed.
Run the machine with no files returned for some time to rule out a hardware or file problem, then return copies of your files from backup and then make a TimeMachine and/or bootable clone drive.
Don't upgrade to 10.7 or 10.8 as that won't run your older software and slows older 10.5 era machines down quite a bit