When Does Total Internal Reflection Occur