Believe it or not, the error is there intentionally. The name of the undefined variable is actually quite descriptive, because without this error, Internet Explorer 6 (do not remember if it is still the case with IE7) would not allow you to change pixes by moving your mouse over the grid with button pressed.
Use Firefox or Opera and there will be no error, because they work as expected and do not need this workaround...