Here's the function part:
Code:
function validateCheckBox(field, field2, msg) {
	for (i=0;i<3;i++)
	{
		if (field[i].checked)
		{
			user_checked = field[i].value;
			if (user_checked == 1 && field2.value.length < 0) {
				alert(msg);
				return false;
				}
				return true;
		}
	}
}
And then I have this part:
Code:
   validateCheckBox(this.hospital_affiliated, this.shopper_hospital_name,
	  'Error Generated')
When the checked radio button returns the value of 1, I want to make sure that the "shopper_hospital_name" field is not left empty.

Thanks!