var Utility = { isInteger: function (s) { return (s.toString().search(/^-?[0-9]+$/) == 0); }, removeAllChilds: function (node) { if (typeof node != "undefined") { if (node.hasChildNodes()) { while (node.childNodes.length >= 1) node.removeChild(node.firstChild); } } }, clone: function (obj) { if(obj == null || typeof(obj) != 'object') return obj; var temp = new obj.constructor(); // changed (twice) for(var key in obj) temp[key] = Utility.clone(obj[key]); return temp; } }; function isInteger(s) { return (s.toString().search(/^-?[0-9]+$/) == 0); } function isUpper(s) { return (s.toUpperCase() == s); } function isLower(s) { return (s.toLowerCase() == s); } function abs(n) { if (n>=0) return n; else return n*(-1); }