Judy B and Nancy B both made plenty of the same things I was going to say...keep in contact with the other parent, keep communication alive, don't put your kids in the middle, don't ask your kids to "spy" and don't say anything negative about the other parent(s).
Personally, as a former step-child and now a married woman, I would first exhaust ALL the options in staying together. I have been through lots of divorces...my parents when I was 3ish, my step-dad and mom when I was 12 and then my step-dad (same one as before- they got remarried to each other) and mom again when I was 20. Divorce is REALLY hard on the kids. Be prepared to do individual and family counseling before, during and after the separation and/or divorce. I blamed myself SO bad with my parent's divorce and became a very quiet, shy child because of it. With years of counseling, I came to figure out that it was not my fault and regained my more outgoing nature.
I can truthfully say that I have a great relationship with my step-mom and step-dad and I love them very much...but it took work, time and patience! When my parents divorced, my dad got custody of us and my mom has moved all over the country (so we have had experience with both an every-other-weekend situation when she was close, as well as only seeing her in the summer for 6 weeks and switching Thanksgiving/Easter and Christmas every other year when she was far).
My step-mom was more of a mom to me than my real mom (who wanted to just be my friend) and she worked SO hard to make it clear to everyone that she was not trying to take my mom's place, just trying to be there for my brother and me! She never said anything negative about my real mom despite my mom not liking her much. Now my step-mom and dad live in the same town I do and I love having them around to see my kiddos. I go to my step-mom for lots of advice. My step-dad is close to me too, but he's in the military and not married to my mom anymore so I don't see him often (though since these are his only grandkids so far, he comes through a lot more often than before- yes, both my step-parents love my kids like they were blood-just like they did for me too!)
One thing I would have to say is the "mom"/"dad" name issue was REALLY important to me. When my mom married my step-dad when I was 5, she told me- you decide what to call him, but you should call someone "dad" who deserves it...so I decided to call him "dad". My real dad was cool with it (if he was hurt, he never let on) because he knew I now had 2 dads who loved me very much, but he had the privileged and distinction of being my real dad! When my dad married my step-mom, they also sat down with all us kids and gave us the same option...and because she had been such a strong maternal influence on me even before the marriage, I decided to call her "mom"- which really ticked my mom off (despite her conversation with me a few years earlier in regards to "dad") and so even now as an adult, when I am with my mom and am talking about my step-mom, I still feel like I can't call her "mom" and have to refer to her by her first name...it's awkward and silly, but out of respect for my real mom's feeling, I just put up with it!
Anyway, with lots of work and persistence and openness, a step-family can work out well! Me and my 8 total bothers and sisters (step, half and real) can all attest that we all turned out "normal" (lol) without a lot of scars and we have learned to be EXTREMELY flexible in life and have learned how lucky we were to have 4 parents who loved us SO very much.
I could have written a novel on this topic, but I had better stop, so if you need/want more information or have specific questions for me, I'd be glad to talk and give you what I can- just send me a message! Good luck with everything!
S.