Given acute triangle $ABC$. Point $D$ is the foot of the perpendicular from $A$ to $BC$. Point $E$ lies on the segment $AD$ and satisfies the equation \[\frac{AE}{ED}=\frac{CD}{DB}\] Point $F$ is the foot of the perpendicular from $D$ to $BE$. Prove that $\angle AFC=90^{\circ}$.