function checkInput() {
  var expression=document.getElementById("expression").value;
  if ((expression==null) || ((expression!=null)&&(expression==""))) {
    alert("Please input the expression you want to query!");
    return false;
  } 
  if (expression.length<4) {
    alert("Please input a valid English expression, which should be at least 4 characters long!");
    return false;
  }
  for (i=0; i<expression.length; i++) {
    unicode=expression.charCodeAt(i);
    if (unicode>255) {
      alert("Please input a valid English expression, no Chinese or any other characters!");	
      return false;
    }
    if (unicode<=255) {
      if (((unicode<48) || ((unicode>57)&&(unicode<65)) || ((unicode>90)&&(unicode<97)) || (unicode>122)) && 
          (unicode!=32) && (unicode!=39) && (unicode!=44) && (unicode!=45) && (unicode!=46)) {
        alert("Please input a valid English expression, no Chinese or any other characters!");
        return false;
      } 
    }
  }
  return true;
}