I would start by agreeing with what Patrick has already posted- that 13 year old boys are almost always focused on areas outside of school and quite often about girls! As a former middle school assistant principal, please be aware that adult frustration with 12, 13, 14 and 15 yr olds is more the norm than the exception, for alot of reasons.
At these ages the child's mental and physical world is often turned upside down by the body's changing patterns, and some kids handle this better than others. That obedient, respectful child may become a person who is less thant ideal to always be around (note my diplomacy), but this is entirely normal.
The bottom line for you to consider- do not back your son into a corner with no options, or I guarantee he will lash out. In other words, always remember you are the adult who has to be patient and understanding even when your son is driving you nuts. Just don't push him into a corner.
Set clear guidelines and parameters, understand this behavior is part of growing up, and be reasonable but clear. This is an age when young people feel especially vulnerable and insecure- keep this in mind as you try to handle him and his mood swings/disrespect.
At that age it's pretty normal for a boy to be thinking constantly about the opposite sex (for some boys that lasts all their entire life). If that infatuation manifests itself in a disrespectful attitude towards women than I'd try to monitor what could be influencing that behavior, music videos, certain tv shows, older siblings. It could be helpful to have an older male figure that he respects explain to the boy that being disrespectful towards women is going to result in these women he's interested in not wanting to have anything to do with him. As for school work, tell the boy that no girl likes a dumb guy so he should pay attention in school if he ever hopes to get a girl.
I totally agree with both of these responses...both are from men who have been 13. Now from a mother's view point...I would ask you these questions if we had this talk in person...EVEN WHEN HE IS DISRESPECTFUL, he is still allowed to talk to girls on the phone? is he allowed to go places with friends? is he allowed to keep his computer/cell phone/iPod, etc? other words, are there any consequences for his actions? Is there a male figure in his life that is being a role model of this disrespect? What are his friends like? Have you checked to see how these children treat their parents...could be a reflection of what he's seen them do????
what is his excuse for poor grades? Does he have any learning disabilities? What are his hobbies, other than girls? YOu might bring that hobby into his field of learning...Is there a particular girl??? Find out how she does in school...his lack of interest in his school work can be coming from his thoughts of being popular...What time does he get in the bed on school nights...lack of sleep is one of the most common reasons kids get behind in their work and just can't get caught up...leading to giving up! Help him to connect EDUCATION with the things he wants in life...When my son brought home a report card that didn't match his abilities, extra chores on weekends and all the extra things he was allowed to do was curtailed until the grade came back up. Warning...you have some power now...but when he gets to be 15, 16, 17...MOST of a parent's power is lost...you can't spank them, you can't put them in time out....He needs to understand that disrespect will not be tolerated without consequences...also remind him that, even though it disappoints you that he is disrespectful to you, you still love him. This age is the true test of a parent's patience!!!! Good luck!