Any suggestions for treating diarrhea?

For some odd reason everytime I am on my period I get the worst diarrhea in the world. What can I do to stop the diarrhea? This is driving me insane and I have the worst stomach pains ever .. please help