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;
}



var peticion = false; 
if (window.XMLHttpRequest) {
      peticion = new XMLHttpRequest();
      } else if (window.ActiveXObject) {
            peticion = new ActiveXObject("Microsoft.XMLHTTP");
}


function cambiarSel(divID,conten,tipo) { 
if(peticion) {
	
	// alert(divID +"--"+ conten +"--"+ tipo);
     var obj = document.getElementById(divID).value; 
     var contenedor = document.getElementById(conten);
	 var aleatorio=Math.random();
	
	
	 //alert(obj +"--"+ contenedor +"--"+ tipo);
	 peticion.open("GET","cambios.php?id="+obj+"&tipo="+tipo+"&alea="+aleatorio);
		
	
     peticion.onreadystatechange = function()  { 
          if (peticion.readyState == 4) { 
		        //alert(peticion.responseText);
                contenedor.innerHTML = peticion.responseText; 
          } 
     } 
peticion.send(null); 

}
}