i'm not sure if this will work with XP, but it works with 98. Haven't tried it for XP. Get your computer to run in DOS (not the windowed one, the one where windows is not running) and when in DOS, type in:
format c:\
it will ask you to make sure, type in yes. once its done, take your windows cd and put it in, then turn the computer off. turn it on with the cd in, and it should boot off the cd. Make sure you have the full and not the upgrade disc.
Like I said, I haven't tried this for XP so it may not work.