// FUNCION PARA ELIMINAR ESPACIOS EN BLANCO AL COMIENZO Y FINAL DE LA CADENA
function trim(cadena)
{
	for(i=0; i<cadena.length; )
	{
		if(cadena.charAt(i)==" ")
			cadena=cadena.substring(i+1, cadena.length);
		else
			break;
	}

	for(i=cadena.length-1; i>=0; i=cadena.length-1)
	{
		if(cadena.charAt(i)==" ")
			cadena=cadena.substring(0,i);
		else
			break;
	}

	return cadena;
}


function scape_string(str){
	str= escape(str).replace(/\+/ig, '%2B').replace(/\//ig, '%2F');
	return str;
}

function validarEmail(valor)
	{
		if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/.test(valor))
		{
		return (true)
		} else {
		return (false);
		}
}

function verTextoCompleto(textoReducido,textoCompleto){

    textoReducido = document.getElementById(textoReducido);
    textoCompleto = document.getElementById(textoCompleto);
    
    if(textoCompleto.style.display=='none'){
      textoReducido.style.display='none';
      textoCompleto.style.display='';
    }else{
      textoCompleto.style.display='none';
      textoReducido.style.display='';
    }

}
