function checkFields() {

	missinginfo = "";
	if (document.form.Name.value == "") {
	missinginfo += "\n     -  Name";
	}
	if ((document.form.Email.value == "") || 
	(document.form.Email.value.indexOf('@') == -1) || 
	(document.form.Email.value.indexOf('.') == -1)) {
	missinginfo += "\n     -  Email Address";
	}
	if(document.form.Phone.value == "") {
	missinginfo += "\n     -  Phone";
	}
	if((document.form.OriginCity.value == "" || document.form.OriginState.value== 'NO') && document.form.OriginZip.value == "") {
	missinginfo += "\n     -  Origin City, State or Zip Code";
	}
	if((document.form.DestinationCity.value == "" || document.form.DestinationState.value== 'NO') && document.form.DestinationZip.value == "") {
	missinginfo += "\n     -  Destination City, State or Zip Code";
	}


	if (missinginfo != "") {
	missinginfo ="_____________________________\n" +
	"You complete the following required fields:\n" +
	missinginfo + "\n_____________________________" +
	"\nPlease correct and submit again.";
	alert(missinginfo);
	return false;
	}
	else return CheckForm();
}

function CheckForm() {
	document.form.Name.value = RemoveBad(document.form.Name.value);
	document.form.Company_Name.value = RemoveBad(document.form.Company_Name.value);
	document.form.Email.value = RemoveBad(document.form.Email.value);
	document.form.OriginCity.value = RemoveBad(document.form.OriginCity.value);
	document.form.DestinationCity.value = RemoveBad(document.form.DestinationCity.value);
	return true
}

function RemoveBad(strTemp) {
	strTemp = strTemp.replace(/\<|\<|\>|\"|\'|\%|\;|\(|\)|\+/g, "");
	return strTemp;
}
