How to determine if 2 points are on opposite sides of a line
Find the equation of the line. It should be of the form $ax + by + c = 0$. Given two points $(x_1, y_2)$ and $(x_2, y_2)$, plug these into that equation. They are on opposite side of the line if $ax_1 + by_1 + c < 0$ and $ax_2 + by_2 + c > 0$, or visa-versa.
Explicitly, they are on opposite sides iff $$((y_1-y_2)(a_x-x_1)+(x_2-x_1)(a_y-y_1))((y_1-y_2)(b_x-x_1)+(x_2-x_1)(b_y-y_1)) < 0.$$
$CD$ are on the opposite sides of $AB$ if and only if $\left(\overrightarrow{AB}\times\overrightarrow{AC}\right)\cdot\left(\overrightarrow{AB}\times\overrightarrow{AD}\right)<0$, where $\times$ is cross product and $\cdot$ is dot product.