function setLogin(strText,strColor,strIDBy)
{
  var objText,objIDZone,objIDPasswd,objIDBy;
  try {
	objText = document.getElementById("loginTxt");
    objIDZone = document.getElementById("MemName");
    objIDBy = document.getElementById("idby");
	objIDPasswd = document.getElementById("Password");
  	objText.innerHTML = strText;
	objIDZone.style.backgroundColor = strColor;
	objIDPasswd.style.backgroundColor = strColor;
	objIDBy.value = strIDBy;
  }
  catch (e) { }
  return 0;
}

function VisnPolicy(agree)
  {
    var obj = document.getElementById("PolicyContent");
	if (agree) { obj.style.display="block"; setTimeout("VisnPolicy(false)",10000);}
	else
	{ obj.style.display="none";}
  }

function checkPassportCreate(objfrm)
{
  var msg="",goReg;
  var objMsg = document.getElementById("createCMT");
  var oText = (null==oText)?objMsg.innerText:oText;
  //alert(oText);
  msg += (objfrm.username.value=="")?"·用户名还没有填写，获取护照必须填写用户名。<br/>":"" ;
  msg += (objfrm.username.value!="" && !/^(\d|[a-zA-z_-]|[\u0391-\uFFE5])+$/.test(objfrm.username.value))?"·用户名不合法；<br/>":"" ;
  msg += (objfrm.password.value=="" || objfrm.password2.value=="")?"·密码或确认密码没有填写；<br/>":"" ;
  msg += (objfrm.password.value != objfrm.password2.value)?"·确认密码跟密码不匹配；<br/>":"" ;
  msg += (objfrm.email.value !="" && !/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(objfrm.email.value) )?"·填写的电子邮件地址不正确，可以选择不填写该项。<br/>":"" ;
  msg += (objfrm.mobilenum.value !="" && !/^((\(\d{2,3}\))|(\d{3}\-))?13\d{9}$/.test(objfrm.mobilenum.value) )?"·填写的手机号码不正确，可以选择不填写该项。<br/>":"" ;
  msg += (!objfrm.policy.checked)?"·您必须同意注册说明(条款)，才能继续获取VISN护照。<br/>":"" ;
  goReg = (msg.length>3)?false:true;
  if (!goReg) {
   objMsg.innerHTML="<font color=#990000>注册过程中，出现以下错误<br/><hr color=gray size=1 noshade width='70%' align='left'/>"+msg+"</font>";
   return (msg.length>3)?false:true;
  }
  else
  {
   objMsg.innerText = oText;
  }
}