function nuevoAjax()
{	
    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 servicio(div)
{	var ajax;
	ajax = nuevoAjax();
    ajax.open("POST", "capsulas.php", false);
	ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	ajax.send("capsula="+div);
	document.getElementById('capsula').innerHTML = ajax.responseText;
}

function contadorInc()
{	var ajax;
	ajax = nuevoAjax();
    ajax.open("POST", "contador.php", false);
	ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	ajax.send("contador=true");
	ajax.responseText;

}
