yeah with steam you have an account, and they know what games you've bought so it wouldn't matter if you lost the CD, just get steam from steampowered.com, put your id and password in and you can download all the games you have on that account
its quite legal ^_^