You said BF2 works, so you can join (ranked) servers, no problems?
If not, it could be a CD-key problem. A quick way to check is to chuck your CD in the drive and see if it starts the installer.
Otherwise, go to your Start menu and run
regedit, then go into:
HKEY_LOCAL_MACHINE\SOFTWARE\Electronic Arts\EA Games\Battlefield 2\ergcThis is where your CD-key info lives, if it's not there or there's a problem with it, it'll CTD when you try to play online, but offline works fine.
EDIT: Search this section of the forum for
regedit...
BTW, are you a necromancer?