var xmlHttp;
var xmlHttp2;
var xmlHttp3;
var xmlHttp4;

function loadText(){
    if (window.XMLHttpRequest){
        xmlHttp = new XMLHttpRequest();
		xmlHttp2 = new XMLHttpRequest();
		xmlHttp3 = new XMLHttpRequest();
		xmlHttp4 = new XMLHttpRequest();
    }else{
        if (window.ActiveXObject){
            xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
			xmlHttp2 = new ActiveXObject("Microsoft.XMLHTTP");
			xmlHttp3 = new ActiveXObject("Microsoft.XMLHTTP");
			xmlHttp4 = new ActiveXObject("Microsoft.XMLHTTP");
        }else{
            xmlHttp = null;
			xmlHttp2 = null;
			xmlHttp3 = null;
			xmlHttp4 = null;
        }
    }
    xmlHttp.onreadystatechange = checkStatus;
    xmlHttp.open("GET", "http://www.pivo-ya.com/leftblock.html", true);

    xmlHttp.send(null);
	
	xmlHttp2.onreadystatechange = checkStatus2;
    xmlHttp2.open("GET", "http://www.pivo-ya.com/headerblock.html", true);

    xmlHttp2.send(null);
	
	xmlHttp3.onreadystatechange = checkStatus3;
    xmlHttp3.open("GET", "http://www.pivo-ya.com/footerblock.html", true);

    xmlHttp3.send(null);
    
    xmlHttp4.onreadystatechange = checkStatus4;
    xmlHttp4.open("GET", "http://www.pivo-ya.com/bbs/bbs.php", true);

    xmlHttp4.send(null);
}

function checkStatus(){
    if (xmlHttp.readyState == 4 && xmlHttp.status == 200){
        var node = document.getElementById("LeftBlock");
        node.innerHTML = xmlHttp.responseText;
    }
}

function checkStatus2(){
    if (xmlHttp2.readyState == 4 && xmlHttp2.status == 200){
        var node = document.getElementById("Header");
        node.innerHTML = xmlHttp2.responseText;
    }
}

function checkStatus3(){
    if (xmlHttp3.readyState == 4 && xmlHttp3.status == 200){
        var node = document.getElementById("Footer");
        node.innerHTML = xmlHttp3.responseText;
    }
}

function checkStatus4(){
    if (xmlHttp4.readyState == 4 && xmlHttp4.status == 200){
        var node = document.getElementById("bbsblock");
        node.innerHTML = xmlHttp4.responseText;
    }
}

