//##########################
// Now the really fun one.
//##########################
/* pass the values for field type (w), field display name (x),
form name (y), the index for the checkbox or radio button (a), and
the number of check boxes or radio buttons in the group (d). */
// determine whether or not the a and d are valid data for the radio button.
if(w == "radio"){// determine whether or not the a and d are valid data for the checkbox.
if(w == "checkbox"){// pass the variables to the script fields
var fieldType = w;// create the constants to be used in concatenating the strings
var strDocument = "document.";// build the strings to place the curson back in the last field tested using the focus() method
var strGoToField = strDocument + formName + "." + fieldName + strFocus;// build the string to be tested in text or text area boxes.
var b = strDocument + formName + "." + fieldName + strValue;//build the string to be tested for a radio box
var c = strDocument + formName + "." + fieldName + "[" + radioIndex + "]" + strChecked;//create a switch that send the script to different legs depending on the field type.
switch (fieldType)//create the string to evaluate for a radio button when there are more than one.
var e = strDocument + formName + "." + fieldName + "[" + i + "]" + strChecked;/* if the string created above evaluates to true we change the value of
strButtonChecked to True, and then change the value of i so we exit the loop *///if the variable is not true we let the user know he needs to make a selection.
if(!eval(strButtonChecked))//alert(strButtonChecked +"Checking strButtonChecked");
// Commented this out it was for testing.
alert("You did not make a selection for "+displayName+".");//alert(e);
if(eval(e))//if the variable is not true we let the user know he needs to make a selection.
if(!eval(strBoxChecked))// basic textbox vaildation
if(eval(b) == "")//eval(strDocument + formName + "." + fieldName + strFocus);
eval(g)