FormName  = "request_form"  //Name of the form
CheckName = "rdbtntype_people" //Name of the checkboxes (without 1,2,3...10,11,12...)
TextName  = "txtstaff"  //Name of the textfields (without 1,2,3...10,11,12...)

var Condition=new Array(
'a!=""', //Must be filled
'a!=""' //Must be filled
);
function docheck(w) {
eval("a=document." + FormName + "." + TextName + w + ".value");
if (eval(Condition[w])) eval("document." + FormName + "." + CheckName + w + ".checked=true");
else eval("document." + FormName + "." + CheckName + w + ".checked=false");
}