

	
function contenido_tipo(valor,valor2){


	var contenedor;
	contenedor = document.getElementById("contentTipo");
	ajax=nuevoAjax();
	ajax.open("GET", "ajaxTipoCiudad.asp?idCiudad="+valor+"&tipoCombo="+valor2,true);
	ajax.onreadystatechange=function() {
		
		if (ajax.readyState==4) {
			if(ajax.status==200) {
				contenedor.innerHTML = ajax.responseText  
				
				
				//setTimeout("document.getElementById('ajax_buscando').style.display='none';document.getElementById('ajax_contenido').style.display='block';new Accordian('basic-accordian',5,'header_highlight');",2000);
		
			
			}
		}
	}
	ajax.send(null)
}
// CARGA DIVs con URL
// limbo
// method
function loadDiv(divContainerId, aUrl,valor,valor2) {
    var divContainer = document.getElementById(divContainerId);
	//var html = getUrl(aUrl+valor+"&paramIdInterno="+valor2);
	var html=getUrl(aUrl)
    divContainer.innerHTML = html;
}
function getUrl(URL, callBackMethod, callBackMethodError, username, Password, headers) {
	var objXmlHttpRequest = createXmlHttpRequest();
	objXmlHttpRequest.open("GET", URL, (callBackMethod!=null ? true: false), username, Password);
	if (headers!=null) {
		for (var i=0; i<headers.length; i++) {
			var header = headers[i];
			objXmlHttpRequest.setRequestHeader(header[0], header[1])
		}
	}
	if (callBackMethod!=null) {
		objXmlHttpRequest.onreadystatechange=function() {
			if (objXmlHttpRequest.readyState==4) {
				callBackMethod (objXmlHttpRequest.responseText);
				}
			};
		objXmlHttpRequest.send(null);
	} else {
		objXmlHttpRequest.send(null);
		return objXmlHttpRequest.responseText;
		
	}
	
}

// metodo para crear un objecto XmlHttpRequest
function createXmlHttpRequest () {
	var objXmlHttpRequest;
	/*@cc_on @*/
	/*@if (@_jscript_version >= 5)
	  try {
	  objXmlHttpRequest=new ActiveXObject("Msxml2.XMLHTTP")
	 } catch (e) {
	  try {
	    objXmlHttpRequest=new ActiveXObject("Microsoft.XMLHTTP")
	  } catch (E) {
	   objXmlHttpRequest=false
	  }
	 }
	@else
	 objXmlHttpRequest=false
	@end @*/
	if (!objXmlHttpRequest) {
		try {
			objXmlHttpRequest = new XMLHttpRequest();
		} catch (e) {
			objXmlHttpRequest = false
		}
	}
	return objXmlHttpRequest;
	
}

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;
}



