////////////////////////////////////////////////////////////////////////////////////////////
//	¹öÀü	: Ver 1.0.0605101519
//	ÀÛ¼ºÀÚ	: °³¹ßÆÀ ÀÌÈ¿ÁØ
//	ÀÛ¼ºÀÏ	: 2006.05.10
//	¼³¸í	: Microsoft.XMLHTTP¸¦ ÀÌ¿ëÇÑ À¥½ºÅ©·¡ÇÎ
////////////////////////////////////////////////////////////////////////////////////////////
/*
»ç¿ë¿¹Á¦) »óÇ°À» Àå¹Ù±¸´Ï¿¡ ´ä°í °á°ú°ªÀ» ¸®ÅÏÇÔ
try
{
	hr = new HttpRequest();
	hr.method = "GET";
	hr.url = "/Shopping/CartInsert_Mir.asp?PartnerId=emart&PrstCd=DH437FOP050-BK_0LE&ColorCd=151&PrdSize=85&Qty=1";
	alert(hr.response());
}
catch (e)
{
	alert(e);
}
*/
function HttpRequest()
{
	//±âº»Á¤º¸
	this.version = "1.0.0605101519";
	this.name = "HttpRequest";
	this.resultText = "default";

	//¼ÂÆÃÇØ¾ßÇÒ °ª
	this.url	= "";
	this.method = "GET"; //default value

	this.response = function()
	{
		try
		{
			this.method = this.method.toUpperCase();

			if(this.url == "")
			{
				this.resultText = "error:url";
				return "error:url";
			}
			//define cursor type
			document.body.style.cursor = "wait";
			//create object
			var oXMLHTTP = new ActiveXObject("Microsoft.XMLHTTP");
			//Send
			oXMLHTTP.open(this.method, this.url, false);
			if(this.method == "POST")
			{
				oXMLHTTP.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
			}
			oXMLHTTP.send();
			//receive data
			this.resultText = oXMLHTTP.responseText;

			//alert(this.resultText);
			//define cursor type
			document.body.style.cursor = "auto";
			//return result
			return this.resultText;
		}
		catch(e)
		{
			return "error:object"
		}
	}
}