There is a broken contact somewhere. As the components heat up, thermal dilatation cause the contact to be re-established.
It may be a weak weld or have been caused by some shock.
That lap top in on the verge of total, final failure.
You need to backup all of your personal data and collected documents. An external drive is great for that purpose.
While waiting to get a new computer, keep that one plugged in and on at all times, with the power options set to so that only the display will automaticaly turn off.
As you continue to work with that computer, you must backup any new and modified documents at least every day.
Get a new computer and transfert your data to it.
Electro
March 2012