// JavaScript Document
var req;

function loadXMLDoc(url) 
{
    // branch for native XMLHttpRequest object
    if (window.XMLHttpRequest) {
        req = new XMLHttpRequest();
        //req.onreadystatechange = processReqChange;
        req.open("GET", url, false);
        req.send(null);
    // branch for IE/Windows ActiveX version
    } else if (window.ActiveXObject) {
        req = new ActiveXObject("Microsoft.XMLHTTP");
        if (req) {
            req.onreadystatechange = processReqChange;
            req.open("GET", url, true);
            req.send();
        }
    }
}

function processReqChange() 
{
    if (req.readyState == 4) 
        if (!req.status == 200) 
               alert("There was a problem retrieving the XML data:\n" + req.statusText);        
}

function doDownload(url, node_id, section_id)
{
	var base = "/index.php/corporate/download_software/software_antiriciclaggio?file_node="
	var redirUrl = base + node_id + '&' + 'section_id='+ section_id
	loadXMLDoc(redirUrl);
	window.location.href=url
}
