var fee = {};
fee.xhr = {};

fee.xhr.getSessSave = function(req){
	if(req.readyState == 4){
		if(req.status == 200){

			var totalfee = req.responseText;

//			if(totalfee == 200) return alert("µî·Ï µÇ¾ú½À´Ï´Ù.");
//			else return alert("Àß¸ø µî·Ï µÇ¾ú½À´Ï´Ù.");
		
//			return document.order_form.order_fee.value = totalfee;
		}else{
			alert("Error!"+req.status);
		}
	}
}

fee.xhr.getSessData = function(){

	var query = "/html/corp_menu/" + cMemName + "_session_save.php";

	var param = "&cMemID=" + getID();



	new ajax.xhr.Request(query, param, fee.xhr.getSessSave, "POST");
}

 

function getSessSave(){
	if(getID() != "") fee.xhr.getSessData();
}


 



function getInterPark(name)
{
 

	cookie_str = document.cookie;

    cookie_str.toString();
	pos_start  = cookie_str.indexOf(name);
	pos_end    = cookie_str.indexOf('=', pos_start);
	cookie_name = cookie_str.substring(pos_start, pos_end);
	
	pos_start  = cookie_str.indexOf(name);
	pos_start  = cookie_str.indexOf('=', pos_start);
	pos_end    = cookie_str.indexOf(';', pos_start);
  
	if (pos_end <= 0) pos_end = cookie_str.length;
  
	cookie_val = cookie_str.substring(pos_start + 1, pos_end);

	return cookie_val;
}


function getID(){
	var rst = getInterPark(cMemName + "ID");

	if(rst == "undefined") rst = "";
	if(!isNaN(rst)) rst = "";
	return rst;
}

getSessSave();