Function Java Script checks for name and email.