	function chk_data(tar_action){
		var tar_txt = $("#"+tar_action).val();

		var tar_field = "帳號";
		if(tar_action == "com_account") tar_field = "公司代號";			

		if(tar_txt.length > 5){		
			jQuery.ajax({ type: "GET", url: "/module/chk_data.asp", data: "action=chk_"+ tar_action +"&tar_txt="+ tar_txt, timeout: 5000, dataType: "text", cache: false,
				success: function(xml) {
					if(xml!="ok"){
						var msg = "";
						if(xml=="err"){
							msg += "您的"+ tar_field +"已有，請確認是否之前已經加入或重新設定"+ tar_field +"!!\n";
						}
						if(xml==""){
							msg += "無法檢查您的"+ tar_field +"，請洽系統人員!!\n";
						}
						alert(msg);
						
						/*var span = document.createElement("SPAN");
						span.id = "__ErrorMessagePanel";
						span.style.color = "red";
						span.className = "t04";
						$("#"+tar_action).parentNode.appendChild(span);
						span.innerHTML = this.ErrorMessage[i].replace(/\d+:/,"*");*/

						$("#"+tar_action).val("");
						$("#"+tar_action).focus();
						$("#"+tar_action).val(tar_txt);
					}
				},
				error: function(xml) {
					alert("不明的錯誤，請洽系統人員!!");
					$("#"+tar_action).val("");
					$("#"+tar_action).focus();
					$("#"+tar_action).val(tar_txt);
				}
			});
		}else{
			if(tar_txt.length > 0){
				alert("您的"+ tar_field +"長度不足!!");
				$("#"+tar_action).val("");
				$("#"+tar_action).focus();
				$("#"+tar_action).val(tar_txt);
			}
		}
	}
