I replaced the Deck in my '06 myself, I threw out the lameass cd player, and put in a pioneer bluetooth deck using an adaptor kit: Here's the 3 items you'll need. (note, you can also get double din adaptor kits, and waaaay better decks than the pioneer one I linked, I'm just being lazy) the parts will cost you $150 US, and if you don't want to install it yourself it'll cost another 100 or so for install at a car audio place. (I did it myself, just solder up the harness and google how to take your dash apart) (the entire audio deck portion of the dash is held in by 1 screw behind the central HVAC knob)
http://www.amazon.com/Toyota-Corolla-03-08-DIN/dp/B0002BEPU8
http://www.amazon.com/Stereo-Harness-Toyota-Corolla-installation/dp/B0067MZHY4
and No, there we're no codes required. I've also done this in a 2002 corolla, but that's a different generation than yours.