He probably needs to go out more than twice a day. He probably needs to be neutered, that will help the marking behavior, although never guaranteed to stop it completely.    
If your dog is housetrained, but is peeing in the house, there's a behavior issue or medical issue there. You can try re-housetraining to get him back in the swing of things or take him to the vet to make sure he doesn't have something going on.    
The Denver Dumb Friends League has a fantastic website with lots of good behavior information and behavior modification tips. Or you can contact an animal behaviorist.     
				__________________    "You become responsible forever for what you have tamed."  - Antoine de Saint-Exupery      |