function checkthis(theForm) {

var alertsay = ""; // define for long lines

// check to see if the field is blank
if (theForm.age.value == "") { alert("Please enter your correct age. We won\'t tell anyone!"); theForm.age.focus(); return (false); }


// require at least 2 characters be entered
if (theForm.age.value.length < 2) {	alert("Please enter your REAL age. We won\'t tell anyone!"); theForm.age.focus(); return (false); }
if (theForm.age.value < 12) { alert("You must be older than 12 years to take this quiz."); theForm.age.focus(); return (false); }

// only allow numbers to be entered
var checkOK = "0123456789";
var checkStr = theForm.age.value;
var allValid = true;
var allNum = "";
for (i = 0;  i < checkStr.length;  i++) { ch = checkStr.charAt(i);
for (j = 0;  j < checkOK.length;  j++)
if (ch == checkOK.charAt(j)) break;
if (j == checkOK.length) { allValid = false; break; }
if (ch != ",") allNum += ch; }

if (!allValid) { alert("Please enter your correct age. We won\'t tell anyone!"); theForm.age.focus(); return (false); }

var radioSelected = false; for (i = 0;  i < theForm.gender.length;  i++) { if (theForm.gender[i].checked) radioSelected = true; }
if (!radioSelected) { alert("Please tell us your gender, we REALLY need to know."); return (false); }

var radioSelected = false; for (i = 0;  i < theForm.q01.length;  i++) { if (theForm.q01[i].checked)	radioSelected = true; }
if (!radioSelected) { alert("Please answer all questions in the \"Basic Information\" section. It only takes a few seconds."); return (false); }

var radioSelected = false; for (i = 0;  i < theForm.q02.length;  i++) { if (theForm.q02[i].checked)	radioSelected = true; }
if (!radioSelected) { alert("Please answer all questions in the \"Basic Information\" section. It only takes a few seconds."); return (false); }

var radioSelected = false; for (i = 0;  i < theForm.q03.length;  i++) { if (theForm.q03[i].checked)	radioSelected = true; }
if (!radioSelected) { alert("You have to select at least ONE goal to continue. We use this information to improve this test."); return (false); }

return (true);
}
