well its natural for a dog to do that but if you can stop it from getting scared by whatever it is then you can stop the pee!
train them
behave like a dog
Make him wear a dog diaper.
I've answered 'how to train a dog to not pee [anywhere]' at this link, same goes for peeing on a rug...How_do_I_House_train_small_dogs
shoot it
dont let him in there
get him used to peeing with the leash on, so he'll get used to it.
You either need to separate them or neuter your male dog.
you can train it to pee outside
He may scared, angry, or trying to mark his territory.
Squirt him with a garden hose every time he does it.
to stop peeing on your floor?