function requestSubCats() {
    var sId = document.getElementById("cat_id").value;
    var oXmlHttp = zXmlHttp.createRequest();
    oXmlHttp.open("get", "get_sub_by_cat_nav.php?id=" + sId, true);
    oXmlHttp.onreadystatechange = function() {
    if (oXmlHttp.readyState == 4) {
        if (oXmlHttp.status == 200) {
            displaySubCats(oXmlHttp.responseText);
        } else {
            displaySubCats("An error occured: " + oXmlHttp.statusText);
        }
    }
    }
    oXmlHttp.send(null);
}

function displaySubCats(sText) {
    var divSubCats = document.getElementById("divSubCats");
    divSubCats.innerHTML = sText;
}