/**
 * @loadJson (JSON °øÅë ½ºÅ©¸³Æ®)
 * @version 1.0, 2008-06-03
 * @author Yoon Tae Hyun ( thrukill@hotmail.com )
*/
function loadJson() {
	var xmlHttp;
	var retStr;
	this.Result = getResult;
	this.mget = doRequestUsingGET;
	this.mpost = doRequestUsingPOST;

	function createXMLHttpRequest() {
		if (window.ActiveXObject) {
			xmlHttp = new ActiveXObject('Microsoft.XMLHTTP');
		} else if (window.XMLHttpRequest) {
			xmlHttp = new XMLHttpRequest();
		}
	}
	function handleStateChange() {
	    if(xmlHttp.readyState == 4) {
	        if(xmlHttp.status == 200) {
	        	try {
	        		retStr = xmlHttp.responseText;
	            } catch(e) {}
	        } else if (xmlHttp.status == 404) {
	        	alert('Àß ¸øµÈ ÆäÀÌÁö¸¦ È£ÃâÇÏ¿´½À´Ï´Ù.');
	        }
	    }
	}
	function hangleCheck(value) {
		return escape(value).replace(/\+/g, '%2B');
	}
	function doRequestUsingGET(vStr) {
	    createXMLHttpRequest();
	    xmlHttp.onreadystatechange = handleStateChange;
	    xmlHttp.open('GET', vStr, false);
	    xmlHttp.send(null);
	}
	function doRequestUsingPOST(vUrl, vStr) {
	    createXMLHttpRequest();
	    xmlHttp.open('POST', vUrl, false);
	    xmlHttp.onreadystatechange = handleStateChange;
	    xmlHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	    xmlHttp.send(vStr);
	}
	function getResult() {
		return retStr;
	}
}