function checkFileName(name, limit) {
   if (name.length > limit) { return false; }
   
   return name;
}
function checkFileSize(size, limit) {
   if (size > limit) { return false; }

   var unit = new Array('B','KB','MB','GB');
   var i    = 0;
   while (size >= 1024) {
      i++;
      size = size/1024;
   }
   return Math.round(size * 100) / 100 + unit[i];
}
function checkFileExt(name, limit) {
   var reg = new RegExp("\.("+ limit +")$", "i");
   if(!name.match(reg)){ return false; }

   var names = name.split(".");
   var len   = names.length;
   return names[len - 1];
}
