function isEmail (theStr) 
{
	var atIndex = theStr.indexOf('@');
	var dotIndex = theStr.indexOf('.', atIndex);
	var flag = true;
	theSub = theStr.substring(0, dotIndex+1)
	
	if ((atIndex < 1)||(atIndex != theStr.lastIndexOf('@'))||(dotIndex < atIndex + 2)||(theStr.length <= theSub.length)) 
	{
		return(false); 
	}
	else 
	{ 
	return(true); 
	}
}

function check_regform(theForm)
{
	if (theForm.edtName.value=="" || theForm.edtName.value=="请输入您的姓名")
	{
	  window.alert("请输入您的姓名！");
	  theForm.edtName.focus();
	  return false;
	}
	
	if (theForm.edtEmail.value=="" || theForm.edtEmail.value=="请输入您的邮箱")
	{
	  window.alert("请输入您的邮箱！");
	  theForm.edtEmail.focus();
	  return false;
	}
	
	if (!isEmail(theForm.edtEmail.value))
	{
	  window.alert("请输入正确的邮箱地址！");
	  theForm.edtEmail.focus();
	  return false;
	}
	
	return (true);
}