/*  */
function change_field_type(field, mtype) {
	switch ($('#T_'+field).val()) {
		case 'EDCOMBOLIST':
			break;
		case 'EDDATEEDIT':
			if ($('#F_'+field).val() == '0') {
				$('#'+field+'_'+mtype).empty();
				$('#'+field+'_'+mtype).append(
					"<input type=\"text\" size=\"12\" id=\"B_"+field+"\" name=\"B_"+field+"\" value=\"\" onClick=\"$(this).datepicker({ dateFormat: 'yy/mm/dd' });$(this).datepicker('show');\" onchange=\"check_result_date($(this));\">"+
					"~"+
					"<input type=\"text\" size=\"12\" id=\"E_"+field+"\" name=\"E_"+field+"\" value=\"\" onClick=\"$(this).datepicker({ dateFormat: 'yy/mm/dd' });$(this).datepicker('show');\" onchange=\"check_result_date($(this));\">"
				);
			} else {
				$('#'+field+'_'+mtype).empty();
				$('#'+field+'_'+mtype).append(
					"<input type=\"text\" size=\"12\" id=\"K_"+field+"\" name=\"K_"+field+"\" value=\"\" onClick=\"$(this).datepicker({ dateFormat: 'yy/mm/dd' });$(this).datepicker('show');\" onchange=\"check_result_date($(this));\">"
				);
			}
			break;
		case 'EDTIMEEDIT':
			if ($('#F_'+field).val() == '0') {
				$('#'+field+'_'+mtype).empty();
				$('#'+field+'_'+mtype).append(
					"<input type=\"text\" size=\"12\" id=\"B_"+field+"\" name=\"B_"+field+"\" value=\"\" onchange=\"check_result_time($(this),$('#F_"+field+"').attr('strlen')); \">"+
					"~"+
					"<input type=\"text\" size=\"12\" id=\"E_"+field+"\" name=\"E_"+field+"\" value=\"\" onchange=\"check_result_time($(this),$('#F_"+field+"').attr('strlen')); \">"
				);
			} else {
				$('#'+field+'_'+mtype).empty();
				$('#'+field+'_'+mtype).append(
					"<input type=\"text\" size=\"12\" id=\"K_"+field+"\" name=\"K_"+field+"\" value=\"\" onchange=\"check_result_time($(this),$('#F_"+field+"').attr('strlen')); \">"
				);
			}
			break;
		case 'EDEDITBTN':
			var ckstr = $('.BTN_'+field).attr('onclick');
			if ($('#F_'+field).val() == '0') {
				$('#'+field+'_'+mtype).empty();
				$('#'+field+'_'+mtype).append(
					"<input type=\"text\" size=\"8\" id=\"B_"+field+"\" name=\"B_"+field+"\" value=\"\">"+
					"<input type=\"button\" class=\"BTN_"+field+"\" btntp=\"B\" value=\"...\" onclick=\""+ckstr+"\">"+
					"~"+
					"<input type=\"text\" size=\"8\" id=\"E_"+field+"\" name=\"E_"+field+"\" value=\"\">"+
					"<input type=\"button\" btntp=\"E\" value=\"...\" onclick=\""+ckstr+"\">"
				);
			} else {
				$('#'+field+'_'+mtype).empty();
				$('#'+field+'_'+mtype).append(
					"<input type=\"text\" size=\"8\" id=\"K_"+field+"\" name=\"K_"+field+"\" value=\"\">"+
					"<input type=\"button\" class=\"BTN_"+field+"\" btntp=\"K\" value=\"...\" onclick=\""+ckstr+"\">"
				);
			}
			break;
		case 'EDNUMERIC':
		case 'EDFLOAT':
		case 'EDNORMAL':
		default:
			if ($('#F_'+field).val() == '0') {
				$('#'+field+'_'+mtype).empty();
				$('#'+field+'_'+mtype).append(
					"<input type=\"text\" size=\"12\" id=\"B_"+field+"\" name=\"B_"+field+"\" value=\"\">"+
					"~"+
					"<input type=\"text\" size=\"12\" id=\"E_"+field+"\" name=\"E_"+field+"\" value=\"\">"
				);
			} else {
				$('#'+field+'_'+mtype).empty();
				$('#'+field+'_'+mtype).append(
					"<input type=\"text\" size=\"12\" id=\"K_"+field+"\" name=\"K_"+field+"\" value=\"\">"
				);
			}
			break;
	}
}