function objetoAjax(){
	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 pedirDatos(){
	//donde se mostrará el resultado
	divResultado = document.getElementById('cuadro');
	//tomamos el valor de la lista desplegable

    for(i=0;i<document.formulario.radio.length;i++)
        if(document.formulario.radio[i].checked) { 
	//id=document.formulario.radio1.value;
	id=document.formulario.radio[i].value;
	//document.getElementById(’so’). 
//id=document.getElementById('lista').value
	//instanciamos el objetoAjax
	ajax=objetoAjax();
	//archivo que realizará la operacion
	ajax.open("POST", "cuadronoticias.php",true);
	ajax.onreadystatechange=function() {
		if (ajax.readyState==4) {
			//mostrar resultados en esta capa
			divResultado.innerHTML = ajax.responseText
		}
	}
	ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
	//enviando los valores
	ajax.send("idcategoria="+id)

}
}

function pedirDatos1(){
	//donde se mostrará el resultado
	divResultado = document.getElementById('cuadro');
	//tomamos el valor de la lista desplegable
var id;
   	id= 1;
	//document.getElementById(’so’). 
//id=document.getElementById('lista').value
	//instanciamos el objetoAjax
	ajax=objetoAjax();
	//usamos el medoto POST
	//archivo que realizará la operacion
	//datoscliente.php
	ajax.open("POST", "cuadronoticias.php",true);
	ajax.onreadystatechange=function() {
		if (ajax.readyState==4) {
			//mostrar resultados en esta capa
			divResultado.innerHTML = ajax.responseText
		}
	}
	ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
	//enviando los valores
	ajax.send("idcategoria="+id)
}
