The idea that your kids owe you respect is one that I struggle with. How can your kids be expected to show respect - to you or anyone else in their limited worlds - if they are not directly and consistently shown what that is by the people they love the most in the world? They are only able to communicate what they have been taught through their experiences in the world, a giant percentage of which involved you.
Until a child is school aged their entire world consists of whoever they live with. Whoever holds them and feeds them and calms them when they cry. The world of an infant to toddler aged child is generally limited to direct family members and close friends. Nowadays their world likely also consists of a daycare provider and the assorted other children at the daycare. Beyond that, however, they aren't exactly social butterflies. I refer to the ages of 0-3 as the Sponge Age to my clients to try and help enforce the importance of a stable and consistent home and caregiver situation. Realize - all their rapidly developing brains are doing is soaking things up and learning. Their brains take in information and convert it to messages, rules, and feedback. This information creates the lens through which your child sees and reacts to the world.
Want your kids to be polite, respectful people?
Lead. By. Example.
First and foremost? Stop talking smack about your Ex. Tell your family and friends - we show respect here. Want to vent? Hate the jackass? That's fine - hate them on your own time when you are kid-free and among friends. Whatever happened in your relationship with their other parent had nothing to do with them. They should NEVER know the details until they are old enough to truly process them.
They should also never know when you're going to court, dealing with custody, visitation, or child support issues. Those are adult issues.
It is your job to show your children how to deal with life's ups and downs. Show integrity and respect in front of them every chance you get. You don't have to be perfect, you just have to keep your emotions in check, resist being impulsive, and do everything in your power to take the high road. Your relationship with your children directly benefits from you leading with compassion and patience. When they're mad at you because you don't want to bring them to the mall instead of them calling you a B*tch or something equally awesome, they'll respond the way you've taught them to handle disappointment. And then they'll get on with their day. The choice is yours.