function checkmod(thisform)
{
	
	if (thisform.username.value=="") 
		{
		alert("请填写用户名！");
		thisform.username.focus();		
		    return (false);
	}

	if (thisform.truename.value=="") 
		{
		alert("请填写真实姓名！");
		thisform.truename.focus();		
		    return (false);
	}

	if (thisform.pwd.value=="") 
		{
		alert("请填写用户密码！");
		thisform.pwd.focus();		
		    return (false);
	}

	if (thisform.pwd2.value=="") 
		{
		alert("请填写确认密码！");
		thisform.pwd2.focus();		
		    return (false);
	}

	if (thisform.pwd2.value!=thisform.pwd.value) 
		{
		alert("两次密码不符！");
		thisform.pwd.focus();		
		    return (false);
	}
	
	if (thisform.usermail.value=="") 
		{
		alert("请填写电子邮件！");
		thisform.usermail.focus();		
		    return (false);
	}

	if (thisform.tel.value=="") 
		{
		alert("请填写个人联系电话！");
		thisform.tel.focus();		
		    return (false);
	}

  strday = thisform.birthyear.value + "-" + thisform.birthmonth.value + "-" + thisform.birthday.value;
//	alert("strday=" + strday);
	if (isInvalidDate(strday, "-") == true)
	{
		alert("请正确填写出生日期（例如:1978-08-12）！");
		thisform.birthyear.focus();
		return (false);
	}

	return true;
}

function isInvalidDate(theDate,separator){
  default_style=1
  if (theDate.length>10 || theDate.length<8)
    return true
  idx1=theDate.indexOf(separator)
  if (idx1==-1)
    return true
  idx2=theDate.indexOf(separator,idx1+1)
  if (idx2==-1)
    return true
  if (isInvalidDate.arguments.length>2)
  	default_style=isInvalidDate.arguments[2]
  if (default_style<1 || default_style>9){
  	alert("传入参数有误！请检查。")
	return true
  }
  if (default_style==1){
  theYear=theDate.substring(0,idx1)
  theMonth=theDate.substring(idx1+1,idx2)
  theDay=theDate.substring(idx2+1)
  }
  if (default_style==2){
  theMonth=theDate.substring(0,idx1)
  theDay=theDate.substring(idx1+1,idx2)
  theYear=theDate.substring(idx2+1)
  }
  if (theDay.length>2)
    return true
  if (parseYMD(theYear,theMonth,theDay)>0)
    return true
  else
    return false
}

function checklogin(thisform)
{
	
	if (thisform.username.value=="") 
	{
		alert("请填写用户名！");
		thisform.username.focus();		
	  return (false);
	}

	if (thisform.userpass.value=="") 
	{
		alert("请填写用户密码！");
		thisform.userpass.focus();		
	  return (false);
	}

	return true;
}

function checkbooking(thisform)
{
	
	if (thisform.username.value=="") 
	{
		alert("请填写用户名！");
		thisform.username.focus();		
	  return (false);
	}

	if (thisform.questions.value=="") 
	{
		alert("请填写要咨询问题简单说明！");
		thisform.questions.focus();		
	  return (false);
	}

	return true;
}
