// JavaScript Document
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);
	}
	
}

/*CONTACTO*/
   function validar_contacto(theForm){
	
		if (theForm.apellido.value == ""){
			alert("Su apellido es un dato requerido");
			theForm.apellido.focus();
			return (false);
		}
		
 		if (theForm.nombre.value == ""){
			alert("Su nombre es un dato requerido.");
			theForm.nombre.focus();
			return (false);
		}
			
 		if (theForm.email.value == ""){
			alert("Su dirección de correo 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 correo ingresada no es válida.");
			theForm.email.focus();
			return (false);				
		}

 		if (theForm.comentario.value == ""){
			alert("El comentario es un dato requerido.");
			theForm.comentario.focus();
			return (false);
		}
		
	
	return (true);
	}

/*CURRICULUM*/

   function validar_curriculum(theForm){
	
		if (theForm.area.value == "seleccionar"){
			alert("El área o puesto al que se postula es un dato requerido.");
			theForm.area.focus();
			return (false);
		}
		
		if (theForm.apellido.value == ""){
			alert("Su apellido es un dato requerido");
			theForm.apellido.focus();
			return (false);
		}
		
 		if (theForm.nombre.value == ""){
			alert("Su nombre es un dato requerido.");
			theForm.nombre.focus();
			return (false);
		}
		
		if (theForm.edad.value == ""){
			alert("Su edad es un dato requerido.");
			theForm.edad.focus();
			return (false);
		}
		else{
			if(isNaN (theForm.edad.value)){
				alert("La edad debe ser un dato numérico.");
				theForm.edad.focus();
				return (false);
			}	
		}
			
 		if (theForm.email.value == ""){
			alert("Su dirección de correo 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 correo ingresada no es válida.");
			theForm.email.focus();
			return (false);				
		}

 		if (theForm.estudios.value == ""){
			alert("Sus estudios cursados es un dato requerido.");
			theForm.estudios.focus();
			return (false);
		}
		
		if (theForm.experiencia_laboral.value == ""){
			alert("Su experiencia laboral es un dato requerido.");
			theForm.experiencia_laboral.focus();
			return (false);
		}
		
		if(theForm.referencias.value == ""){
			alert("Las referencias es un dato requerido.");
			theForm.referencias.focus();
			return (false);
		}
		
		if(theForm.foto.value == ""){
			alert("La foto es requerida.");
			theForm.foto.focus();
			return(false);
		}
	
	return (true);
	}
/*PROVEEDORES*/
function validar_proveedor(theForm){
	if(theForm.nombre.value == ""){
		alert("El nombre de su empresa es un dato requerido.");
		theForm.nombre.focus();
		return (false);
	}
	
	if(theForm.rubro.value == ""){
		alert("El rubro al cual pertenece su empresa es un dato requerido.");
		theForm.rubro.focus();
		return (false);
	}
	
	if(theForm.domicilio.value == ""){
		alert("El domicilio de su empresa es un dato requerido.");
		theForm.domicilio.focus();
		return (false);
	}
	
	if(theForm.localidad.value == ""){
		alert("La localidad es un dato requerido.");
		theForm.localidad.focus();
		return (false);
	}
	
	if(theForm.provincia.value == ""){
		alert("La provincia es un dato requerido.");
		theForm.provincia.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.email.value == ""){
		alert("Su dirección de correo 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 correo ingresada no es válida.");
		theForm.email.focus();
		return (false);				
	}
		
	if(theForm.foto.value == ""){
		alert("La foto o logo de su empresa es un dato requerido.");
		theForm.foto.focus();
		return (false);
	}

	//document.getElementById("productos").value = FCKeditorAPI.__Instances['productos'].GetHTML(); 
	//fckEditor1val = FCKeditorAPI.__Instances['productos'].GetHTML();

	if(theForm.productos.value == ""){
			alert("Los productos que usted ofrece es un dato requerido.");
			theForm.productos.focus();
			return (false);
	}
	
return (true);
}

//CAPACITACION
function validar_capacitacion(theForm){
	if(theForm.institucion.value == ""){
		alert("El nombre de la institución es un dato requerido.");
		theForm.institucion.focus();
		return (false);
	}	
	
	if(theForm.domicilio.value == ""){
		alert("El domicilio de la institución es un dato requerido.");
		theForm.domicilio.focus();
		return (false);
	}
	
	if(theForm.localidad.value == ""){
		alert("La localidad es un dato requerido.");
		theForm.localidad.focus();
		return (false);
	}
	
	if(theForm.provincia.value == ""){
		alert("La provincia es un dato requerido.");
		theForm.provincia.focus();
		return (false);
	}
	
	if(theForm.telefono.value == ""){
		alert("El teléfono es un dato requerido.");
		theForm.telefono.focus();
		return (false);
	}
	
	if (theForm.email.value == ""){
		alert("Su dirección de correo 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 correo ingresada no es válida.");
		theForm.email.focus();
		return (false);				
	}
	
return (true);
}
