bug fix
Number.isInteger does not work in IE.
function isInt(v) {
   //return parseInt(v) == v;
   return v%1 === 0;
}