 

function Validar_sugerencias(theForm)
<!-- Validacion de Formulario INGRESO USUARIO -->
{
	
	 var checkStr = theForm.nombre.value;
  if (checkStr.length==0)
	{
    alert("Ingrese su nombre, por favor.");
    theForm.nombre.focus();
    return (false);
	}	
			if (checkStr.length!=0) {
		if (checkStr.replace(/ /g, '') == '')
		{
			alert("No se aceptan espacios en blanco.");
			theForm.nombre.focus();
			theForm.nombre.select();
			return (false);
			}
		}
	
	 
	
	 var checkStr = theForm.email.value;
  if (checkStr.length==0)
	{
    alert("Ingrese un E-mail, por favor.");
    theForm.email.focus();
    return (false);
	}	
 
 // Validamos el email.
		   oRegEmail = new RegExp ("^([A-Z]|[a-z]|[0-9]|[_]|[-]|[.])+[@]([A-Z]|[a-z]|[0-9]|[_]|[-]|[.]|[;]|[@])+$");
			if (!oRegEmail.test(theForm.email.value)) 
			{
			  alert("Por favor, ingrese una dirección de e-mail válida");
			  theForm.email.focus();
			  return(false);
			}
	
 
 
			
//*****************  validacion de textarea
theForm.mensaje.required = "true"; 
for (i = 0; i <theForm.elements.length; i++){
if ((theForm.elements[i].type == "textarea") &&  theForm.elements[i].required=="true" && theForm.elements[i].value=='')
{
  alert('Por favor, envie su cometario'); 
		 return (false);
		break;
	}
}
//************************************ 

	 
 return (true);
}

 
/*************************/
function ENVIAR_SUGERENCIA(VER,ENVIAR)
{
if (Validar_sugerencias(window.document.FormContact))
{
	window.document.FormContact.enviar.value=ENVIAR;
	window.document.FormContact.ver_opt.value=VER;
 window.document.FormContact.submit();

}
}
 