well the first thing i would do. is try a UPS Battery Backup unit and plug the pc into it..
and check to see if fixes it. ( bad power can crash a pc )
if you dont have a UPS Battery Backup. try using a long cord and plug the pc into a outlet in a different room
if this doesn't fix it.. check the windows Event Viewer .it will help point you in the right direction