For those who say the dog uses the carpet as a pee pad... I want to make a suggestion. But ONLY A SUGGESTION you all have your own reasons for using pads... please take this only as an FYI.
Loki is housetrained to only go outside. Sammy is almost there - we got her when she was a year old and not trained. Loki doesn't "confuse" anything or even try to pee on the spots where Sammy has an accident. Yes, Sammy is more likely to have an accident on the carpet, but our house is 75% carpet. I clean it with an enzyme cleaner. Loki had plenty of accidents when he was a baby and I wasn't watching him closely enough - but Sammy doesn't gravitate towards any one spot as if she is peeing there because he did. I guess I'm just saying that even if the carpet has been peed on, you can train them not to pee there again.
I guess my point is that I am putting the floor in downstairs because I want to, but I'm replacing the carpet upstairs and I don't really worry about them re-staining it now they are trained (Loki) and almost trained (Sammy). Although, the DO like to PUKE on the carpet.