﻿//XMLHttpRequest 생성
function newXMLHttpRequest()
{
	var reqHttp;
	if(window.ActiveXObject)	//IE
	{
		try
		{
			reqHttp = new ActiceXObject("Msxml2.XMLHTTP");
		}
		catch (e)
		{
			try
			{
				reqHttp = new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e1)
			{
				reqHttp = null;
			}
		}
	}else if(window.XMLHttpRequest)	//IE 이외
	{
		try
		{
			reqHttp = new XMLHttpRequest();
		}
		catch (e)
		{
			reqHttp = null;
		}
	}

	return reqHttp;
}

//예외처리(status != 200)
function exceptionControl(xmlHttp)
{
	var exceptShow = "상태코드:"+xmlHttp.status;
	exceptShow += ", 비정상적으로 종료되었습니다.";
	alert(exceptShow);
}
 
