Problem with javascript being called


I am trying to get a small bit of javascript working on my form, but it doesn’t seem to get called.

The javascript tries to not allow email from hotmail, yahoo, gmail…and give a message to the user not to use hotmail, yahoo, gmail. What is wrong with this code? I’m not a developer really.

Here is the code being used:

Please enter your company email address.Enter a more valid email address.No yahoo, gmail or hotmail emails.No yahoo, gmail or hotmail emails.