It sounds to me like a major UTI, or some related infection. I would strongly urge you to catch up a sample in a small container that you can tightly close up and at the very least TAKE THAT to your Vet ASAP for lab tests. Usually this type of test runs about $12.00 to $15.00 with most vets. It is possible that it's semen, but the yellow cast to the color of it makes me think INFECTION. UTI's are not that uncommon, for some dogs.