/*  */
function return_cwfeqqr_cr(url, str_col, str_ret, fdne, dform, stype, fdname) {
	url += '&act=sr&col='+str_col+'&ret='+str_ret;
	var ids = str_col.split(','), efd = '', fdnm, 
		rflag = true, strs = '', strc = '', aryc = '';
	//Close Asynchronous Communication (非同步傳輸) 
	$.ajaxSetup({ async:false });
	$.get(url, '', function(m) {
		// console.log(m);
		var pary = JSON.parse(m);
		if (pary[0].result == 'true') {
			if (pary[0].efd) efd = pary[0].efd;
			for (var i = 0; i < ids.length; i++) {
				if ($(dform+' #'+ids[i]).length > 0 && ($(dform+' #'+ids[i]).attr('onchange'))) {
					if (ids[i].match(/_/g) && ids[i].length > 40) {
						fdnm = ids[i].split('_').splice(0,ids[i].match(/_/g).length).join('_');
					} else fdnm = ids[i];
					if (fdname == '') strc += "$('"+dform+" #"+ids[i]+"').change();";
					else {
						aryc = $(dform+' #'+ids[i]).attr('onchange').split(';');
						for (var j = 0; j < aryc.length; j++) {
							if (aryc[j].trim() == '') continue;
							if (fdname != fdnm) {
								if (aryc[j].match('mode_qqrcv_return') != null &&
									aryc[j].match('cwqqr_sr') != null) {
									strs += aryc[j]+';';
								} else if (aryc[j].match('mode_relation_field') != null) {
									if ((rflag) && (efd == '' || efd.match('['+fdnm+']'))) {
										rflag = false;
										strc += aryc[j]+';';
									}
								} else {
									strc += aryc[j]+';';
								}
							}
						}
					}
				}
			}
			if (strs+strc != '') eval(strs+strc);
		}
	});
	$.ajaxSetup({ async:true });
}