Why does my dog pee inside the house only when we are there?

Your dog may be a diabetic or have a urinary infection, this is a link to symptoms of canine diabetes
http://k9diabetes.com/forum/index.php?referrerid=18