function agregarProfesor(){
	var cantidad = document.formulario.cantidadProfesores.value;
	var fieldsetProfesor03 = document.getElementById('profesor03');
	var fieldsetProfesor04 = document.getElementById('profesor04');
	var fieldsetProfesor05 = document.getElementById('profesor05');
	var botonAgregarProfesor = document.getElementById('botonAgregarProfesor');
	var botonQuitarProfesor = document.getElementById('botonQuitarProfesor');
	switch(cantidad){
		case '2':
			fieldsetProfesor03.style.display = 'block';
			document.formulario.cantidadProfesores.value = '3';
			botonQuitarProfesor.disabled = false;
			botonAgregarProfesor.focus();
		break;
		case '3':
			fieldsetProfesor04.style.display = 'block';
			document.formulario.cantidadProfesores.value = '4';
			botonAgregarProfesor.focus();
		break;
		case '4':
			fieldsetProfesor05.style.display = 'block';
			document.formulario.cantidadProfesores.value = '5';
			botonAgregarProfesor.focus();
			botonAgregarProfesor.disabled = true;
		break;
	}
}

function quitarProfesor(){
	var cantidad = document.formulario.cantidadProfesores.value;
	var fieldsetProfesor03 = document.getElementById('profesor03');
	var fieldsetProfesor04 = document.getElementById('profesor04');
	var fieldsetProfesor05 = document.getElementById('profesor05');
	var botonAgregarProfesor = document.getElementById('botonAgregarProfesor');
	var botonQuitarProfesor = document.getElementById('botonQuitarProfesor');
	switch(cantidad){
		case '3':
			fieldsetProfesor03.style.display = 'none';
			document.formulario.cantidadProfesores.value = '2';
			botonQuitarProfesor.disabled = true;
			botonQuitarProfesor.focus();
		break;
		case '4':
			fieldsetProfesor04.style.display = 'none';
			document.formulario.cantidadProfesores.value = '3';
			botonAgregarProfesor.focus();
		break;
		case '5':
			fieldsetProfesor05.style.display = 'none';
			document.formulario.cantidadProfesores.value = '4';
			botonQuitarProfesor.focus();
			botonAgregarProfesor.disabled = false;
		break;
	}
}