function createXMLHttpRequest() {
    if (window.ActiveXObject) {
        xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
    } 
    else if (window.XMLHttpRequest) {
        xmlHttp = new XMLHttpRequest();                
    }
}

/* xmlhttp·Î µ¥ÀÌÅÍ¸¦ Àü´Þ¹Þ´Â´Ù.
 * URL           : µ¥ÀÌÅÍ Á¢¼Ó URL
 * Method        : POST/GET
 * Param         : POST¹æ½ÄÀÏ °æ¿ì Àü´ÞÇÒ ÆÄ¶ó¹ÌÅÍ
 * ParamIsXML    : ÆÄ¶ó¹ÌÅÍ¸¦ XML·Î Àü´ÞÇÒÁö ¿©ºÎ
 * IsXMLResult   : °á°ú°¡ XMLÇü½ÄÀÎÁö ¿©ºÎ
 * IsAsync       : ºñµ¿±â¹æ½Ä ¿©ºÎ
 * AsyncFunction : ºñµ¿±â¹æ½ÄÀÏ °æ¿ì È£ÃâµÉ ÇÔ¼ö
 */
function getHttpResponse(URL, Method, Param, ParamIsXML, IsXMLResult, IsAsync, AsyncFunction) {
    var objhttp     = null;
    var objRslt     = null;

    try {
        // XMLHttpRequest °´Ã¼ »ý¼º
        try {
            objhttp = new XMLHttpRequest();
        } catch (trymicrosoft) {
            try {
                objhttp = new ActiveXObject("Msxml2.XMLHTTP");
            } catch (othermicrosoft) {
                try {
                    objhttp = new ActiveXObject("Microsoft.XMLHTTP");
                } catch (failed) {
                    objhttp = null;
                }
            }
        }

        if (objhttp==null) {
            return null;
        }

        // URL ¿ÀÇÂ
        objhttp.open(Method, URL, IsAsync);   // µ¿±â½Ä

        // Çì´õ ¼³Á¤
        if (ParamIsXML) {
            objhttp.setRequestHeader("Content-Type","text/xml");
        } else {
            objhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
        }
        objhttp.setRequestHeader("Cache-Control", "no-cache");
        objhttp.setRequestHeader("Pragma", "no-cache");

        // ºñµ¿±â ¹æ½ÄÀÏ °æ¿ì µ¥ÀÌÅÍ¸¦ ¹ÞÀº ÈÄ È£ÃâµÉ ÇÔ¼ö
        if (IsAsync){
            objhttp.onreadystatechange = function() {
                if (objhttp.readyState==4){
                    if (objhttp.status == 200 || objhttp.status == 304) {
                        if (IsXMLResult) {
                            objRslt = objhttp.responseXML;
                        } else {
                            objRslt = objhttp.responseText;
                        }
                        
                        AsyncFunction(objRslt);
                    }
                }
            }
        }
        
        // È£Ãâ ½ÃÀÛ
        if (Method=="GET" || Param.trim().length==0) {
            objhttp.send(null);
        } else {
            objhttp.send(Param);
        }

        if (!IsAsync) {
            if (IsXMLResult) {
                objRslt = objhttp.responseXML;
            } else {
                objRslt = objhttp.responseText;
            }

            return objRslt;
        }
    } catch (ex) {
    }
}