function pripravAJAX() {
    try {
        return new XMLHttpRequest();
    } catch(e) {
        try {
            return new ActiveXObject('Msxml2.XMLHTTP');
        } catch(e) {
            try {
                return new ActiveXObject('Microsoft.XMLHTTP');
            } catch(e) {
                return "Je nutný novější prohlížeč";
            }
        }
    }
}

var xmlHttp = pripravAJAX();
var url = "knihy.xml";
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
var odpoved;
xmlHttp.onreadystatechange = function() {
    if (xmlHttp.readyState == 4) {
        if (xmlHttp.status == 200) {
            odpoved = xmlHttp.responseXML;
            zobrazData(odpoved);
        } else {
            alert(xmlHttp.statusText);
        }
    }
}

function zobrazData(odpoved) {
    var xmlElement = odpoved.getElementsByTagName("kniha");

