Hello William I think you are in for a format I think the corruption is real bad.
This is what to do reboot pc and hit some thing like F1,F2,Del wich ever prompts to enter BIOS/Seup.
Set first boot to CD/DVD rom put in operating install disk press F10 save and exit.
you will see press any key to boot from CD/DVD then do so.
Some point during the install you will be prompted to to boot again from CD/DVD do not do this.
Do not create any more partitions.Just install on the one that is there.
Follow this link then:
How to partition and format a hard disk in Windows XP
The pc will reboot at times then just let it do not take disk out untill you have actualy installed windows and the logon screen appears.
If you need any more help then ask.
I think the pulling the plug instead of a proper shutdown has corrupted your OS.
DIIRE just sugested changing the keyboard or try another power supply before formatting.Do a couple of test boots without a keyboard plugged in.Leave D:/ partition as it it is.