I've had some previous problems with the power cable running between the on button and the motherboard, so I took it apart and found that one of the metal pins on the ribbon cable was bent back. I got a replacement cable and all worked fine for a couple of days and then the shutting down issue started happening again.
Thinking it was overheating, I cleaned out the fan and casing with compressed air/cotton buds and replaced the thermal compound on the heatsink. It helped a little bit but the laptop is still turning itself off randomly, sometimes as soon as I try to move it and sometimes when I'm not even touching it or using it for anything.
In addition to the above, the laptop has got very slow, especially on Firefox, and frequently crashes. I took the second RAM chip out of the laptop to see if it made a difference (it didn't) but when I put it back the laptop now refuses to boot up with the second chip inserted. The power button lights up but I just get a black screen. It boots up fine without the second chip but I'm still having the other issues.
Next, I reformatted the laptop and now the laptop is faster but I'm still having the RAM chip and shutdown problem. I'm using Windows XP Pro.
Is there anything else I can try, or does this sound like the motherboard has had it?