function SetButtonVal(field, newvalue) {
	// validate button - field
	if( !field)
		return;
	var fldlength = field.length;
	if( fldlength == undefined) {
		field.checked = (field.value == newvalue.toString());
		return;
	}
	for(var i = 0; i < fldlength; i++) {
		field[i].checked = false;
		if(field[i].value == newvalue.toString()) {
			field[i].checked = true;
		}
	}
}