function Jugel(theForm)
{
  if (theForm.email.value == "")
  {
    alert("请输入邮箱!");
    theForm.email.focus();
    return (false);
  }
  
  if (theForm.pass.value == "" || theForm.pass.value.length < 6)
  {
    alert("请输入用户密码不能少于6位!");
    theForm.pass.focus();
    return (false);
  }
  
  if (theForm.yzm.value == "")
  {
    alert("请输入验证码!");
    theForm.yzm.focus();
    return (false);
  }
}

function check_m()
{
  obj1=document.getElementById("email");		//获取对象
  obj2=document.getElementById("m_e");
  while(obj2.hasChildNodes())
  {
    obj2.removeChild(obj2.childNodes[0]);
  }
  var pattern=/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/;					//邮箱正则
  if((!pattern.test(obj1.value)) || obj1.value=="")					//如果内容不合法
  {
    sub_t=document.createTextNode("*邮箱格式不合法或者为空");
    obj2.appendChild(sub_t);
  }
}

function check_p()
{
  obj1=document.getElementById("pass");		//获取对象
  obj2=document.getElementById("p_e");
  while(obj2.hasChildNodes())
  {
    obj2.removeChild(obj2.childNodes[0]);
  }
  if(obj1.value=="")					//如果内容不合法
  {
    sub_t=document.createTextNode("*密码不能为空");
    obj2.appendChild(sub_t);
  }
}

function check_y()
{
  obj1=document.getElementById("yzm");		//获取对象
  obj2=document.getElementById("y_e");
  while(obj2.hasChildNodes())
  {
    obj2.removeChild(obj2.childNodes[0]);
  }
  if(obj1.value=="")					//如果内容不合法
  {
    sub_t=document.createTextNode("*验证码不能为空");
    obj2.appendChild(sub_t);
  }
}
