
function validar_inscripcion_ins(theForm){
	if (theForm.institucion.value == ""){
		alert("El nombre de su Institución es un dato requerido.");
		theForm.institucion.focus();
		return (false);
	}
	
	if (theForm.categoria.value == "Seleccione una categoria"){
		alert("La categoría de su Institución es un dato requerido.");
		theForm.categoria.focus();
		return (false);
	}
	
	if (theForm.telefono.value == ""){
		alert("El teléfono de su Institución es un dato requerido.");
		theForm.telefono.focus();
		return (false);
	}
	
	if (theForm.direccion.value == ""){
		alert("La dirección de su Institución es un dato requerido.");
		theForm.direccion.focus();
		return (false);
	}
	
	if (theForm.barrio.value == "Seleccione un Barrio"){
		alert("El barrio al cual pertenece su Institución es un dato requerido.");
		theForm.barrio.focus();
		return (false);
	}
	
	if (theForm.email.value == ""){
		alert("El E-mail de su Institución es un dato requerido.");
		theForm.email.focus();
		return (false);
	}

	email = theForm.email.value;
	email = email.toLowerCase();			

	if ( email.search("@") != -1 ){
	}
	else{
		alert("La dirección de e-mail ingresada no es valida");
		theForm.email.focus();
		return (false);				
	}
	
	if (theForm.contacto.value == ""){
		alert("El nombre de la persona de contacto es un dato requerido");
		theForm.contacto.focus();
		return (false);
	}
	
	if (theForm.descripcion.value == ""){
		alert("La descripción de la Institución y servicios es un dato requerido.");
		theForm.descripcion.focus();
		return (false);
	}
	
	if (theForm.palabras_claves.value == ""){
		alert("Las palabras claves son un dato requerido.");
		theForm.palabras_claves.focus();
		return (false);
	}
	
	return (true);
}


function validar_inscripcion_com(theForm){
	if (theForm.empresa.value == ""){
		alert("El nombre de su Empresa es un dato requerido.");
		theForm.empresa.focus();
		return (false);
	}
	
	if (theForm.categoria.value == "Seleccione una categoria"){
		alert("La categoría a la cual pertenece su Empresa es un dato requerido.");
		theForm.categoria.focus();
		return (false);
	}
	
	if (theForm.telefono.value == ""){
		alert("El teléfono de su Empresa es un dato requerido.");
		theForm.telefono.focus();
		return (false);
	}
	
	if (theForm.direccion.value == ""){
		alert("La dirección de su Empresa es un dato requerido.");
		theForm.direccion.focus();
		return (false);
	}
	
	if (theForm.barrio.value == "Seleccione un Barrio"){
		alert("El barrio de su Empresa es un dato requerido.");
		theForm.barrio.focus();
		return (false);
	}
	
	if (theForm.email.value == ""){
		alert("El e-mail de su Empresa es un dato requerido.");
		theForm.email.focus();
		return (false);
	}

	email = theForm.email.value;
	email = email.toLowerCase();			

	if ( email.search("@") != -1 ){
	}
	else{
		alert("La dirección de e-mail ingresada no es valida");
		theForm.email.focus();
		return (false);				
	}
	
		if (theForm.contacto.value == ""){
		alert("El nombre de la persona de contacto es un dato requerido");
		theForm.contacto.focus();
		return (false);
	}
	
	if (theForm.descripcion.value == ""){
		alert("La descripción de la Empresa, productos y servicios es un dato requerido.");
		theForm.descripcion.focus();
		return (false);
	}

	if (theForm.palabras_claves.value == ""){
		alert("Las palabras claves son un dato requerido.");
		theForm.palabras_claves.focus();
		return (false);
	}
	
	return (true);
}


function validar_inscripcion_ser(theForm){
	if (theForm.empresa.value == ""){
		alert("El nombre de su Empresa es un dato requerido.");
		theForm.empresa.focus();
		return (false);
	}
	
	if (theForm.categoria.value == "Seleccione una categoria"){
		alert("La categoría a la cual pertenece su Empresa es un dato requerido.");
		theForm.categoria.focus();
		return (false);
	}
	
	if (theForm.telefono.value == ""){
		alert("El teléfono de su Empresa es un dato requerido.");
		theForm.telefono.focus();
		return (false);
	}
	
	if (theForm.direccion.value == ""){
		alert("La dirección de su Empresa es un dato requerido.");
		theForm.direccion.focus();
		return (false);
	}
	
	if (theForm.barrio.value == "Seleccione un Barrio"){
		alert("El barrio de su Empresa es un dato requerido.");
		theForm.barrio.focus();
		return (false);
	}
	
	if (theForm.email.value == ""){
		alert("El e-mail de su Empresa es un dato requerido.");
		theForm.email.focus();
		return (false);
	}

	email = theForm.email.value;
	email = email.toLowerCase();			

	if ( email.search("@") != -1 ){
	}
	else{
		alert("La dirección de e-mail ingresada no es valida");
		theForm.email.focus();
		return (false);				
	}
	
		if (theForm.contacto.value == ""){
		alert("El nombre de la persona de contacto es un dato requerido");
		theForm.contacto.focus();
		return (false);
	}
	
	if (theForm.descripcion.value == ""){
		alert("La descripción de la Empresa, productos y servicios es un dato requerido.");
		theForm.descripcion.focus();
		return (false);
	}

	if (theForm.palabras_claves.value == ""){
		alert("Las palabras claves son un dato requerido.");
		theForm.palabras_claves.focus();
		return (false);
	}
	
	return (true);
}


function validar_consultas(theForm){
	if (theForm.nombre.value == ""){
		alert("Su Nombre es un dato requerido.");
		theForm.nombre.focus();
		return (false);
	}
	
	if (theForm.apellido.value == ""){
		alert("Su Apellido es un dato requerido.");
		theForm.apellido.focus();
		return (false);
	}
	
	if (theForm.localidad.value == ""){
		alert("Su Localidad es un dato requerido.");
		theForm.localidad.focus();
		return (false);
	}
	
	if (theForm.pais.value == ""){
		alert("Su País es un dato requerido.");
		theForm.pais.focus();
		return (false);
	}
	
	if (theForm.telefono.value == ""){
		alert("Su Teléfono es un dato requerido.");
		theForm.telefono.focus();
		return (false);
	}
	
	if (theForm.email.value == ""){
		alert("Su E-mail es un dato requerido.");
		theForm.email.focus();
		return (false);
	}

	email = theForm.email.value;
	email = email.toLowerCase();			

	if ( email.search("@") != -1 ){
	}
	else{
		alert("La dirección de e-mail ingresada no es valida");
		theForm.email.focus();
		return (false);				
	}
	
	if (theForm.mensaje.value == ""){
		alert("Por favor ingrese algún mensaje, gracias.");
		theForm.mensaje.focus();
		return (false);
	}
	
	return (true);
}

function validar_carga_datos_institucion(theForm){
	if (theForm.nombre.value == ""){
		alert("El Nombre de su Institución es un dato requerido.");
		theForm.nombre.focus();
		return (false);
	}
	
	if (theForm.direccion.value == ""){
		alert("La Dirección de su Institución es un dato requerido.");
		theForm.direccion.focus();
		return (false);
	}
	
	if (theForm.descripcion.value == ""){
		alert("La Descripción de su Institución es un dato requerido.");
		theForm.descripcion.focus();
		return (false);
	}
	
	if (theForm.rubro.value == "Seleccione el Rubro de su institucion"){
		alert("El Rubro de su Institución es un dato requerido.");
		theForm.rubro.focus();
		return (false);
	}
	
	if (theForm.barrio.value == "Seleccione el Barrio de su institucion"){
		alert("El Barrio de su Institución es un dato requerido.");
		theForm.barrio.focus();
		return (false);
	}
	
	return (true);
}

function validar_envio_mensaje_institucion(theForm){
	if (theForm.nombre.value == ""){
		alert("Su Nombre es un dato requerido.");
		theForm.nombre.focus();
		return (false);
	}
	
	if (theForm.email.value == ""){
		alert("Su E-mail es un dato requerido.");
		theForm.email.focus();
		return (false);
	}
	
	email = theForm.email.value;
	email = email.toLowerCase();			

	if ( email.search("@") != -1 ){
	}
	else{
		alert("La dirección de e-mail ingresada no es valida");
		theForm.email.focus();
		return (false);				
	}
	
	if (theForm.mensaje.value == ""){
		alert("El Mensaje de consulta es un dato requerido.");
		theForm.mensaje.focus();
		return (false);
	}
	
	if (theForm.guess.value == ""){
		alert("El código de validación es requerido.");
		theForm.guess.focus();
		return (false);
	}
	
}

function validar_envio_mensaje_empresa(theForm){
	if (theForm.nombre.value == ""){
		alert("Su Nombre es un dato requerido.");
		theForm.nombre.focus();
		return (false);
	}
	
	if (theForm.email.value == ""){
		alert("Su E-mail es un dato requerido.");
		theForm.email.focus();
		return (false);
	}
	
	email = theForm.email.value;
	email = email.toLowerCase();			

	if ( email.search("@") != -1 ){
	}
	else{
		alert("La dirección de e-mail ingresada no es valida");
		theForm.email.focus();
		return (false);				
	}
	
	if (theForm.mensaje.value == ""){
		alert("El Mensaje de consulta es un dato requerido.");
		theForm.mensaje.focus();
		return (false);
	}
	
	if (theForm.guess.value == ""){
		alert("El código de validación es requerido.");
		theForm.guess.focus();
		return (false);
	}
	
}

function borrar() {
	if (confirm("Está seguro que quiere borrar todos los datos del formulario ?")){
		return (true);
	}
	else{
		return (false);
	}
}


