It seems that there is a problem with the modulo function, ‘%’, in JavaScript.
For example: 10 % 0.1 should equate to zero but comes out as 0.09999999999999945 probably due to some internal floating-point rounding errors.
Easy solution (a hack really): Multiply both numbers by 1000 before using the modulo function.
When IE7 was designed they took the peculiar decision to split the navigation buttons into three places (if you include the home button).