function XMLHttp(){
	var Object;
	if (typeof XMLHttpRequest == "undefined" ) {
		if(navigator.userAgent.indexOf("MSIE 5") >= 0) {
			Object= new ActiveXObject("Microsoft.XMLHTTP");
		} else {
			Object=new ActiveXObject("Msxml2.XMLHTTP");}
	} else {
		Object=new XMLHttpRequest();
	}
	return Object;
}
function _Ajax(params,servidor,destino)
{
	var ajax=XMLHttp();
	
	//alert("params: "+params);
	
	ajax.onreadystatechange=function(){
		
	if(ajax.readyState==4){		
		if(ajax.status==200){
			var respuesta=ajax.responseText;
			respuesta=trim(respuesta);
			
				//mostramos el combobox con los nuevos datos guardados
				document.getElementById(''+destino).innerHTML=respuesta;	
				document.getElementById('CloseSearch').innerHTML='<a href="javascript:listaSearchClose(true);"><img src="js/close.png" align="center" border=0 width=16 height=16></a>';
			
			
		}//fin de condicional if ajax.status==200
			
		}//fin de condicional if ajax.readyState==4
		else{
			//if((imgload==undefined)||(imgload=="")){
			//	document.getElementById(''+destino).innerHTML="Cargando...<br>";
			//}else{
			//	document.getElementById(''+destino).innerHTML='<img src="images/'+imgload+'" align="center">';
			//}
			document.getElementById('CloseSearch').innerHTML='<a href="javascript:void(0);"><img src="js/load.gif" align="center" border=0 width=16 height=16></a>';
		}
		
	}//fin de funcion onReadyState=funtion()
	
	ajax.open("POST",""+servidor,true);
	//ajax.open("POST","prueba2.xml",true);
	
	
	ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
	
	ajax.send(params);
	//return false;
	
	//ajax.send(null);
}

