Upload & Sell: Off
Depends on your budget. Since you are just starting out, get one with E-TTL compatibility so that you don't have to manually set the flash settings. The best bang for the buck is a Yongnuo YN 565EX which is their version of the Canon 580 II and comes new for $150 or so. Your 40D does not have a wireless flash trigger so you will also need a ST-E2 (not sure it is compatible with the YN 565EX though). I do not know if Yongnuo has a wireless trigger system.
If you want to do much better, the latest Canon 600 EX with a partnering ST-E3 for radio communications rather than just line of sight. This combo will be a lot more expensive.