function showMenu(id, object) {
	document.getElementById(id).style.visibility = 'visible';
}

function hideMenu(id, object) {
	document.getElementById(id).style.visibility = 'hidden';
}

function changeSelect(array, key, object_id) {
	target = document.getElementById(object_id);

	target.disabled = true;
	target.options.length = 1;
	for (i = 0, count = 0; i < array[key].length; i++) {
		if (typeof array[key][i] != 'undefined') {
			count = 1;
			break;
		}
	}

	if (count > 0) {
		target.disabled = false;
		j = 1;
		for (i = 0; i < array[key].length; i++) {
			if (typeof array[key][i] != 'undefined') {
				target.options[j] = new Option(array[key][i], i);
				j++;
			}
		}
	}
	else {
		target.disabled = true;
	}
}