Javascript email check function