As you know with the older version of Nokia phone such as Nokia N73 you can format by turn off the phone then presss simutanous 3 key:Call,3,* and turn on the phone.The phone will be format.

How to do the same with Nokia 5800 phone.

Thanks