Cornerstone builder seems to be conflicting with custom script

Hello,

I’m not a JS expert so I’m looking for some help with an issue that recently came to fruition after updating Cornerstone. Our site uses Salesforce’s Web-to-Lead form on our contact page. I recently updated the page using the Cornerstone builder and a script that I had running in the header of the page is no longer working correctly. The script checks the email field within the Web-to-Lead form to ensure we are not receiving unqualified leads with a gmail, yahoo, hotmail, etc… email address. Any help to get this script working is appreciated.

The page is located here: http://www.streamlinx.com/start-a-conversation/

The script is below:

<script> function checkEmailAddress(){var emailAddress=document.getElementById('email');if(emailAddress.value!=''){var strValue=emailAddress.value;if((strValue.indexOf('gmail')>0)||(strValue.indexOf('yahoo')>0)||(strValue.indexOf('hotmail')>0)||(strValue.indexOf('aol')>0)||(strValue.indexOf('icloud')>0)){alert('Please provide your company or work email address');return false;}}return true;}</script>

This is an automated message to notify you that your thread was posted in the wrong forum, and it has been moved to the correct place. A member of our team will be happy to reply just as soon as your thread is up. How support works.

For support, please post all questions in the Support Forum.

For peer to peer conversations with other Themeco customers about tips, customizations, or suggestions you are welcome to use the Peer to Peer Forum (no official support provided here).

Design & Development, Marketing & Media, and Hosting & Optimization are for discussion with fellow Apex members about non Themeco related topics. Please keep this in mind in the future.

Thank-you!