function trim(t) {
	s=t
  while (s.substring(0,1) == ' ') {
	s = s.substring(1,s.length);
  }
  while (s.substring(s.length-1,s.length) == ' ') {
	s = s.substring(0,s.length-1);
  }
  return s;
}

function compEmail (correo){
	var filter  = /^([a-zA-Z0-9_\.\-%%])+\@(([a-zA-Z0-9\-%%])+\.)+([a-zA-Z0-9]{2,4})+$/;
	if (filter.test(trim(correo)))
		return true;
	else 
		return false;
}

function setTildes(TextoOrig)
{
	Texto=TextoOrig;
	Texto=Texto.replace("á","&aacute;");
	Texto=Texto.replace("Á","&Aacute;");
	Texto=Texto.replace("é","&eacute;");
	Texto=Texto.replace("É","&Eacute;");
	Texto=Texto.replace("í","&iacute;");
	Texto=Texto.replace("Í","&Iacute;");
	Texto=Texto.replace("ó","&oacute;");
	Texto=Texto.replace("Ó","&Oacute;");
	Texto=Texto.replace("ú","&uacute;");
	Texto=Texto.replace("Ú","&Uacute;");
	Texto=Texto.replace("ü","&uuml;");
	Texto=Texto.replace("Ü","&Uuml;");
	Texto=Texto.replace("Ç","&Ccedil;");
	Texto=Texto.replace("ç","&ccedil;");
	Texto=Texto.replace("ñ","&ntilde;");
	Texto=Texto.replace("Ñ","&Ntilde;");
	Texto=Texto.replace("¿","&iquest;"),
	Texto=Texto.replace("€","&euro;");
	Texto=Texto.replace("´","&acute;");
	Texto=Texto.replace("¡","&iexcl;");
	return(Texto)
}
function sendComments()
{
	if (document.getElementById('cComentario2').value=='') 
	{
		return false;
	}
	else
	{
		document.getElementById('cComentario').value=setTildes(document.getElementById('cComentario2').value);
	}
	return true;
}