Maverick, you can work out visitation and such in a separation or divorce agreement. Initially, my ex would only have supervised visitations (until his sobriety was somewhat established) and it was mandated that they had to be preceded by breathalyzer tests. I stated from the beginning that I wanted to gradually expand visitation, as he was able to handle it, to a point of joint custody (without specifying what that would mean).
He's been sober for five months, and he has the kids every other week, full time. I've been rock hard about not bailing him out on "his" weeks (which infuriates him). I have actually been amazed at how well he's doing with the kids -- he's more of a parent now than he has ever been, but I won't lie, it has been incredibly hard to step back and not intervene when he calls and says "I can't handle it when X happens, you have to come help me"... I've just said, "you wanted the kids half the time; you deal with it."