// JavaScript Document
var xmlHttp = createXmlHttpRequestObject();

function createXmlHttpRequestObject()
{

var xmlHttp;

if (window.ActiveXObject)
{
	try
		{
			xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e)
			{
				xmlHttp = false;
			}
		}
		else 
		{
			try
			{
				xmlHttp = new XMLHttpRequest();
				}
				catch (e)
				{
					xmlHttp = false;
					}
				}
				if (!xmlHttp)
				
					alert("Error createinsdsd");
					else
						return xmlHttp;
					}
			
			function process(idprov,cliente)
			{
			if (xmlHttp.readyState == 4 || xmlHttp.readyState == 0)
			{
			
			xmlHttp.open("GET","getlocalidades.php?idprov=" + idprov + "&cliente=" + cliente,true);
			
			xmlHttp.onreadystatechange = handleServerResponse;
			
			xmlHttp.send(null);
			}
			}
			
		function handleServerResponse()
		{
		if (xmlHttp.readyState ==4)
		{
			if (xmlHttp.status == 200)
			{
			
				var respuesta = xmlHttp.responseText;			
				
				document.getElementById("divlocalidad").innerHTML = respuesta;
				
				
				}
				}
				}
				