Temperature of computer

Just trying to see what an optimal temperature for a computer should be. I came across a computer that randomly restarts... once restarted, it'll still work again for awhile, but then restart again.

In the BIOS, it's detecting the CPU temp at 85 C (or 170-185 F)
and the MB temp is showing roughly 40 C (which I figure is good)... the CPU temp is what I'm wondering about.

This is a P4 3.4Ghz running Win XP Pro.

Thanks.