function objetoAjax(){ var xmlhttp=false; try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } 
catch (e) { try { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (E) { xmlhttp = false; } }
if (!xmlhttp && typeof XMLHttpRequest!='undefined') { xmlhttp = new XMLHttpRequest(); } return xmlhttp; }

function enviar_formulario() {

	r = document.getElementById('respuesta');	
	r.innerHTML = '<span class="mnsg">Enviado...</span>';
	
	
	nombre 			= document.contacto.nombre.value;
	empresa			= document.contacto.empresa.value;
	telefono		= document.contacto.telefono.value;
	email			= document.contacto.email.value;
	comentarios		= document.contacto.comentarios.value;
	lang			= document.contacto.lang.value;
	
	ajax=objetoAjax();
	ajax.open("POST", "wp-content/themes/inngenia/script_contacto.php",true);
	ajax.onreadystatechange=function() { if (ajax.readyState==4) { 
		
		r.innerHTML = ajax.responseText;

	} }

	ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
	ajax.send('nombre='+nombre+'&empresa='+empresa+'&telefono='+telefono+'&email='+email+'&comentarios='+comentarios+'&lang='+lang) 

}
