	function isEmpty(name, strng) {
	  var error = '';
	  if (strng.length == 0) {
		 error = "The " + name + " field is required. \n";
	  }
	  return error;	  
	}
	function validate (theForm) {
	  var why = '';
	  why += isEmpty('Name', theForm.name.value);
	  why += isEmpty('E-mail', theForm.email.value);
	  why += isEmpty('Subject', theForm.subject.value);
	  why += isEmpty('Message', theForm.message.value);
	  if (why != '') {
		 alert(why);
		 return false;
	  }
	  theForm.action ='contact.php';
	  theForm.submit();
	  return true;
	}

