var xmlHttp;
function llamadaAjax(dia,mes,anyo,idioma){
	xmlHttp=GetXmlHttpObject();
	if (xmlHttp==null) {
	  alert ("Your browser does not support AJAX!");
	  return;
	} 
	var url="getcustomer.asp";
	url=url+"?dia="+dia+"&mes="+mes+"&anyo="+anyo+"&idioma="+idioma;
	url=url+"&sid="+Math.random();
	xmlHttp.onreadystatechange=stateChanged;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}


function stateChanged() { 
	var navegador = navigator.appName;
	if (xmlHttp.readyState==4) { 
		//alert(screen.width);
		//alert(screen.height);
		//if (screen.width < 1280 && screen.height < 768){
/*			if (navegador == "Microsoft Internet Explorer") {
				document.getElementById("capa_listado").style.height=500+'px';
			} else {
				if (window.innerHeight) {
					var winH = window.innerHeight;
				} else if (document.documentElement.clientHeight) {
					var winH = document.documentElement.clientHeight;
				} else if (document.body.clientHeight) {
					var winH = document.body.clientHeight;
				}
				var hh = winH;
				document.getElementById("contenido").style.height=hh+'px';
				
			}*/
		//}
		
		document.getElementById("capa_listado").innerHTML=xmlHttp.responseText + "<div style='clear:both;'></div>";
		//setHeight();
	}
}


function GetXmlHttpObject()
{
var xmlHttp=null;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
return xmlHttp;
}


