function submitForm(frm){
  //Check is the visitor's browser supports the javascript function
  if (document.forms[frm]) {
	//START function executed
	//we will now check to see if all required fields were filled in
	var error = '';
	if(document.forms[frm].elements['req_id'] != null || document.forms[frm].elements['req_id'] != '') {
		//store all of the required fields into "reqs"
		var reqs=document.forms[frm].elements['req_id[]'];
		//count the number of required fields
		var nbr_fields = reqs.length;
		//set a variable "req" to make sure all the "reqs" stay true
		var req = true;
		//loop through all the required fields, making sure they are not blank
		for(var i=0;i<nbr_fields;i++){
		  if(document.forms[frm].elements[reqs[i].value].value.length <= 0){
		   //the field is blank
		   req = false;
		   //list what field has been left blank to inform the user
		   if (reqs[i].value == 'name') error += "\n - Name";
		   if (reqs[i].value == 'email') error += "\n - Email:";
		  }
		}
		//if all required fields are filled in
		//and the "human" form element has changed
		//submit the form
		if(req==true && document.forms[frm].elements['human'].value == '62'){
			return true;
		} else {
		  document.forms[frm].elements['email'].value = "";
		  return false;
		}
		return false
	 }
	//END function executed
  } else {
	//START the browser does not support the function
	alert('Your browser lacks the capabilities required to run this script!\n\nPlease call 206-330-0212 and we will gladly take your information over the phone.');
	//END the browser does not support the function
  }
}
function validateHuman(frm){
	document.forms[frm].elements['human'].value = "62";
}


