function GetXmlHttpObject() {
    var xmlHttp = null;
    try {
        xmlHttp = new XMLHttpRequest();
    } catch (e) {
        try {
            xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
        } catch (e) {
            xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
        }
    }
    return xmlHttp;
}

function view_credit_note() {
    var url = "report_supplier_credit_note.php";
    url = url + "?dtfrom=" + document.getElementById('dtfrom').value;
    url = url + "&dtto=" + document.getElementById('dtto').value;    
    url = url + "&rtype=detail";
    
    window.open(url, '_blank');
}