|If...and that's a big word...if it is setup to boot from a cd boot order a: d: (your cdrom) C: then just put in your xp disk and follow the directions.|
The boot order is in the bios setup. Depending on make and model of the computer. Pressing F2,F8 del .......ect.
Formatting is the last resort, so getting a live cd with anti virus programs may be the way to go. You could then at least back up your bookmarks, email and passwords.
This is of course if you have an install disk.
I would try inserting the install disk and do a repair first