/*  */
function modedb_del_detail(path, sval, mode, ditem, table, fow, deri, demsg) {
	var zmode = $('#SUB_MODE'+fow).val(),subph = $('#SUB_SUBPATH'+fow).val();
	var dform = '#detail_form_'+zmode+fow,sform = '#sub_form_'+zmode+fow;
	var eform = ((zmode == subph) ? dform : sform);
	var txatid = eform+' #edit_'+ditem;
	var loary = JSON.parse(return_language_str(path, sval, mode, '', ''));
	if ($(txatid).val() == 'disabled') {
		if (demsg != '') alert(((loary['U_CAN_NOT_DEL_NOW']) ? loary['U_CAN_NOT_DEL_NOW'] : 'U_CAN_NOT_DEL_NOW')+'!');
	} else {
		var type = false;
		if (demsg == '') {
			type = true;
		} else {
			if (confirm(((loary[demsg]) ? loary[demsg] : demsg))) {
				type = true;
			} else {
				type = false;
			}
		}
		if (type) {
			var url = path+'core/cw5e_engine_detail.php?sid='+sval+'&parent='+EncodeURLutf8(path)+'&mode='+mode+'&ditem='+ditem+'&table='+table+'&fow='+fow+'&deri='+deri+'&act=dblidel';
			url += '&dbtyp='+EncodeURLutf8($('#'+ditem+'_db_list #dblt_type_'+ditem).val())+
				   '&meri='+EncodeURLutf8($(dform+' #ERI').val())+
				   '&teri='+EncodeURLutf8($(dform+' #TEMPERI').val());
			$.get(url, '', 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 {
					$('#'+ditem+'_db_list #dblt_type_'+ditem).val('E');
					detail_pagedb_load(path, sval, mode, ditem, '#'+ditem+'_db_list', fow, '1');
				}
			});
		}
	}
}