try{
    xmlhttp = new XMLHttpRequest();
}catch(ee){
    try{
        xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
    }catch(e){
        try{
            xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
        }catch(E){
            xmlhttp = false;
        }
    }
}
function carrega(id,subsecao) { 

	myRand = parseInt(Math.random()*999999999999999);

	var url="listar-subsecao.php?rand="+myRand+"&idSecao="+id+"&subsecao="+subsecao;
	xmlhttp.open("GET",url,true);
	xmlhttp.setRequestHeader("Cache-Control", "no-store, no-cache, must-revalidate");
    xmlhttp.setRequestHeader("Pragma", "no-cache"); 
	xmlhttp.setRequestHeader('encoding','ISO-8859-1');
		
    xmlhttp.onreadystatechange=function() {
        if (xmlhttp.readyState==4 || xmlhttp.readyState=="complete") {
            document.getElementById('listagem').innerHTML=unescape(xmlhttp.responseText);
        }
    }
    xmlhttp.send(null);
}

