var REQ; //¿äÃ»°´Ã¼¿ë
 
function processMoveItem() 
{
	if (REQ.readyState == 4) {
		// only if "OK"
		if (REQ.status == 200) {
			// moveItem();
		} else {
  			alert("ÀÛ¾÷Áß ¿À·ù°¡ ¹ß»ý Çß½À´Ï´Ù.\n´Ù½Ã ½ÃµµÇØ ÁÖ¼¼¿ä.");
			//alert("ÀÛ¾÷Áß ¿À·ù°¡ ¹ß»ý Çß½À´Ï´Ù.\n´Ù½Ã ½ÃµµÇØ ÁÖ¼¼¿ä." + REQ.statusText);
		}
	}
}


function itemMove(itemArray, area) 
{
	try {
		REQ = new XMLHttpRequest;
	} catch(e) {}

	if(!REQ) 
		try {
			REQ = new ActiveXObject("Msxml2.XMLHTTP");
		} catch(e) {}

	if(!REQ) 
       	try {
  			REQ = new ActiveXObject("Microsoft.XMLHTTP");
		} catch(e) {}

    if(!REQ) alert("È£È¯µÇÁö ¾Ê´Â ºê¶ó¿ìÀú ÀÔ´Ï´Ù.\n");

  	var handlerFunction = processMoveItem;
	REQ.onreadystatechange = handlerFunction;
		  
	//itemArray = this.serialize(itemArray);
	itemArray = escape(itemArray);
		 
	REQ.open("POST", "/edit/adminSetStep.php", true);
  	REQ.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	REQ.send("itemArray="+itemArray+"&area="+area);
}


function boxItemMove(itemArray, box_idxno) 
{
	try {
		REQ = new XMLHttpRequest;
	} catch(e) {}

	if(!REQ) 
		try {
			REQ = new ActiveXObject("Msxml2.XMLHTTP");
		} catch(e) {}

	if(!REQ) 
       	try {
  			REQ = new ActiveXObject("Microsoft.XMLHTTP");
		} catch(e) {}

    if(!REQ) alert("È£È¯µÇÁö ¾Ê´Â ºê¶ó¿ìÀú ÀÔ´Ï´Ù.\n");

  	var handlerFunction = processMoveItem;
	REQ.onreadystatechange = handlerFunction;
		  
	//itemArray = this.serialize(itemArray);
	itemArray = escape(itemArray);
		 
	REQ.open("POST", "./adminSetBoxStep.php", true);
  	REQ.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	REQ.send("itemArray="+itemArray+"&box_idxno="+box_idxno);  	
}

// ¼¼¼Ç°»½Å
var sReq;
function processAutoSessReload() 
{
	if (sReq.readyState == 4) {
		// only if "OK"
		if (sReq.status == 200) {
			// moveItem();
		} else {
  			alert("ÀÛ¾÷Áß ¿À·ù°¡ ¹ß»ý Çß½À´Ï´Ù.\n´Ù½Ã ½ÃµµÇØ ÁÖ¼¼¿ä.");
			//alert("ÀÛ¾÷Áß ¿À·ù°¡ ¹ß»ý Çß½À´Ï´Ù.\n´Ù½Ã ½ÃµµÇØ ÁÖ¼¼¿ä." + REQ.statusText);
		}
	}
}

function autoSessReload() 
{
	try {
		sReq = new XMLHttpRequest;
	} catch(e) {}

	if(!sReq) 
		try {
			sReq = new ActiveXObject("Msxml2.XMLHTTP");
		} catch(e) {}

	if(!sReq) 
       	try {
  			sReq = new ActiveXObject("Microsoft.XMLHTTP");
		} catch(e) {}

    if(!sReq) alert("È£È¯µÇÁö ¾Ê´Â ºê¶ó¿ìÀú ÀÔ´Ï´Ù.\n");

  	var handlerFunction = processAutoSessReload;
	sReq.onreadystatechange = handlerFunction;
		  		 
	sReq.open("POST", "/member/sessionReload.php", true);
  	sReq.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	sReq.send();	
}
