To save you some time I would suggest calling HP tech support even if the computer is out of warrantee. It sounds to me that it is either the power supply or the motherboard and since the CPU fan is not working it is more than likely the motherboard. If the computer is out of warrantee HP might have something they can do to replace what is wrong with your system. They will be able to ask you questions over the phone and determine exactly what is wrong with your system.
There is one web site that can help you since apparently you are using another computer to communicate with us here. Computer Repair with Diagnostic Flowcharts A flowchart is simply a chart that asks questions the have the answers YES or NO. And you follow the route it takes you to the answer and it should diagnose the problem. http://www.fonerbooks.com/pcrepair.htm
Give it a try and see where you come out.