// contact.js
// partially validates the "contact me" form before sending

function validate(){
	
	// find the form
  form = document.forms[1];
  
  // make sure there is a name given
  if (!form.name.value.length) {
    alert('Name is required!');
  }
  else 
  
    // and an email address
    if (!form.email.value.length) {
      alert('Email address is required!');
    }
    else
		  
			// and some form of an actual message  
      if (!form.message.value.length) {
        alert('Message is required!');
      }
      else {
        return true;
      }
  return false;
}
