/*
 * Función que restringe el contenido de un campo de texto a
 * solo números.
 */
function isNumberKey(e) {
	var tecla = (document.all) ? e.keyCode : e.which;
	if (tecla === 0 || tecla == 8 || tecla == 9 || tecla == 11) {
		return true;
	}
	var patron = /\d/;
	var te = String.fromCharCode(tecla);
	return patron.test(te);
}