function RegistMemberPageControl(Nick,Password,ValidatePassword,TrueName,Sex,Post,Email,Tel_Country,Tel_City,Tel,Fax_Country,Fax_City,Fax,Handset,CorporationType,CompanyName,selCountry_hill,optionProvince,selProvince_hill,txtProvince_hill,optionCity,selCity_hill,txtCity_hill,selCounty_hill,RosecutionAddress,RosecutionCallingType,Direction,SellProduct,BuyProduct, btnNext,MemberType)
{
  //start: property
  this.Nick = Nick;
  this.Password = Password;
  this.ValidatePassword = ValidatePassword;
  this.TrueName = TrueName;
  this.Sex = Sex;
  this.Post = Post;
  this.Email = Email;
  this.Tel_Country = Tel_Country;
  this.Tel_City = Tel_City;
  this.Tel = Tel;
  this.Fax_Country = Fax_Country;
  this.Fax_City = Fax_City;
  this.Fax = Fax;
  this.Handset = Handset;
  
  this.QQ=QQ;
  this.MSN=MSN;
  
  this.CorporationType = CorporationType;
  this.CompanyName = CompanyName;
  this.SelCountry = selCountry_hill;
  this.OptionProvince = optionProvince;
  this.SelProvince = selProvince_hill;
  this.TxtProvince = txtProvince_hill;
  this.OptionCity = optionCity;
  this.SelCity = selCity_hill;
  this.TxtCity = txtCity_hill;
  this.SelCounty = selCounty_hill;
  this.RosecutionAddress = RosecutionAddress;
  this.RosecutionCallingType = RosecutionCallingType;
  this.Direction = Direction;
  this.MemberType = MemberType;
  this.SellProduct = SellProduct;
  this.BuyProduct = BuyProduct;
  this.BtnNext = btnNext;
  //end: property

  //start: method
  this.Init = InitPageControl;
  //end: method
}

function InitPageControl()
{
  var getElement = document.getElementsByTagName("Input");

  for (var i=0; i<getElement.length; i++)
  {
  	var s = getElement[i];
  	var target = getElement[i].parentElement.parentElement.childNodes[4];
  	if (s.className == "PageControl")
  	{
  	  if ( (target.tagName == "TD") && s.getAttribute("NormalMessage") != null )
  	  {
  	    target.innerHTML = s.getAttribute("NormalMessage");
  	    target.className = "note";
  	    s.onfocus = _GetFocus;
  	    s.onblur = _LostFocus;
  	  }
  	}
  }

  document.getElementById("btnNext").onclick = _SendRegist;
}

function _GetFocus()
{
  var target = event.srcElement;
  if (target.getAttribute("NormalMessage") && target.getAttribute("ErrorMessage") && target.getAttribute("Validate"))
  {
    target.parentElement.parentElement.childNodes[4].innerHTML = target.getAttribute("NormalMessage");
    target.parentElement.parentElement.childNodes[4].className = "notetrue";
    target.parentElement.parentElement.childNodes[0].innerHTML = "";
  }
}

function _LostFocus()
{
	var target = event.srcElement;

	switch (target.id)
	{
	  case "Nick" :
	    _CheckNick();
	    break;
	  case "Password" :
	    _CheckPassword();
	    break;
	  case "ValidatePassword" :
	    _CheckValidatePassword();
	    break;
	  case "TrueName" :
	    _CheckTrueName();
	    break;
	  case "Post" :
	    _CheckPost();
	    break;
	  case "Email" :
	    _CheckEmail();
	    break;
	  case "Tel" :
	    _CheckTel();
	    break;
	  case "Tel_Country" :
	    _CheckTel();
	    break;
	  case "Tel_City" :
	    _CheckTel();
	    break;
	  case "Fax" :
	    _CheckFax();
	    break;
	  case "Fax_Country" :
	    _CheckFax();
	    break;
	  case "Fax_City" :
	    _CheckFax();
	    break;
	  case "Handset" :
	    _CheckHandset();
	    break;
	  case "CompanyName" :
	    _CheckCompanyName();
	    break;
	  case "RosecutionAddress" :
	    _CheckRosecutionAddress();
	    break;
	  case "RosecutionCallingType" :
	    _CheckRosecutionCallingType();
	    break;
	  case "SellProduct" :
	    _CheckSellOrBuyProduct();
	    break;
	  case "BuyProduct" :
	    _CheckSellOrBuyProduct();
	    break;
	  default:
	    break;
	}
}

function _CheckAllData()
{
  var checkNick = _CheckNick();
  if (checkNick == false)
  {
    _ShowErrorMessage(this.Nick);
  }

  var checkPassword = _CheckPassword();
  if (checkPassword == false)
  {
    _ShowErrorMessage(this.Password);
  }

  var checkValidatePassword = _CheckValidatePassword();
  if (checkValidatePassword == false)
  {
    _ShowErrorMessage(this.ValidatePassword);
  }

  var checkTrueName = _CheckTrueName();
  if (checkTrueName == false)
  {
    _ShowErrorMessage(this.TrueName);
  }

  var checkPost = _CheckPost();
  if (checkPost == false)
  {
    _ShowErrorMessage(this.Post);
  }

  var checkEmail = _CheckEmail();
  if (checkEmail == false)
  {
    _ShowErrorMessage(this.Email);
  }

  var checkTel = _CheckTel();
  if (checkTel == false)
  {
    _ShowErrorMessage(this.Tel);
  }

  var checkFax = _CheckFax();
  if (checkFax == false)
  {
    _ShowErrorMessage(this.Fax);
  }

  var checkHandset = _CheckHandset();
  if (checkHandset == false)
  {
    _ShowErrorMessage(this.Handset);
  }

  var checkCompanyName = _CheckCompanyName();
  if (checkCompanyName == false)
  {
    _ShowErrorMessage(this.CompanyName);
  }

  var checkRosecutionAddress = _CheckRosecutionAddress();
  if (checkRosecutionAddress == false)
  {
    _ShowErrorMessage(this.RosecutionAddress);
  }

  var checkRosecutionCallingType = _CheckRosecutionCallingType();
  if (checkRosecutionCallingType == false)
  {
    _ShowErrorMessage(this.RosecutionCallingType);
  }

  var checkSellOrBuyProduct = _CheckSellOrBuyProduct();
  if (checkSellOrBuyProduct == false)
  {
    _ShowErrorMessage(this.SellProduct);
  }
  //var checkCountryProvinceCityCounty = _CheckCountryProvinceCityCounty();
  //var checkSex = _CheckSex();

  var checkResult = false;
  checkResult = (checkNick && checkPassword && checkValidatePassword && checkTrueName && checkPost &&
  checkEmail && checkTel && checkFax && checkHandset && checkCompanyName && checkRosecutionAddress &&
  checkRosecutionCallingType && checkSellOrBuyProduct && checkSellOrBuyProduct);

  return checkResult;
}

//显示指定控件的错误提示信息
function _ShowErrorMessage(source)
{
  var target = source.parentElement.parentElement;
  target.childNodes[4].innerHTML = "<img src='../images/icon_valid_noteawake_16x16.gif'>" + source.getAttribute("ErrorMessage");
  target.childNodes[0].innerHTML = "";
  target.childNodes[4].className = "noteawoke";
}

//提交
function _SendRegist()
{
	var checkReturn = false;

	if (_CheckAllData() == false)
	{
		checkReturn = false;
		return;
	}
	
	var docTemp = new ActiveXObject("Microsoft.XMLDOM");
	
	//头文件
	var headFile = docTemp.createProcessingInstruction("xml", "version='1.0' encoding='utf-8'");
    docTemp.appendChild(headFile);
    
    var root = docTemp.createElement("RegistMember");
    
    //昵称
    var nick = docTemp.createElement("Nick");
    nick.text = document.getElementById("Nick").value;
    root.appendChild(nick);
    
    //密码
    var password = docTemp.createElement("Password");
    password.text = document.getElementById("Password").value;
    root.appendChild(password);
    
    //真实姓名
    var trueName = docTemp.createElement("TrueName");
    trueName.text = document.getElementById("TrueName").value;
    root.appendChild(trueName);
    
    //性别
    var sex = docTemp.createElement("Sex");
    sex.text = GetRadio("Sex");
    root.appendChild(sex);
    
    //职务
    var post = docTemp.createElement("Post");
    post.text = document.getElementById("Post").value;
    root.appendChild(post);
    
    //邮箱
    var email = docTemp.createElement("Email");
    email.text = document.getElementById("Email").value;
    root.appendChild(email);
    
    //电话
    var tel = docTemp.createElement("Tel");
    tel.text = document.getElementById("Tel_Country").value + "," + document.getElementById("Tel_City").value + "," + document.getElementById("Tel").value;
    root.appendChild(tel);
    
    //传真
    var fax = docTemp.createElement("Fax");
    fax.text = document.getElementById("Fax_Country").value + "," + document.getElementById("Fax_City").value + "," + document.getElementById("Fax").value;
    root.appendChild(fax);
    
    //手机
    var handset = docTemp.createElement("Handset");
    handset.text = document.getElementById("Handset").value;
    root.appendChild(handset);
    
    //QQ
    var qq = docTemp.createElement("QQ");
    qq.text = document.getElementById("QQ").value;
    root.appendChild(qq);
    
    //MSN
    var msn = docTemp.createElement("MSN");
    msn.text = document.getElementById("MSN").value;
    root.appendChild(msn);
    
    //企业类型
    var corporationType = docTemp.createElement("CorporationType");
    corporationType.text = GetRadio("CorporationType");
    root.appendChild(corporationType);
    
    //企业名称
    var companyName = docTemp.createElement("CompanyName");
    companyName.text = document.getElementById("CompanyName").value;
    root.appendChild(companyName);
    
    //国家
    var selCountry = document.getElementById("selCountry_hill");
    
    var countryID = docTemp.createElement("CountryID");
    countryID.text = selCountry.options[selCountry.selectedIndex].value;
    root.appendChild(countryID);
    
    var countryName = docTemp.createElement("CountryName");
    countryName.text = selCountry.options[selCountry.selectedIndex].text;
    root.appendChild(countryName);
    
    //省
    var selProvince = document.getElementById("selProvince_hill");
    var strProvinceName;
    var strProvinceID;
    
    if (selProvince.style.display == '')
    {
		strProvinceID = selProvince.options[selProvince.selectedIndex].value;
		strProvinceName = selProvince.options[selProvince.selectedIndex].text;
    }
    else
    {
        strProvinceID = "-1";
        strProvinceName = document.getElementById("txtProvince_hill").value;
    }
    
    var provinceID = docTemp.createElement("ProvinceID");
    provinceID.text = strProvinceID;
    root.appendChild(provinceID);
    
    var provinceName = docTemp.createElement("ProvinceName");
    provinceName.text = strProvinceName;
    root.appendChild(provinceName);
    
    //市
    var selCity = document.getElementById("selCity_hill");
    var strCityName;
    var strCityID;
    
    if (selCity.style.display == '')
    {
		strCityID = selCity.options[selCity.selectedIndex].value;
		strCityName = selCity.options[selCity.selectedIndex].text;
    }
    else
    {
        strCityID = "-1";
        strCityName = document.getElementById("txtCity_hill").value;
    }
    
    var cityID = docTemp.createElement("CityID");
    cityID.text = strCityID;
    root.appendChild(cityID);
    
    var cityName = docTemp.createElement("CityName");
    cityName.text = strCityName;
    root.appendChild(cityName);
    
    
    //县
    var selCounty = document.getElementById("selCounty_hill");
    var strCountyName;
    var strCountyID;
    
    if (selCounty.style.display == '')
    {
		strCountyID = selCounty.options[selCounty.selectedIndex].value;
		strCountyName = selCounty.options[selCounty.selectedIndex].text;
    }
    else
    {
        strCountyID = "-1";
        strCountyName = "";
    }
    
    var countyID = docTemp.createElement("CountyID");
    countyID.text = strCountyID;
    root.appendChild(countyID);
    
    var countyName = docTemp.createElement("CountyName");
    countyName.text = strCountyName;
    root.appendChild(countyName);
    
    //经营地址
    var rosecutionAddress = docTemp.createElement("RosecutionAddress");
    rosecutionAddress.text = document.getElementById("RosecutionAddress").value;
    root.appendChild(rosecutionAddress);
    
    //经营行业
    var rosecutionCallingType = docTemp.createElement("RosecutionCallingType");
    rosecutionCallingType.text = document.getElementById("RosecutionCallingType").value;
    root.appendChild(rosecutionCallingType);
    
    //经营方向
    var direction = docTemp.createElement("Direction");
    direction.text = GetRadio("Direction");
    root.appendChild(direction);
    
    //销售产品
    var sellProduct = docTemp.createElement("SellProduct");
    sellProduct.text = document.getElementById("SellProduct").value;
    root.appendChild(sellProduct);
    
    //购买产品
    var buyProduct = docTemp.createElement("BuyProduct");
    buyProduct.text = document.getElementById("BuyProduct").value;
    root.appendChild(buyProduct);
    
	//会员级别
    var memberType = docTemp.createElement("MemberType");
    memberType.text = GetRadio("MemberType");
    root.appendChild(memberType);
	
    //添加根节点
    docTemp.appendChild(root);
    
    
    var pageUrl = "/ProcessXML/GetXml.aspx";
	var xmlRequest = new ActiveXObject("Microsoft.XMLHTTP");
	xmlRequest.Open("POST", pageUrl, false)
	xmlRequest.send(docTemp);
	
	var strResponseText = xmlRequest.responseText;

	if (strResponseText == "成功")
	{
	  window.location.replace('Activation.aspx');
	}
	else
	{
	  alert(strResponseText);
	}
}

//<验证函数>
function _CheckCountryProvinceCityCounty()
{
  var checkResult = false;

  if (this.SelCountry.options[this.SelCountry.selectedIndex].value = '')
  {
	  checkResult = false;
  }
  else
  {
  	if (this.SelProvince.value != '')
  	{
  	  if (this.SelCity.value != '')
  	  {
  	    if (this.SelCounty.value != '')
  		{
  		  checkResult = true;
  		}
  		else
  		{
  		  checkResult = false;
  		}
  	  }
  	  else
  	  {
  	    if (this.TxtCity.value != '')
  		{
  		  checkResult = true;
  		}
  		else
  		{
  		  checkResult = false;
  		}
  	  }
  	}
  	else
  	{
  	  if (this.TxtProvince.value != '')
  	  {
  	    if (this.TxtCity.value != '')
  		{
  		  checkResult = true;
  		}
  		else
  		{
  		  checkResult = false;
  		}
  	  }
  	  else
  	  {
  	    checkResult = false;
  	  }
  	}

	var target = this.SelCountry.parentElement.parentElement;
    if (checkResult == true)
    {
      target.childNodes[4].innerHTML = "选择正确";
  	  target.childNodes[0].innerHTML = "";
  	  target.childNodes[4].className = "note";
    }
    else
    {
      target.childNodes[4].innerHTML = "请选择所在地信息";
  	  target.childNodes[0].innerHTML = "<img src='../images/icon_valid_right_19x19.gif'>";
  	  target.childNodes[4].className = "noteawoke";
    }
  }

  return checkResult;
}

//验证性别
function _CheckSex()
{
  var checkResult = false;
  var target = this.Sex.parentElement.parentElement;
  if (this.Sex.selectedIndex != null)
  {
    target.childNodes[4].innerHTML = "";
  	target.childNodes[0].innerHTML = "<img src='../images/icon_valid_right_19x19.gif'>";
  	target.childNodes[4].className = "note";

  	checkResult = true;
  }
  else
  {
    target.childNodes[4].innerHTML = "请选择性别";
  	target.childNodes[0].innerHTML = "";
  	target.childNodes[4].className = "noteawoke";
  }

  return checkResult;
}

//验证电话号码
function _CheckTel()
{
  var country = this.Tel_Country.value;
  var cityCode = this.Tel_City.value;
  var tel = this.Tel.value;
  var target = this.Tel.parentElement.parentElement;

  var checkResult = false;

  if (_CheckTelCountry(country) == true && _CheckTelCity(cityCode) == true && _CheckTelByCode(tel) == true)
  {
    this.Tel.parentElement.parentElement.childNodes[4].innerHTML = "填写正确";
    target.childNodes[0].innerHTML = "<img src='../images/icon_valid_right_19x19.gif'>";
	this.Tel.parentElement.parentElement.childNodes[4].className = "note";

    checkResult = true;
  }
  else
  {
    if (this.Tel.value != "")
	  {
      this.Tel.parentElement.parentElement.childNodes[4].innerHTML = "电话号码格式错误";
      target.childNodes[0].innerHTML = "";
	    this.Tel.parentElement.parentElement.childNodes[4].className = "noteawoke";
  	}
  	else
  	{
  	  this.Tel.parentElement.parentElement.childNodes[4].innerHTML = this.Tel.getAttribute("NormalMessage");
  	  this.Tel.parentElement.parentElement.childNodes[4].className = "note";
  	}
  }

  return checkResult;
}

//验证传真号码
function _CheckFax()
{
  var country = this.Fax_Country.value;
  var cityCode = this.Fax_City.value;
  var fax = this.Fax.value;
  var target = this.Fax.parentElement.parentElement;

  var checkResult = false;

  if (_CheckTelCountry(country) == true && _CheckTelCity(cityCode) == true && _CheckTelByCode(fax) == true)
  {
    this.Fax.parentElement.parentElement.childNodes[4].innerHTML = "填写正确";
    target.childNodes[0].innerHTML = "<img src='../images/icon_valid_right_19x19.gif'>";
	this.Fax.parentElement.parentElement.childNodes[4].className = "note";

    checkResult = true;
  }
  else
  {
    if (this.Fax.value != "")
  	{
  	  this.Fax.parentElement.parentElement.childNodes[4].innerHTML = "传真号码格式错误";
  	  target.childNodes[0].innerHTML = "";
  	  this.Fax.parentElement.parentElement.childNodes[4].className = "noteawoke";
  	}
  	else
  	{
  	  this.Fax.parentElement.parentElement.childNodes[4].innerHTML = this.Fax.getAttribute("NormalMessage");
  	  this.Fax.parentElement.parentElement.childNodes[4].className = "note";
  	}
  }

  return checkResult;
}

//验证电话号码前国家号码
function _CheckTelCountry(countryCode)
{
  var regCountry = "^[0-9-\/]+$";
  
  var reg = new RegExp(regCountry);
  var checkResult = false;

  if (reg.test(countryCode))
  {
    checkResult = true;
  }

  return checkResult;
}

//验证电话号码前区号
function _CheckTelCity(cityCode)
{
  var regTelCity = "^[0-9-\/]+$";
  
  var reg = new RegExp(regTelCity);
  var checkResult = false;

  if (reg.test(cityCode))
  {
    checkResult = true;
  }

  return checkResult;
}

//验证电话号码中号码部分
function _CheckTelByCode(tel)
{
  var regTelByCode = "^[0-9-\/ ]+$";
  
  var reg = new RegExp(regTelByCode);
  var checkResult = false;

  if (reg.test(tel))
  {
    checkResult = true;
  }

  return checkResult;
}

//验证经营行业
function _CheckRosecutionCallingType()
{
  var checkResult = false;

  if (this.RosecutionCallingType.value == '')
  {
  	this.RosecutionCallingType.parentElement.parentElement.childNodes[4].innerHTML = this.RosecutionCallingType.getAttribute("ErrorMessage");
  	this.RosecutionCallingType.parentElement.parentElement.childNodes[4].className = "noteawoke";

  	checkResult = false;
  }
  else
  {
    this.RosecutionCallingType.parentElement.parentElement.childNodes[4].innerHTML = "选择正确";
  	this.RosecutionCallingType.parentElement.parentElement.childNodes[4].className = "note";

  	checkResult = true;
  }

  return checkResult;
}

//验证用户名
function _CheckNick()
{
	var nick = this.Nick;
	var checkReturn = _CheckTextBox(nick);
	var checkReturn2 = false;
	var checkReturn3 = false;
	if(checkReturn == true)
	{
		checkReturn2 = CheckUserRepeat(nick,"UserName","该用户名已被注册，请重新填写其它用户名！");
	}
	if(checkReturn2 == true)
	{
		checkReturn3 = CheckUserRepeat(nick,"FilterUserName","该用户名为系统保留名称，请填写其它用户名再试！");
	}
	return checkReturn3;
}

//验证密码
function _CheckPassword()
{
  var password = this.Password;
  var checkReturn = _CheckTextBox(password);

  return checkReturn;
}

//再次验证密码
function _CheckValidatePassword()
{
  var validatePassword = this.ValidatePassword;
  var password = this.Password;

  var checkReturn = _CheckTextBox(validatePassword);

  if (validatePassword.value != password.value)
  {
    checkReturn = false;
  	var target = validatePassword.parentElement.parentElement.childNodes[4];
  	target.innerHTML = "<img src='../images/icon_valid_noteawake_16x16.gif'>" + validatePassword.getAttribute("ErrorMessage");
  	target.className = "noteawoke";
  }

  return checkReturn;
}

//验证真实姓名
function _CheckTrueName()
{
  var trueName = this.TrueName;
  var checkReturn = _CheckTextBox(trueName);

  return checkReturn;
}

//验证职位
function _CheckPost()
{
  var post = this.Post;
  var checkReturn = _CheckTextBox(post);

  return checkReturn;
}

//验证电子邮箱
function _CheckEmail()
{
  var email = this.Email;
  var checkReturn = _CheckTextBox(email);
  var checkReturn2 = false;
  if(checkReturn == true)
  {
	checkReturn2 = CheckUserRepeat(email,"Email","该Email信箱已被注册，请重新填写其它Email信箱！");
  }

  return checkReturn2;
}

//验证手机号码
function _CheckHandset()
{
  var handset = this.Handset;
  var checkReturn = _CheckTextBox(handset);

  return checkReturn;
}

//验证企业名称
function _CheckCompanyName()
{
  var companyName = this.CompanyName;
  var checkReturn = _CheckTextBox(companyName);
  var checkReturn2 = false;
  var checkReturn3 = false;
  if(checkReturn == true)
  {
	checkReturn2 = CheckUserRepeat(companyName,"Company","该公司名已被注册，请填写其它公司名称（如果发生公司重名现象，请与我们联系）！");
  }
  if(checkReturn2 == true)
  {
	checkReturn3 = CheckUserRepeat(companyName,"BlackCompany","该公司名称已被系统禁止注册,如有疑问请与我公司客服部联系！");
  }

  return checkReturn3;
}

//验证经营地址
function _CheckRosecutionAddress()
{
  var rosecutionAddress = this.RosecutionAddress;
  var checkReturn = _CheckTextBox(rosecutionAddress);

  return checkReturn;
}

//验证销售产品、采购产品
function _CheckSellOrBuyProduct()
{
  var sellProduct = this.SellProduct;
  var buyProduct = this.BuyProduct;

  var checkReturn = false;

  if (sellProduct.value != "" || buyProduct.value != "")
  {
    checkReturn = true;
  	sellProduct.parentElement.parentElement.childNodes[4].innerHTML = "填写正确";
  	sellProduct.parentElement.parentElement.childNodes[4].className = "note";
  }
  else
  {
    checkReturn = false;
  	sellProduct.parentElement.parentElement.childNodes[4].innerHTML = "<font color=red>必须提供一项采购或者供应信息</font>";
  	sellProduct.parentElement.parentElement.childNodes[4].className = "noteawoke";
  }

  return checkReturn;
}
//</验证函数>

function _CheckTextBox(source)
{
  var checkReturn = false;

  if ((source == null) || (!source))
  {
	  return checkReturn;
  }

  if (! (source.getAttribute("Validate") && source.getAttribute("NormalMessage") && source.getAttribute("ErrorMessage") ) )
  {
  	return checkReturn;
  }

  if (!source.parentElement.parentElement.childNodes[4])
  {
	  return checkReturn;
  }

  var reg = new RegExp(source.getAttribute("Validate"));

  var target = source.parentElement.parentElement.childNodes[4];

  if (!reg.test(source.value))
  {
    if (source.value == "")
  	{
  	  target.innerHTML = source.getAttribute("NormalMessage");
  	  target.className = "note";
  	}
  	else
  	{
  	  target.innerHTML = "<img src='../images/icon_valid_noteawake_16x16.gif'>" + source.getAttribute("ErrorMessage");
  	  target.className = "noteawoke";
  	}
  }
  else
  {
  	target.innerHTML = "填写正确";
  	source.parentElement.parentElement.childNodes[0].innerHTML = "<img src='../images/icon_valid_right_19x19.gif'>";
  	target.className = "note";

  	checkReturn = true;
  }

  return checkReturn;
}

function CheckUserRepeat(source,type,errorstring)
{
	var checkReturn = false;
	
	var strUrl = "http://www.m669.com/Member/CheckRegistUserControl.aspx?str=" + source.value + "&type=" + type;
	var xmlRequest = new ActiveXObject("Microsoft.XMLHTTP");
	xmlRequest.Open("GET",strUrl,false);
	xmlRequest.send(source.value);
          
    var blnReturn = xmlRequest.responseText;

	var target = source.parentElement.parentElement.childNodes[4];
	
	if(blnReturn == "false")
	{
		if (source.value == "")
  		{
  			target.innerHTML = source.getAttribute("NormalMessage");
  			target.className = "note";
  		}
  		else
  		{
  			source.parentElement.parentElement.childNodes[0].innerHTML = "";
  			target.innerHTML = "<img src='../images/icon_valid_noteawake_16x16.gif'>" + errorstring;
  			target.className = "noteawoke";
  		}
	}
	else
	{
  		target.innerHTML = "填写正确";
  		source.parentElement.parentElement.childNodes[0].innerHTML = "<img src='../images/icon_valid_right_19x19.gif'>";
  		target.className = "note";
  		checkReturn = true;
	}
	return checkReturn;
}

//获取radio控件值
function GetRadio(str)
{
	var strTemp="";
	if(str!=null && str!="")
	{
		var obj = document.getElementsByName(str);
		for(var i=0;i<obj.length;i++)
		{
			if(obj[i].checked==true)
			{
				strTemp = obj[i].value;
			}
		}
	}
	return strTemp;
}