// JavaScript Document
function checkFormmem()
{
	//验证用户名
	var username=document.form1.txt1.value; 
	if (username.length==0)	
	{
			alert("用户名不能为空！");
			return;
	}

	//验证密码
	var password=document.form1.txt2.value; 
	if ((password.length<6) || (password.length>16))
	{
		if (password.length==0)	
		{
			alert("密码必须填写！");
			return;
		}
		else
		alert("密码不能少于6个字符大于16个字符！");
		return;
	}
		//检查两次输入的密码是否相同
	var cpassword=document.form1.txt21.value; 
	if (cpassword.length==0)
	{
		alert("请确认您的密码！");
		return;
	}
	if (password!=cpassword)
	{
		alert("两次输入的密码不同");
		return;
	}
	
	
	//验证问题
	var txt3=document.form1.txt3.value; 
	if (txt3.length==0)	
	{
			alert("真实姓名不能为空！");
			return;
	}
	
	//验证答案
	var txt4=document.form1.txt4.value; 
	if (txt4.length==0)	
	{
			alert("公司名称不能为空！");
			return;
	}
	
		//电话号码
	var mphone=document.form1.txt6.value;
	if (mphone.length == 0)
	{
		alert("电话号码必须填写！");
		return;
	}
	for(i = 0; i < mphone.length; i++) 
	if (mphone.charAt(i) < "0" || mphone.charAt(i) > "9")
	{
		alert("电话号码必须是数字！");
		return;
	}
	
		//验证邮箱地址是否合法
	var email=document.form1.txt7.value; 
	if (email.length == 0)
	{
		alert("邮箱必须填写！");
		return;
	}
	if (email.indexOf("@") <1 || email.indexOf(".") <1)
	{ 
	alert("邮箱格式不正确！"); 
	return; 
	}
	var patrn=/^[a-zA-Z0-9_\-\.]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-\.]+$/;
	if(!patrn.exec(email)||email.length>30)
	{
		alert("邮箱地址不能包含特殊字符！");
		return false;	
	}
	

	//是否提交
	if (confirm("确认提交？")) 
	{
		document.form1.submit(); 
	}
	else{
		return false;
	}
}

function checkFormfg()
{
	//验证用户名
	var username=document.formfg.txt1.value; 
	if (username.length==0)	
	{
			alert("用户名不能为空！");
			return;
	}
	
	//验证问题
	var wenti=document.formfg.txt2.value; 
	if (wenti.length==0)	
	{
			alert("问题必须填写！");
			return;
	}
	
	//验证答案
	var daan=document.formfg.txt3.value; 
	if (daan.length==0)	
	{
			alert("答案不能为空！");
			return;
	}
	
	//验证邮箱地址是否合法
	var email=document.formfg.txt4.value; 
	if (email.length == 0)
	{
		alert("邮箱必须填写！");
		return;
	}
	if (email.indexOf("@") <1 || email.indexOf(".") <1)
	{ 
	alert("邮箱格式不正确！"); 
	return; 
	}
	var patrn=/^[a-zA-Z0-9_\-\.]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-\.]+$/;
	if(!patrn.exec(email)||email.length>30)
	{
		alert("邮箱地址不能包含特殊字符！");
		return false;	
	}
		//是否提交
	if (confirm("确认提交？")) 
	{
		document.formfg.submit(); 
	}
	else{
		return false;
	}	

}

//录取查询
function checkFormlq()
{
	//验证用户名
	var username=document.formlq.txt1.value; 
	if (username.length==0)	
	{
			alert("用户名不能为空！");
			return;
	}
		//验证用户名
	var pass=document.formlq.txt2.value; 
	if (pass.length==0)	
	{
			alert("密码不能为空！");
			return;
	}
			//是否提交
	if (confirm("确认提交？")) 
	{
		document.formlq.submit(); 
	}
	else{
		return false;
	}	
}


//修改密码

function checknenfot()
{
	//验证用户名
	var username=document.formfot.txt1.value; 
	if (username.length==0)	
	{
			alert("用户名不能为空！");
			return;
	}
		
	var pass=document.formfot.txt2.value; 
	if (pass.length==0)	
	{
			alert("原密码不能为空！");
			return;
	}
			
	//验证密码
	var password=document.formfot.txt3.value; 
	if ((password.length<6) || (password.length>16))
	{
		if (password.length==0)	
		{
			alert("新密码必须填写！");
			return;
		}
		else
		alert("新密码不能少于6个字符大于16个字符！");
		return;
	}
		//检查两次输入的密码是否相同
	var cpassword=document.formfot.txt4.value; 
	if (cpassword.length==0)
	{
		alert("请填写确认密码！");
		return;
	}
	if (password!=cpassword)
	{
		alert("两次输入的密码不同");
		return;
	}
	
	if (confirm("确认提交？")) 
	{
		document.formfot.submit(); 
	}
	else{
		return false;
	}	
}




function checkFormmem1()
{
	var shengs=document.getElementById("shengs").value; 
	if(shengs==0)
	{
		alert("请您选择省份！");	
		return;
	}
		var zhxi=document.getElementById("zhxi").value; 
	if(zhxi==0)
	{
		alert("请您选择学习中心！");	
		return;
	}
		var baka=document.getElementById("baka").value; 
	if(baka==0)
	{
		alert("请您选择报考学校！");	
		return;
	}
			var bkzy=document.getElementById("bkzy").value; 
	if(bkzy==0)
	{
		alert("请您选择报考专业！");	
		return;
	}
			var bkcc=document.getElementById("bkcc").value; 
	if(bkcc==0)
	{
		alert("请您选择报考层次！");	
		return;
	}
			var zspc=document.getElementById("zspc").value; 
	if(zspc==0)
	{
		alert("请您选择招生批次！");	
		return;
	}
	//验证用户名
	var username=document.form1.txt1.value; 
	if (username.length==0)	
	{
			alert("用户名不能为空！");
			return;
	}

	//验证密码
	var password=document.form1.txt2.value; 
	if ((password.length<6) || (password.length>16))
	{
		if (password.length==0)	
		{
			alert("密码必须填写！");
			return;
		}
		else
		alert("密码不能少于6个字符大于16个字符！");
		return;
	}
		//检查两次输入的密码是否相同
	var cpassword=document.form1.txt21.value; 
	if (cpassword.length==0)
	{
		alert("请确认您的密码！");
		return;
	}
	if (password!=cpassword)
	{
		alert("两次输入的密码不同");
		return;
	}
	
	
	//验证问题
	var txt3=document.form1.txt3.value; 
	if (txt3.length==0)	
	{
			alert("问题不能为空！");
			return;
	}
	
	//验证答案
	var txt4=document.form1.txt4.value; 
	if (txt4.length==0)	
	{
			alert("答案必须填写！");
			return;
	}
	
		//验证邮箱地址是否合法
	var email=document.form1.txt5.value; 
	if (email.length == 0)
	{
		alert("邮箱必须填写！");
		return;
	}
	if (email.indexOf("@") <1 || email.indexOf(".") <1)
	{ 
	alert("邮箱格式不正确！"); 
	return; 
	}
	var patrn=/^[a-zA-Z0-9_\-\.]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-\.]+$/;
	if(!patrn.exec(email)||email.length>30)
	{
		alert("邮箱地址不能包含特殊字符！");
		return false;	
	}
	
	//验证真实姓名
	var txt6=document.form1.txt6.value; 
	if (txt6.length==0)	
	{
			alert("请您填写真实姓名！");
			return;
	}
	
	//电话号码
	var mphone=document.form1.txt9.value;
	if (mphone.length == 0)
	{
		alert("电话号码必须填写！");
		return;
	}
	for(i = 0; i < mphone.length; i++) 
	if (mphone.charAt(i) < "0" || mphone.charAt(i) > "9")
	{
		alert("电话号码必须是数字！");
		return;
	}
	

	
	//是否提交
	if (confirm("确认提交？")) 
	{
		document.form1.submit(); 
	}
	else{
		return false;
	}
}



function checkFormmem2()
{
	var shengs=document.getElementById("shengs").value; 
	if(shengs==0)
	{
		alert("请您选择省份！");	
		return;
	}
		var zhxi=document.getElementById("zhxi").value; 
	if(zhxi==0)
	{
		alert("请您选择学习中心！");	
		return;
	}
		var baka=document.getElementById("baka").value; 
	if(baka==0)
	{
		alert("请您选择报考学校！");	
		return;
	}
			var bkzy=document.getElementById("bkzy").value; 
	if(bkzy==0)
	{
		alert("请您选择报考专业！");	
		return;
	}
			var bkcc=document.getElementById("bkcc").value; 
	if(bkcc==0)
	{
		alert("请您选择报考层次！");	
		return;
	}
			var zspc=document.getElementById("zspc").value; 
	if(zspc==0)
	{
		alert("请您选择招生批次！");	
		return;
	}
	
	//是否提交
	if (confirm("确认提交？")) 
	{
		document.form1.submit(); 
	}
	else{
		return false;
	}
}