/*  */
function mode_enableck_control(path, sval, mode, txat, dform, ditem, field, meri, fow){
	var zmode = $('#SUB_MODE'+fow).val();
	var zform = '#detail_form_'+zmode+fow;
	var zeri = ($(zform+' #ERI').length > 0 && $(zform+' #ERI').val() != '') ? $(zform+' #ERI').val() : $(zform+' #TEMPERI').val();
	var url = path+'core/cw5e_engine_detail.php?sid='+sval+'&parent='+EncodeURLutf8(path)+'&mode='+mode+'&txat='+txat+'&ditem='+ditem+'&field='+field+'&meri='+meri+'&act=enabck';
	url += '&fow='+fow+'&zmode='+zmode+'&zeri='+zeri;
	var djson = (fromid_output_json(dform,'name')).replace(/'/g, "''");
	var verlen = djson.length;
	url += '&verlen='+verlen.toString();
	// console.log(djson);
	//$.ajaxSetup({ async:false });
	$.post(url, 'htmljson='+EncodeURLutf8(djson), function(msg) {
		// console.log(msg);
		var ret_msg = JSON.parse(msg);
		if (ret_msg[0].result == 'false') {
			alert(ret_msg[0].message);
			return false;
		} else {
			if (ret_msg[0].data) mode_valchange_action(ret_msg[0].data, dform);
		}
	});
}