diff --git a/src/js/utilJS.tw b/src/js/utilJS.tw
index f1401412a253642377fb83071f6cf95741c61f65..85ca58196ece1c38171154f749155fe3daa74380 100644
--- a/src/js/utilJS.tw
+++ b/src/js/utilJS.tw
@@ -378,6 +378,13 @@ window.Categorizer.prototype.cat = function(val, def) {
 	return result;
 };
 
+
+window.isFloat = function(n){
+    return n === +n && n !== (n|0);
+}
+window.isInt = function(n) {
+    return n === +n && n === (n|0);
+}
 window.numberWithCommas = function(x) {
     return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
 }