//------------------------------------------------------
	function JValidaCaracter(Tipo, Adicional)
	{
		var strNumeros ="0123456789";
		var strNotas ="0123456789,";		
		var Minusculas = "abcdefghijklmnñopqrstuvwxyzáéíóú";
		var Mayusculas = "ABCDEFGHIJKLMNÑOPQRSTUVWXYZ";
		var strTexto = Minusculas + Mayusculas + " ";
		var strAlfanumerico = strTexto + strNumeros + "/-_,;";
		
		var strMail = Minusculas + Mayusculas + strNumeros + "@_-.";
		
		var TextoTotal = new String();
		TextoTotal = Adicional;
		
		switch(Tipo){
			case "Notas":{
				TextoTotal += strNotas;
			break;	
			}
			case "Numerico":{
				TextoTotal += strNumeros;
			break;	
			}
			case "Texto":{
				TextoTotal += strTexto;
			break;	
			}
			case "Alfanumerico":{
				TextoTotal += strAlfanumerico;
			break;	
			}
			case "Email":{
				TextoTotal += strMail;
			break;	
			}
		}
		
		strCaracter = new String();
		strCaracter = String.fromCharCode(window.event.keyCode);
		var Pos = TextoTotal.indexOf (strCaracter);
		if(Pos > -1){
			return true;
		}else{
			window.event.keyCode = 0;
			return false;			
		}
	}
	

//------------------------------------------------------
	function validaLargo(obj,maxNumCarac)
	{
		comentario = obj.value;
		var caracOcupados = maxNumCarac - comentario.length;
		if(comentario.length > maxNumCarac){
			obj.value = comentario.substring(0,maxNumCarac);
			alert("Ha excedido el largo máximo de caracteres para este campo.");
		}
	}
	
