How long do CD-Rs last?

I have recently transferred all my photos to CD-Rs, with one disc for each topic. How long can I store them like this before transferring them to new discs? Having seen floppies become unusable over time, how do I ensure that there will always be a medium and method of saving these photos for posterity?