function initForum(xmlfile) {
    if (window.XMLHttpRequest) {
        xhttp = new XMLHttpRequest();
    }
    else { // Internet Explorer 5/6
        xhttp = new ActiveXObject("Microsoft.XMLHTTP");
    }

    xhttp.open("GET", xmlfile, false);
    xhttp.send("");
    var nl = xhttp.responseXML.getElementsByTagName("anon");

    for (var i = 0; i < nl.length; i++) {
        var nli = nl.item(i);
        var topic_id = nli.getAttribute("id").toString();
        var topic_title = nli.getAttribute("title").toString();
        var topic_li = document.createElement("li");
        var topic_a = document.createElement("a");
        topic_a.className = (i % 2) ? "c2" : "c1";
        topic_a.setAttribute("target", "_blank");
        topic_a.setAttribute("href", "http://www.forum30.ru/viewtopic.php?t=" + topic_id);
        topic_a.innerHTML = topic_title;
        topic_li.appendChild(topic_a);
        document.getElementById("forum").appendChild(topic_li);
    }
}


