/*  */
function file_export_detail(path, sval, mode, ditem, field, deri, dform, fow, ptype) {
	loading_create('Y');
	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_export.php?sid='+sval+'&parent='+EncodeURLutf8(path)+'&mode='+mode+'&ditem='+ditem+'&field='+field+'&deri='+deri+'&ptype='+ptype+'&act=exptui';
	url += '&zmode='+zmode+'&zeri='+zeri+'&fow='+fow;
	var djson = (fromid_output_json(dform,'name')).replace(/'/g, "''");
	var verlen = djson.length;
	url += '&verlen='+verlen.toString();
	$.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);
			loading_close('');
			return false;
		} else {
			loading_close('');
			if (ret_msg[0].html_str) {
				setTimeout(function(){
					$('#popup_box').empty().append(ret_msg[0].html_str);
					$('#popup_close').show();
					$('#page_popup').popup();
					$('#page_popup').popup('open', { x: 0, y: 0 });
					//$('#popup_box').enhanceWithin();
				}, 200);
			}
		}
	});
}