/** qqr_sr標準用 PS:url(網址);str_col(html id字串);str_ret(欄位字串);str_def(預設值字串);
 * Value query special.(with qqr_sr)
 */
function return_qqr_sr(url, str_col, str_ret, str_def)
{
	url += '&act=sr&col='+str_col+'&ret='+str_ret;
	var ids, vals, defs, str = "";
	ids = str_col.split(',');
	vals = str_ret.replace(/\./g, '_').split(',');
	defs = str_def.split(',');
	for (var i = 0; i < ids.length; i++) {
		if (!defs[i]) defs[i] = '';
	}
	//Close Asynchronous Communication (非同步傳輸)
	$.ajaxSetup({ async:false });
	$.get(url, "", function(m) {
		var j = JSON.parse(m);
		if (j[0].result == "false") {
			if (j[0].message) alert(j[0].message);
			for (var i = 0; i < ids.length; i++) {
				str += "$('#"+ids[i]+"').val('"+defs[i]+"');";
			}
			eval(str);
		} else {
			var data = j[0].data[0];
			for (var i = 0; i < ids.length; i++) {
				str += "$('#"+ids[i]+"').val(data."+vals[i]+");";
			}
			eval(str);
		}
	});
	$.ajaxSetup({ async:true });
}