/**
 * Group Utility
 */
function GroupUtility() {
   this.checkNumber = function (elem, length) {

     if(this.isEmpty(elem.value)) {
         return false;
     }

     var v = elem.value.replace(/^\s+|\s+$/g,"");
      // check numeric
      if ( !this.checkNumeric(v) )  {
         return false;
      }

      // check length
      if ((v.length!=length)) {
           return false;
      }
      
      return true;
   };

   this.checkNumeric =    function (val) {
      return val.match (/^\s*\d+\s*$/);
   };

   this.isEmpty = function (val) {
      return val.replace(/^\s+|\s+$/g,"")=="";
   };
   
}
