<!-- Lock fields when radio button is not selected -->
/*

This script is used to lock fields associated wit a radio button
Currently it only locks text fields and drop downs
call it on the onClick or onChange of the field.
   */


/* lock drop down list 
  parameters 
     field (field to lock),  
     index index of radio button field is locked to
     radiobutton (name of radiobutton)
*/
function lockdropdown(field, index, radiobutton) {
	if (radiobutton[index].checked == false){
		var list1 = field
		list1.selectedIndex = 0;
		
	}
}

/* lock drop test field 
  parameters 
     field (field to lock),  
     index index of radio button field is locked to
     radiobutton (name of radiobutton)
*/
function lockfield(field, index, radiobutton) {
	if (radiobutton[index].checked == false){
		field.blur();
	}
}

/* lock radio button
  parameters
     field (field to lock),
     index index of radio button field is locked to
     radiobutton (name of radiobutton)
*/
function lockradiobutton(targeradiobutton, index, radiobutton) {
	if (radiobutton[index].checked == false){
		return false;
	}
	return true;
}