//function to check valid email address
function isValidEmail(strEmail) {
  validRegExp = /^[^@]+@[^@]+.[a-z]{2,}$/i;

   // search email text for regular exp matches
    if (strEmail.search(validRegExp) == -1) {
      return false;
    } 
    return true; 
}