function checkSize (elem){
  var str = elem.value;
  var check = (str.length > (1024*1024));
  if (check){
    alert("The text is too big, the web interface accepts up to 1Mb.");
  } 
  return (!check);
}
