function validate(form) {
// Checking if at least one period button is selected. Or not.

if (!document.photo.age.checked) { alert("You must agree to the terms by selecting the checkbox to participate.");
 return false; }

if (!document.photo.PHOTO_IMAGE.value) { alert("Please Select a Photo");
 return false; }

if (!document.photo.FULL_NAME.value) { alert("Please Enter Your Name");
 return false; }

return true;

}

function submitform(fname) {

  if (validate(document.forms[fname])) {
    document.forms[fname].submit();
  }

}