From Home Screen –> Menu Button –> Settings –>Slide and choose Privacy or SD & Phone storage –> Factory data reset –> Reset phone –> Erase everything.
Important: Be aware that all data and applications will be lost during the process. Please back up all of your contacts, calendar and other data to your computer.
Note: Any information or Data on the SIM will not be erased.
[?]

