///////////////////////////////////////////////
///// Compruebo que todos los datos obligatorios estan rrellenos, ESPAŅOL
///////////////////////////////////////////////
function comprobar_formulario_es(formulario){
 var text="Han ocurrido los siguientes errores: ";
 var bien=true;

  if (formulario.nombre.value.length==0){
		   bien=false;
		   text+="\n   * Escribir nombre."; 
	}		


 	


	 if (formulario.email.value.length==0){
	   bien=false;
	   text+="\n   * Escribir email.";
	 }else{
		 if (!validarEmail(formulario.email.value)){
				bien=false;
				text+="\n   * Formato del e-mail es incorrecto.";
			 }
	 }

 
 if (formulario.comentario.value.length==0){
		   bien=false;
		   text+="\n   * Escribir comentario."; 
	}
	

  if (bien==true){
    formulario.submit();
  }  else{
   alert(text);
  }
}


///////////////////////////////////////////////
///// Compruebo que todos los datos obligatorios estan rrellenos, FRANCES
///////////////////////////////////////////////
function comprobar_formulario_fr(formulario){
 var text="";
 var bien=true;

  if (formulario.nombre.value.length==0){
		   bien=false;
		   text+="\n   * nom."; 
	}		


 	


	 if (formulario.email.value.length==0){
	   bien=false;
	   text+="\n   * email.";
	 }else{
		 if (!validarEmail(formulario.email.value)){
				bien=false;
				text+="\n   * email.";
			 }
	 }

 
 if (formulario.comentario.value.length==0){
		   bien=false;
		   text+="\n   * commentaire."; 
	}
	

  if (bien==true){
    formulario.submit();
  }  else{
   alert(text);
  }
}




	function validarEmail(valor)
	{
		if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(valor))
		{
			return (true)
		} 
		else 
		{
	    	return (false);
	  	}
	 }


function validarCampo(valor)
	{
		if (/\w+([\.-]?\w)/.test(valor))
		{
			return (true)
		} 
		else 
		{
	    	return (false);
	  	}
	 }
