function nuevoAjax(){

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 posicionamiento(){

	c = document.getElementById('resultado_informe');

	

	//variable=documenet.nombre_del_form.nombre_del_control.value

	clt=document.informe.cliente.value;
	emp=document.informe.empresa.value;
	wb=document.informe.web.value;
	rbr=document.informe.rubro.value;
	pcl=document.informe.palabrasclave.value;
	bus=document.informe.buscador.value;
	nom=document.informe.nombre.value;
    em=document.informe.email.value;
	fon=document.informe.fono.value;
	cm=document.informe.comentarios.value;

	ajax=nuevoAjax();
c.innerHTML = '<p style="text-align:center;"><img src="esperando.gif"/></p>'; 
	ajax.open("POST", "envia_posicionamiento.php",true);
	ajax.onreadystatechange=function() {
		if (ajax.readyState==4) {
			c.innerHTML = ajax.responseText
		}
		borrarCampos()
	}
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
	ajax.send("cliente="+clt+"&empresa="+emp+"&web="+wb+"&rubro="+rbr+"&palabrasclave="+pcl+"&buscador="+bus+"&nombre="+nom+"&email="+em+"&fono="+fon+"&comentarios="+cm)
}

