function do_chmod(user) {
	var field4 = user + "4";
	var field2 = user + "2";
	var field1 = user + "1";
	var total = "t_" + user;
	var symbolic = "sym_" + user;
	var number = 0;
	var sym_string = "";

	if (document.chmod[field4].checked == true) { number += 4; }
	if (document.chmod[field2].checked == true) { number += 2; }
	if (document.chmod[field1].checked == true) { number += 1; }

	if (document.chmod[field4].checked == true) {
		sym_string += "r";
	} else {
		sym_string += "-";
	}
	if (document.chmod[field2].checked == true) {
		sym_string += "w";
	} else {
		sym_string += "-";
	}
	if (document.chmod[field1].checked == true) {
		sym_string += "x";
	} else {
		sym_string += "-";
	}

	if (number == 0) { number = ""; }
	document.chmod[total].value = number;
	document.chmod[symbolic].value = sym_string;

	document.chmod.t_total.value = document.chmod.t_owner.value + document.chmod.t_group.value + document.chmod.t_other.value;
	document.chmod.sym_total.value = "-" + document.chmod.sym_owner.value + document.chmod.sym_group.value + document.chmod.sym_other.value;
}
//-->