/**
 * Function:    setText
 * Description: Generic function for setting the value of a field.
 */
function setText (obj, val) {
	obj.value = val;
} // end of function


/**
 * Function:    setSelect
 * Description: Generic function for setting the value of a field.
 */
function setSelect (obj, val) {
	var found = false;
	
	for (var i=0; i < obj.length; i++) {
		with (obj.options[i])
		if (value == val) {
			selected = true;
			found = true;
		}	
	}
	
	if (! found) {
		// Switch to the "Select" label
		if (obj.length > 0) 
			obj.options[obj.length - 1].selected = true;
	}
} 
 
/**
 * Function:    setRadio
 * Description: Generic function for setting the value of a field.
 */
function setRadio (obj, val) {
	var found = false;
	
	for (var i=0; i < obj.length; i++) {
		with (obj[i])
		if (value == val) {
			checked = true;
			found = true;
		}	
	}
} 
 
