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;
    
} 


 function recibeid(laurl,losvalores,veraqui)
{
   var capaContenedora = document.getElementById(veraqui);

ajax=nuevoAjax();
ajax.open("POST", laurl,true);
ajax.onreadystatechange=function() {

         if (ajax.readyState==1) {
         capaContenedora.innerHTML= '<img style="margin:50%;width:32px;height:32px" src="http://www.nueve60.com/ipy/layouts/n60/images/loading.gif">';     
         }
         else if (ajax.readyState==4){
         capaContenedora.innerHTML=  ajax.responseText;     
    }
}
ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
ajax.send(losvalores)        
    }
    
   function checkRaddio(laid){
      var x = 0;
      var value = null;
      while(x<laid.length){
         if(laid[x].checked)value = laid[x].value;
         x++;
      }
      return value == null ? "No hay seleccion" : value;
   }