missing $ie

Hi Jay, 

I have created the pull request as there was $ie variable missing causing errors in browsers different than IE. The $ie = 0 should exist somewhere outside switch statement, otherwise error 'undefined variable' appears.