var xmlHttp2;
var xmlHttp3;


function llamadaAjax2(idtipologia,idioma){
	xmlHttp2=GetXmlHttpObject2();
	if (xmlHttp2==null) {
	  alert ("Your browser does not support AJAX!");
	  return;
	} 
	var url="getcustomer.asp";
	url=url+"?idtipologia="+idtipologia+"&idioma="+idioma;
	url=url+"&sid="+Math.random();
	xmlHttp2.onreadystatechange=stateChanged2;
	xmlHttp2.open("GET",url,true);
	xmlHttp2.send(null);
}


function stateChanged2() { 
	var navegador = navigator.appName;
	if (xmlHttp2.readyState==4) { 
		document.getElementById("capa_listado").innerHTML = "";
		document.getElementById("subactividad").style.display = "block";
		document.getElementById("subactividad").innerHTML = xmlHttp2.responseText + "<div style='clear:both;'></div>";
	}
}


function GetXmlHttpObject2()
{
var xmlHttp2=null;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp2=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp2=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    xmlHttp2=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
return xmlHttp2;
}

function llamadaAjax3(idsubtipologia,idioma){
	xmlHttp3=GetXmlHttpObject3();
	if (xmlHttp3==null) {
	  alert ("Your browser does not support AJAX!");
	  return;
	} 
	var url="getcustomer.asp";
	url=url+"?idsubtipologia="+idsubtipologia+"&idioma="+idioma;
	url=url+"&sid="+Math.random();
	xmlHttp3.onreadystatechange=stateChanged3;
	xmlHttp3.open("GET",url,true);
	xmlHttp3.send(null);
}

function stateChanged3() { 
	var navegador = navigator.appName;
	if (xmlHttp3.readyState==4) { 
		//document.getElementById("capa_listado").innerHTML = "";
		//document.getElementById("subactividad").style.display = "block";
		//document.getElementById("subactividad").innerHTML = xmlHttp2.responseText + "<div style='clear:both;'></div>";
		document.getElementById("capa_listado").innerHTML=xmlHttp3.responseText + "<div style='clear:both;'></div>";
	}
}

function GetXmlHttpObject3()
{
var xmlHttp3=null;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp3=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp3=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    xmlHttp3=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
return xmlHttp3;
}
