var xmlHttp;

function createXMLHttpRequest() {
    if (window.ActiveXObject) {
        xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
    }
    else if (window.XMLHttpRequest) {
        xmlHttp = new XMLHttpRequest();
    }
}

function getCommList(seq, ps) {
	var b1 = document.getElementById("comm_btn_1");
	var b2 = document.getElementById("comm_btn_2");

	if (seq == 6)
	{
		b1.src = "/images/main_btn01_on.gif";
		b2.src = "/images/main_btn02.gif";
	}
	else
	{
		b1.src = "/images/main_btn01.gif";
		b2.src = "/images/main_btn02_on.gif";
	}
	
    createXMLHttpRequest();
    xmlHttp.onreadystatechange = function(){handleStateChange_comm()};
    xmlHttp.open("GET", "/inc/exec_getComm.asp?seq="+seq+"&ps="+ps, true);
    xmlHttp.send();
}

function handleStateChange_comm() {
    if(xmlHttp.readyState == 4) {
        if(xmlHttp.status == 200) {
            var txtRes = xmlHttp.responseText;
            document.getElementById("main_contents").innerHTML = txtRes;
        }
    }
}