// <form onsubmit="return validateFormOnSubmit(this)" action="test.htm">

function validateFormOnSubmit(theForm) {
var reason = "";

//  reason += validateEmpty(theForm.email);
  reason += validateCheckBox();
      
 if (reason != "") {
    alert("Some fields need correction:\n" + reason);
    return false;
 }

  return true;
}

function validateEmpty(field) {
    var error = "";
 
    if (field.value.length == 0) {
        field.style.background = 'Yellow'; 
        error = "The required field has not been filled in.\n";
    } else {
        field.style.background = 'White';
    }
    return error;  
}

function validateCheckBox() {
    var error = "";	
	 if (	document.forms['theform'].elements['online_proof_approval'].checked == false )
		{
			error = "You must check the online proof approval box.\n";
		}
    return error;  
}