js_makeVectorValidarTool_contac = function(){
	var vector_valtool = new Array(); 
	var vector_asoc = new Object(); 
	vector_asoc["require"] = "nombre"; vector_asoc["tooltip"] = "nombre"; vector_asoc["msg"] = "CAMPO REQUERIDO";
	vector_valtool[0] = vector_asoc;
	var vector_asoc = new Object(); 
	vector_asoc["require"] = "empresa"; vector_asoc["tooltip"] = "empresa"; vector_asoc["msg"] = "CAMPO REQUERIDO";
	vector_valtool[1] = vector_asoc;
	var vector_asoc = new Object(); 
	vector_asoc["require"] = "email"; vector_asoc["tooltip"] = "email"; vector_asoc["msg"] = "CAMPO REQUERIDO";
	vector_valtool[2] = vector_asoc;
	var vector_asoc = new Object(); 
	vector_asoc["require"] = "mensaje"; vector_asoc["tooltip"] = "mensaje"; vector_asoc["msg"] = "CAMPO REQUERIDO";
	vector_valtool[3] = vector_asoc;
	return vector_valtool;
}

js_contactar = function(){
	$(".tip").hide();
	//alert("enviando ...");
	var vector_valtool = js_makeVectorValidarTool_contac();		
	var RV = validarFormToolTip(vector_valtool);		
	//alert(RV);	
	if(RV){
		var email = $("#email").attr("value");
		//alert(email);
		var msg = validaEmail_Ayu(email);
		//alert(msg["R"]+" - "+msg["msg"]);
		if(msg["R"]){
			//alert("enviando ..");
			var datos = $("#form_contacto").serialize();
			$.ajax({
				type: 'POST', url: "ajax/ajax_contactenos.php", data: datos,
				beforeSend: function(){
					$("#div_view_form").hide();
					$("#div_load_contac").show();
					//$("#div_validacion").hide(); $('#loading').show();
				},				
				success: function(data){
					//$("#div_view_form").fadeOut(1000);
					$("#div_load_contac").hide();
					$('#div_result_contac').html(data);
					//$('#loading').hide();
					if($("#msg_ope").val() == "ok"){
						$("#div_msg_ok").fadeIn("fast");
						$("#div_msg_failed").hide();
					}
					else{
						$("#div_msg_failed").fadeIn("fast");
						$("#div_msg_ok").hide();					
					}
				}			 
			});				
		}
		else{
			var mensaje = msg["msg"];
			showToolTipParams_mante("#email",mensaje.toUpperCase());		
		}
	}	
	
}

