///
///strValue字段值;strFile字段名称;strTableName数据表名;
///spanId元件ID;CorMsg通過的信息;ErrMsg不通過的信息;cz層級如../;
///intLength多長以后開始驗證; inputText name 一般為this
///
function JiaoYan(strValue,strFile,strTableName,spanId,CorMsg,ErrMsg,Cz,intLength)
{	
    if(xmlhttp_member)
    {
		var strSpanId = document.getElementById(spanId);
		if (strValue.length < intLength)
		{
			strSpanId.innerHTML = "";
			return false;
		}
		var strUrl = Cz + "ajax/JiaoYan.aspx?Value=" + strValue + "&File=" + strFile + "&TableName=" + strTableName;
		
        xmlhttp_member.open("GET",strUrl,true);
        xmlhttp_member.onreadystatechange = function()
        {
            if(xmlhttp_member.readyState == 4)
            {
                if (xmlhttp_member.status == 200)
                {
                    var ojber = xmlhttp_member.responseText;
                    if(ojber == "True")
					{
						strSpanId.innerHTML = "<font color=\"red\">" + ErrMsg + "</font>";
					}
					else
					{
						strSpanId.innerHTML = "<font color=\"blue\">" + CorMsg + "</font>";
					}
                }
				else
				{
					strSpanId.innerHTML = "<font color=\"red\">Err:" + xmlhttp_member.status + "</font>";
				}
            }
			else
			{
				strSpanId.innerHTML = "<font color=\"red\">Loading..</font>";
			}
        }
		xmlhttp_member.setRequestHeader("If-Modified-Since","0"); 
        xmlhttp_member.send(null);
    }
}