email validation in javascript using if condition