function validate() { if ((document.sendmail.first_name.value == '') || (document.sendmail.last_name.value == '') || (document.sendmail.title.value == '') ||(document.sendmail.company.value == '') || (document.sendmail.email.value == '') || (document.sendmail.phone.value == '') || (document.sendmail.country.value == '') ) { document.sendmail.submit.disabled=true; document.getElementById('unvalidated').innerHTML = "You can't submit until you've filled out all required fields."; return true; } else { document.sendmail.submit.disabled=false; document.getElementById('unvalidated').innerHTML = ''; return true; } }