


//学生表单检查————————————————————————————————————————


//学生注册
/*
function sturegcheck(){
	if (document.sturegform.StuRegUser.value==""){
		window.alert("请填写用户名！");
		document.sturegform.StuRegUser.focus();
		return false;
	}	
	if (document.sturegform.StuRegPassword.value==""){
		window.alert("请填写密码！");
		document.sturegform.StuRegPassword.focus();
		return false;
	}	

	if (document.sturegform.StuName.value==""){
		window.alert("请填写姓名！");
		document.sturegform.StuName.focus();
		return false;
	}	

	if (document.sturegform.StuJZD.value==""){
		window.alert("请选择居住地！");
		document.sturegform.StuJZD.focus();
		return false;
	}	

	if (document.sturegform.StuHK.value==""){
		window.alert("请选择户口所在地！");
		document.sturegform.StuHK.focus();
		return false;
	}		

	if (document.sturegform.StuEduZY.value==""){
		window.alert("请选择专业！");
		document.sturegform.StuEduZY.focus();
		return false;
	}

	if(document.sturegform.StuHomePhone.value=="" && document.sturegform.StuIncPhone.value=="" && document.sturegform.StuHandset.value=="" && document.sturegform.StuBBCall.value=="" && document.sturegform.StuEmail.value=="" && document.sturegform.StuAddress.value==""){
		window.alert("请至少留下一种联系方式！");
		document.sturegform.StuHomePhone.focus();
		return false;
	}

	if (document.sturegform.StuBirthdayYear.value==""){
		window.alert("请填写出生年份！");
		document.sturegform.StuBirthdayYear.focus();
		return false;
	}	
	
	if(!JS_isNumber(document.sturegform.StuBirthdayYear, "出生年份请填写数字！")){
		document.sturegform.StuBirthdayYear.focus();
		return false;
	}
	
	if (document.sturegform.StuCode.value==""){
		window.alert("请填写身份证号！");
		document.sturegform.StuCode.focus();
		return false;
	}	
	
	if(!JS_isNumber(document.sturegform.StuCode, "身份证号请填写数字！")){
		document.sturegform.StuCode.focus();
		return false;
	}
}*/

//查找学生号
/*
function sturegsearchcheck(){
	if (document.sturegsearchform.xm.value==""){
		window.alert("请填写姓名！");
		document.sturegsearchform.xm.focus();
		return false;
	}	
	if (document.sturegsearchform.yxmc.value==""){
		window.alert("请填写院校关键字！");
		document.sturegsearchform.yxmc.focus();
		return false;
	}	
	if (document.sturegsearchform.zymc.value==""){
		window.alert("请填写专业关键字！");
		document.sturegsearchform.zymc.focus();
		return false;
	}

}*/

//学生基本资料
/*
function submitclick()
	{
	  titlestr="请你注意\n\n";
	  errstr="您确定要修改密码吗?\n\n";
	  if(confirm(errstr))
	  return true
	  else
	  return false
	}
	
	function add_jy()
	{
		if (submitclick()){
			return(true);	
		}else{
			return(false);
		}
				
	}
	function stuchangepwscheck(){
	
		if(document.stuchangepwsform.newusername.value=="" && document.stuchangepwsform.newpws1.value=="" && document.stuchangepwsform.newpws2.value==""){
			window.alert("为了方便你使用系统，建议您给自己设立昵称！");
			document.stuchangepwsform.newusername.focus();
			return false;
		}
		if(document.stuchangepwsform.oldpws.value=="" ){
			window.alert("请填写原密码！");
			document.stuchangepwsform.oldpws.focus();
			return false;
		}
	
		if (document.stuchangepwsform.newpws1.value=="" ){
			window.alert("请填写新密码！");
			document.stuchangepwsform.newpws1.focus();
			return false;
		}
	
		if (document.stuchangepwsform.newpws1.value!="" && document.stuchangepwsform.newpws2.value==""){
			window.alert("请验证新密码！");
			document.stuchangepwsform.newpws2.focus();
			return false;
		}
	
		if (document.stuchangepwsform.newpws1.value!=document.stuchangepwsform.newpws2.value){
			window.alert("两次输入的新密码不同，请从新输入！");
			document.stuchangepwsform.newpws1.focus();
			return false;
		}
		add_jy();
	}
}*/

//学生修改密码
/*
function stubasicinfocheck(){
	if (document.stubasicinfoform.StuName.value==""){
		window.alert("请填写姓名！");
		document.stubasicinfoform.StuName.focus();
		return false;
	}	

	if (document.stubasicinfoform.StuBirthdayYear.value==""){
		window.alert("请填写出生年份！");
		document.stubasicinfoform.StuBirthdayYear.focus();
		return false;
	}	
	
	if(!JS_isNumber(document.stubasicinfoform.StuBirthdayYear, "出生年份请填写数字！")){
		document.stubasicinfoform.StuBirthdayYear.focus();
		return false;
	}
	
	if (document.stubasicinfoform.StuCode.value=="")
	{
		window.alert("请填写身份证号！");
		document.stubasicinfoform.StuCode.focus();
		return false;
	}	
	
	if(!JS_isNumber(document.stubasicinfoform.StuCode, "身份证号请填写数字！")){
		document.stubasicinfoform.StuCode.focus();
		return false;
	}

	if(document.stubasicinfoform.StuHomePhone.value=="" && document.stubasicinfoform.StuIncPhone.value=="" && document.stubasicinfoform.StuHandset.value=="" && document.stubasicinfoform.StuBBCall.value=="" && document.stubasicinfoform.StuEmail.value=="" && document.stubasicinfoform.StuAddress.value==""){
		window.alert("请至少留下一种联系方式！");
		document.stubasicinfoform.StuHomePhone.focus();
		return false;
	}

	if (document.stubasicinfoform.StuJZD.value==""){
		window.alert("请选择居住地！");
		document.stubasicinfoform.StuJZD.focus();
		return false;
	}	

	if (document.stubasicinfoform.StuHK.value==""){
		window.alert("请选择户口所在地！");
		document.stubasicinfoform.StuHK.focus();
		return false;
	}		

	if (document.stubasicinfoform.StuEduZY.value==""){
		window.alert("请选择专业！");
		document.stubasicinfoform.StuEduZY.focus();
		return false;
	}
}*/



//学生培训经历
/*
function pxcheck(){
	if (document.pxform.StuPXTimeFromYear.value==""){
		window.alert("请填写培训开始时间！");
		document.pxform.StuPXTimeFromYear.focus();
		return false;
	}

	if (document.pxform.StuPXTimeToYear.value==""){
		window.alert("请填写培训结束时间！");
		document.pxform.StuPXTimeToYear.focus();
		return false;
	}

	if(!JS_isNumber(document.pxform.StuPXTimeFromYear, "培训开始时间请填写数字！")){
		document.pxform.StuPXTimeFromYear.focus();
		return false;
	}
	
	if(!JS_isNumber(document.pxform.StuPXTimeToYear, "培训结束时间请填写数字！")){
		document.pxform.StuPXTimeToYear.focus();
		return false;
	}

	if (document.pxform.StuPXKC.value==""){
		window.alert("请填写培训课程！");
		document.pxform.StuPXKC.focus();
		return false;
	}

}*/

//学生社会经验
/*
function expcheck(){
	if (document.expform.StuExpTimeFromYear.value==""){
		window.alert("请填写开始时间！");
		document.expform.StuExpTimeFromYear.focus();
		return false;
	}

	if (document.expform.StuExpTimeToYear.value==""){
		window.alert("请填写结束时间！");
		document.expform.StuExpTimeToYear.focus();
		return false;
	}

	if(!JS_isNumber(document.expform.StuExpTimeFromYear, "开始时间请填写数字！")){
		document.expform.StuExpTimeFromYear.focus();
		return false;
	}
	
	if(!JS_isNumber(document.expform.StuExpTimeToYear, "结束时间请填写数字！")){
		document.expform.StuExpTimeToYear.focus();
		return false;
	}

	if (document.expform.StuExpInc.value==""){
		window.alert("请填写单位！");
		document.expform.StuExpInc.focus();
		return false;
	}

	if (document.expform.StuExpIndustry.value==""){
		window.alert("请填写行业！");
		document.expform.StuExpIndustry.focus();
		return false;
	}

	if (document.expform.StuExpFunction.value==""){
		window.alert("请填写职位！");
		document.expform.StuExpFunction.focus();
		return false;
	}
	
}*/




//企业表单检查————————————————————————————————————————


//企业注册
/*
function incregcheck(){
	if (document.incregform.IncRegUser.value==""){
		window.alert("请填写用户名！");
		document.incregform.IncRegUser.focus();
		return false;
	}	
	if (document.incregform.IncRegPassword.value==""){
		window.alert("请填写密码！");
		document.incregform.IncRegPassword.focus();
		return false;
	}
	if (document.incregform.IncName.value==""){
		window.alert("请填写企业名称！");
		document.incregform.IncName.focus();
		return false;
	}
	if (document.incregform.IncEmail.value==""){
		window.alert("请填写联系email！");
		document.incregform.IncEmail.focus();
		return false;
	}
	if (document.incregform.IncContact.value==""){
		window.alert("请填写联系方式！");
		document.incregform.IncContact.focus();
		return false;
	}
	if (document.incregform.IncIntroduce.value==""){
		window.alert("请填写企业介绍！");
		document.incregform.IncIntroduce.focus();
		return false;
	}

}*/

//企业基本资料
/*
function incbasicinfocheck(){
	if (document.incbasicinfoform.IncName.value==""){
		window.alert("请填写企业名称！");
		document.incbasicinfoform.IncName.focus();
		return false;
	}

	if (document.incbasicinfoform.IncIntroduce.value==""){
		window.alert("请填写企业介绍！");
		document.incbasicinfoform.IncIntroduce.focus();
		return false;
	}

	if (document.incbasicinfoform.IncAddress.value==""){
		window.alert("请填写企业地址！");
		document.incbasicinfoform.IncAddress.focus();
		return false;
	}

	if (document.incbasicinfoform.IncContact.value==""){
		window.alert("请填写企业联系方式！");
		document.incbasicinfoform.IncContact.focus();
		return false;
	}

}*/

//企业修改密码
/*
function incchangepwscheck(){
	if(document.incchangepwsform.newusername.value=="" && document.incchangepwsform.newpws1.value=="" && document.incchangepwsform.newpws2.value==""){
		window.alert("请填写新用户名！");
		document.incchangepwsform.newusername.focus();
		return false;
	}

	if (document.incchangepwsform.newusername.value=="" && document.incchangepwsform.newpws1.value=="" ){
		window.alert("请填写新密码！");
		document.incchangepwsform.newpws1.focus();
		return false;
	}

	if (document.incchangepwsform.newpws1.value!="" && document.incchangepwsform.newpws2.value==""){
		window.alert("请验证新密码！");
		document.incchangepwsform.newpws2.focus();
		return false;
	}

	if (document.incchangepwsform.newpws1.value!=document.incchangepwsform.newpws2.value){
		window.alert("两次输入的新密码不同，请从新输入！");
		document.incchangepwsform.newpws1.focus();
		return false;
	}
}*/

//企业发布招聘信息
function inczpinfocheck(){

	/*if (document.inczpinfoform.IncZPPost_dl.value=="zy_bx"){
		window.alert("请选择招聘专业！");
		document.inczpinfoform.IncZPPost_dl.focus();
		return false;
	}

	if (document.inczpinfoform.IncZPGZZZ.value==""){
		window.alert("请填写职责描叙！");
		document.inczpinfoform.IncZPGZZZ.focus();
		return false;
	}
	/if (document.inczpinfoform.IncZPCompetence.value==""){
		window.alert("请填写任职资格！");
		document.inczpinfoform.IncZPCompetence.focus();
		return false;
	}
	if (document.inczpinfoform.IncZPPlace.value==""){
		window.alert("请选择工作地点！");
		document.inczpinfoform.IncZPPlace.focus();
		return false;
	}*/
}

//企业搜索学生
/*
function incsearchcheck(){
	if (document.incsearchform.IncDefineSearchZY.value==""){
		window.alert("请选择招聘专业！");
		document.incsearchform.IncDefineSearchZY.focus();
		return false;
	}
	if (document.incsearchform.IncDefineSearchJZD.value==""){
		window.alert("请选择居住地！");
		document.incsearchform.IncDefineSearchJZD.focus();
		return false;
	}
	if (document.incsearchform.IncDefineSearchHK.value==""){
		window.alert("请选择户口所在地！");
		document.incsearchform.IncDefineSearchHK.focus();
		return false;
	}


}
*/




//前台-------------------------------------------------------------------------------------------
//首页登陆
function main_login_check(){
	if (document.main_login_form.username.value==""){
		window.alert("请填写用户名！");
		document.main_login_form.username.focus();
		return false;
	}
	if (document.main_login_form.userpassword.value==""){
		window.alert("请填写密码！");
		document.main_login_form.userpassword.focus();
		return false;
	}
}
//首页职位搜索
function main_search_check(){
	if (document.main_search_form.StuWantTime.value=="99" &&  document.main_search_form.StuWantIncType.value=="99"  && document.main_search_form.StuWantFunction.value=="99" && document.main_search_form.StuWantMoney.value=="99" &&  document.main_search_form.StuWantPlace_dl.value=="dq_bx"){
		
		window.alert("请至少选择一种搜索条件！");
		
		return false;
	}

}

//注册0xia2004年9月12号
function reg_0_form_check(){
	if (document.reg_0_form.reg_username.value==""){
		window.alert("请填写用户名！");
		document.reg_0_form.reg_username.focus();
		return false;
	}
	if (document.reg_0_form.reg_userpassword.value==""){
		window.alert("请填写密码！");
		document.reg_0_form.reg_userpassword.focus();
		return false;
	}
	if (document.reg_0_form.reg_userpassword2.value==""){
		window.alert("请确认密码！");
		document.reg_0_form.reg_userpassword2.focus();
		return false;
	}
	if (document.reg_0_form.reg_userpassword2.value!=document.reg_0_form.reg_userpassword.value){
		window.alert("两次输入的密码不一致！");
		document.reg_0_form.reg_userpassword.focus();
		return false;
	}

}



//学生或者企业修改用户名
function rem_username_form_check(){
	if (document.rem_username_form.rem_old_username.value==""){
		window.alert("请填写原用户名！");
		document.rem_username_form.rem_old_username.focus();
		return false;
	}
	if (document.rem_username_form.rem_new_username.value==""){
		window.alert("请填写新用户名！");
		document.rem_username_form.rem_new_username.focus();
		return false;
	}
}
//学生或者企业修改密码
function rem_pwd_form_check(){
	if (document.rem_pwd_form.rem_old_pwd.value==""){
		window.alert("请填写原密码！");
		document.rem_pwd_form.rem_old_pwd.focus();
		return false;
	}
	if (document.rem_pwd_form.rem_new_pwd1.value==""){
		window.alert("请填写新密码！");
		document.rem_pwd_form.rem_new_pwd1.focus();
		return false;
	}
	if (document.rem_pwd_form.rem_new_pwd2.value==""){
		window.alert("请确认新密码！");
		document.rem_pwd_form.rem_new_pwd2.focus();
		return false;
	}
	if (document.rem_pwd_form.rem_new_pwd1.value!=document.rem_pwd_form.rem_new_pwd2.value){
		window.alert("两次输入的密码不一致！");
		document.rem_pwd_form.rem_new_pwd1.focus();
		return false;
	}
}

//企业修改或注册基本信息
function incinfo_form_check(){
	if (document.incinfo_form.IncName.value==""){
		window.alert("请填写企业名称！");
		document.incinfo_form.IncName.focus();
		return false;
	}
	/*if (document.incinfo_form.IncZZCode.value==""){
		window.alert("请填写工商执照编号！");
		document.incinfo_form.IncZZCode.focus();
		return false;
	}*/
	if (document.incinfo_form.IncAddress.value==""){
		window.alert("请填写地址！");
		document.incinfo_form.IncAddress.focus();
		return false;
	}
	if (document.incinfo_form.IncContact.value==""){
		window.alert("请填写联系方式！");
		document.incinfo_form.IncContact.focus();
		return false;
	}
	if (document.incinfo_form.IncIntroduce.value==""){
		window.alert("请填写企业简介！");
		document.incinfo_form.IncIntroduce.focus();
		return false;
	}
	add_inc(incinfo_form);
	
}

//企业发布新招聘或修改招聘信息表单
function inc_zp_form_check(){
	if (document.inc_zp_form.IncZPGZZZ.value==""){
		window.alert("请填写职责描叙！");
		document.inc_zp_form.IncZPGZZZ.focus();
		return false;
	}
	if (document.inc_zp_form.IncZPCompetence.value==""){
		window.alert("请填写任职资格！");
		document.inc_zp_form.IncZPCompetence.focus();
		return false;
	}
}


//企业提交搜索条件
function main_search_rc_check(){
	if (document.main_search_rc_form.IncDefineSearchSex.value=="99" && document.main_search_rc_form.IncDefineSearchZY_dl.value=="zy_bx" && document.main_search_rc_form.IncDefineSearchKnowledge.value=="99" && document.main_search_rc_form.StuEduEnglishLevel.value=="99" && document.main_search_rc_form.IncDefineSearchHK_dl.value=="dq_bx" ){
		window.alert("请至少填写一种搜索条件！");
		document.main_search_rc_form.IncDefineSearchSex.focus();
		return false;
	}
}


//学生修改或新注册基本资料
function stuinfo_form_check(){
	if (document.stuinfo_form.StuName.value==""){
		window.alert("请填写姓名！");
		document.stuinfo_form.StuName.focus();
		return false;
	}	

	if (document.stuinfo_form.StuBirthdayYear.value==""){
		window.alert("请填写出生日期！");
		document.stuinfo_form.StuBirthdayYear.focus();
		return false;
	}	
	
	if (document.stuinfo_form.StuCode.value==""){
		window.alert("请填写身份证号！");
		document.stuinfo_form.StuCode.focus();
		return false;
	}	
	
	if(!JS_isNumber(document.stuinfo_form.StuCode, "身份证号请填写数字！")){
		document.stuinfo_form.StuCode.focus();
		return false;
	}

	if (document.stuinfo_form.StuJZD_dl.value=="dq_bx"){
		window.alert("请选择居住地！");
		document.stuinfo_form.StuJZD_dl.focus();
		return false;
	}	

	if(document.stuinfo_form.StuHomePhone.value=="" && document.stuinfo_form.StuIncPhone.value=="" && document.stuinfo_form.StuHandset.value==""  && document.stuinfo_form.StuEmail.value=="" && document.stuinfo_form.StuAddress.value==""){
		window.alert("请至少留下一种联系方式！");
		document.stuinfo_form.StuHomePhone.focus();
		return false;
	}
	if (document.stuinfo_form.StuEduTime.value==""){
		window.alert("请填写毕业时间！");
		document.stuinfo_form.StuEduTime.focus();
		return false;
	}
	if (document.stuinfo_form.yuanxiid.value=="0"){
		window.alert("请选择院系！");
		document.stuinfo_form.scend_id.focus();
		return false;
	}
	if (document.stuinfo_form.zhuanyeid.value=="0"){
		window.alert("请选择专业！");
		document.stuinfo_form.scend_id.focus();
		return false;
	}
	add_stu(stuinfo_form);	
}


//学生填写求职意向
function stu_want_form_check(){
	

}

//学生填培训经历
function stu_px_form_check(){
	if (document.stu_px_form.StuPXTimeFromYear.value==""){
		window.alert("请填写培训开始时间！");
		document.stu_px_form.StuPXTimeFromYear.focus();
		return false;
	}

	if (document.stu_px_form.StuPXTimeToYear.value==""){
		window.alert("请填写培训结束时间！");
		document.stu_px_form.StuPXTimeToYear.focus();
		return false;
	}

	if(!JS_isNumber(document.stu_px_form.StuPXTimeFromYear, "培训开始时间请填写数字！")){
		document.stu_px_form.StuPXTimeFromYear.focus();
		return false;
	}
	
	if(!JS_isNumber(document.stu_px_form.StuPXTimeToYear, "培训结束时间请填写数字！")){
		document.stu_px_form.StuPXTimeToYear.focus();
		return false;
	}

	if(document.stu_px_form.StuPXTimeFromYear.value.length!=4 ){
		window.alert("培训开始时间请填写4位数字！");
		document.stu_px_form.StuPXTimeFromYear.focus();
		return false;
	}

	if(document.stu_px_form.StuPXTimeToYear.value.length!=4 ){
		window.alert("培训结束时间请填写4位数字！");
		document.stu_px_form.StuPXTimeToYear.focus();
		return false;
	}

	if (document.stu_px_form.StuPXKC.value==""){
		window.alert("请填写培训课程！");
		document.stu_px_form.StuPXKC.focus();
		return false;
	}
}



//学生填写社会经验
function stu_exp_form_check(){
	if (document.stu_exp_form.StuExpTimeFromYear.value==""){
		window.alert("请填写开始时间！");
		document.stu_exp_form.StuExpTimeFromYear.focus();
		return false;
	}

	if (document.stu_exp_form.StuExpTimeToYear.value==""){
		window.alert("请填写结束时间！");
		document.stu_exp_form.StuExpTimeToYear.focus();
		return false;
	}

	if(!JS_isNumber(document.stu_exp_form.StuExpTimeFromYear, "开始时间请填写数字！")){
		document.stu_exp_form.StuExpTimeFromYear.focus();
		return false;
	}
	
	if(!JS_isNumber(document.stu_exp_form.StuExpTimeToYear, "结束时间请填写数字！")){
		document.stu_exp_form.StuExpTimeToYear.focus();
		return false;
	}

	if(document.stu_exp_form.StuExpTimeFromYear.value.length!=4 ){
		window.alert("开始时间请填写4位数字！");
		document.stu_exp_form.StuExpTimeFromYear.focus();
		return false;
	}

	if(document.stu_exp_form.StuExpTimeToYear.value.length!=4 ){
		window.alert("结束时间请填写4位数字！");
		document.stu_exp_form.StuExpTimeToYear.focus();
		return false;
	}

	if (document.stu_exp_form.StuExpInc.value==""){
		window.alert("请填写单位！");
		document.stu_exp_form.StuExpInc.focus();
		return false;
	}

	if (document.stu_exp_form.StuExpFunction.value==""){
		window.alert("请填写职位！");
		document.stu_exp_form.StuExpFunction.focus();
		return false;
	}

}

//后台-------------------------------------------------------------------------------------------

//后台修改企业基本资料
function admininccheck(){
	if (document.adminincform.IncName.value==""){
		window.alert("请填写企业名称！");
		document.adminincform.IncName.focus();
		return false;
	}

	if (document.adminincform.IncIntroduce.value==""){
		window.alert("请填写企业介绍！");
		document.adminincform.IncIntroduce.focus();
		return false;
	}

	/*if (document.adminincform.IncZZCode.value==""){
			window.alert("请填写工商执照编号！");
			document.adminincform.IncZZCode.focus();
			return false;
		}
	if (document.adminincform.IncAddress.value==""){
		window.alert("请填写企业地址！");
		document.adminincform.IncAddress.focus();
		return false;
	}

	if (document.adminincform.IncEmail.value==""){
		window.alert("请填写企业联系email！");
		document.adminincform.IncEmail.focus();
		return false;
	}
	if (document.adminincform.IncContact.value==""){
		window.alert("请填写企业联系方式！");
		document.adminincform.IncContact.focus();
		return false;
	}*/

}

//后台修改企业招聘信息
function admininczpinfocheck(){
	/*if (document.admininczpinfoform.IncZPPost_dl.value=="zy_bx"){
		window.alert("请选择招聘专业！");
		document.admininczpinfoform.IncZPPost_dl.focus();
		return false;
	}

	if (document.admininczpinfoform.IncZPGZZZ.value==""){
		window.alert("请填写职责描叙！");
		document.admininczpinfoform.IncZPGZZZ.focus();
		return false;
	}
	if (document.admininczpinfoform.IncZPCompetence.value==""){
		window.alert("请填写任职资格！");
		document.admininczpinfoform.IncZPCompetence.focus();
		return false;
	}
	if (document.admininczpinfoform.IncZPPlace_dl.value=="dq_bx"){
		window.alert("请选择工作地点！");
		document.admininczpinfoform.IncZPPlace_dl.focus();
		return false;
	}*/
}

//后台添加新的企业
function tjinccheck(){
	if (document.tjincform.IncRegUser.value==""){
		window.alert("请填写用户名！");
		document.tjincform.IncRegUser.focus();
		return false;
	}	
	if (document.tjincform.IncRegPassword.value==""){
		window.alert("请填写密码！");
		document.tjincform.IncRegPassword.focus();
		return false;
	}
	if (document.tjincform.IncName.value==""){
		window.alert("请填写企业名称！");
		document.tjincform.IncName.focus();
		return false;
	}
	/*if (document.tjincform.IncZZCode.value==""){
		window.alert("请填写工商执照编号！");
		document.tjincform.IncZZCode.focus();
		return false;
	}
	if (document.tjincform.IncEmail.value==""){
		window.alert("请填写联系email！");
		document.tjincform.IncEmail.focus();
		return false;
	}
	if (document.tjincform.IncContact.value==""){
		window.alert("请填写联系方式！");
		document.tjincform.IncContact.focus();
		return false;
	}*/
	if (document.tjincform.IncIntroduce.value==""){
		window.alert("请填写企业介绍！");
		document.tjincform.IncIntroduce.focus();
		return false;
	}
}


//后台修改学生信息
function adminstucheck(){
	if (document.adminstuform.StuRegUser.value==""){
		window.alert("请填写用户名！");
		document.adminstuform.StuRegUser.focus();
		return false;
	}	
	if (document.adminstuform.StuRegPassword.value==""){
		window.alert("请填写密码！");
		document.adminstuform.StuRegPassword.focus();
		return false;
	}

	if (document.adminstuform.StuName.value==""){
		window.alert("请填写姓名！");
		document.adminstuform.StuName.focus();
		return false;
	}	

	if (document.adminstuform.StuBirthdayYear.value==""){
		window.alert("请填写出生年份！");
		document.adminstuform.StuBirthdayYear.focus();
		return false;
	}	
	
	if(!JS_isNumber(document.adminstuform.StuBirthdayYear, "出生年份请填写数字！")){
		document.adminstuform.StuBirthdayYear.focus();
		return false;
	}
	
	/*if (document.adminstuform.StuCode.value=="")
	{
		window.alert("请填写身份证号！");
		document.adminstuform.StuCode.focus();
		return false;
	}	
	
	if(!JS_isNumber(document.adminstuform.StuCode, "身份证号请填写数字！")){
		document.adminstuform.StuCode.focus();
		return false;
	}*/

	if(document.adminstuform.StuHomePhone.value=="" && document.adminstuform.StuIncPhone.value=="" && document.adminstuform.StuHandset.value=="" && document.adminstuform.StuBBCall.value=="" && document.adminstuform.StuEmail.value=="" && document.adminstuform.StuAddress.value==""){
		window.alert("请至少留下一种联系方式！");
		document.adminstuform.StuHomePhone.focus();
		return false;
	}

	if (document.adminstuform.StuJZDdm.value=="dq_bx"){
		window.alert("请选择居住地！");
		document.adminstuform.StuJZD_dl.focus();
		return false;
	}	

	if (document.adminstuform.StuHKdm.value=="dq_bx"){
		window.alert("请选择户口所在地！");
		document.adminstuform.StuHK_dl.focus();
		return false;
	}	

	
	
	if (document.adminstuform.StuEduZY_name.value==""){
		window.alert("请填写专业名称！");
		document.adminstuform.StuEduZY_name.focus();
		return false;
	}

	if (document.adminstuform.StuEduZYdm.value=="zy_bx"){
		window.alert("请选择专业！");
		document.adminstuform.StuEduZY_dl.focus();
		return false;
	}
}

//后台添加新的学生
function tjstucheck(){
	if (document.tjstuform.StuRegUser.value==""){
		window.alert("请填写用户名！");
		document.tjstuform.StuRegUser.focus();
		return false;
	}	
	if (document.tjstuform.StuRegPassword.value==""){
		window.alert("请填写密码！");
		document.tjstuform.StuRegPassword.focus();
		return false;
	}

	if (document.tjstuform.StuName.value==""){
		window.alert("请填写姓名！");
		document.tjstuform.StuName.focus();
		return false;
	}	

	if (document.tjstuform.StuBirthdayYear.value==""){
		window.alert("请填写出生年份！");
		document.tjstuform.StuBirthdayYear.focus();
		return false;
	}
	
	
	if(!JS_isNumber(document.tjstuform.StuBirthdayYear, "出生年份请填写数字！")){
		document.tjstuform.StuBirthdayYear.focus();
		return false;
	}
	
	/*if (document.tjstuform.StuCode.value=="")
	{
		window.alert("请填写身份证号！");
		document.tjstuform.StuCode.focus();
		return false;
	}	
	
	if(!JS_isNumber(document.tjstuform.StuCode, "身份证号请填写数字！")){
		document.tjstuform.StuCode.focus();
		return false;
	}*/

	

	if (document.tjstuform.StuJZD_dl.value=="dq_bx"){
		window.alert("请选择居住地！");
		document.tjstuform.StuJZD_dl.focus();
		return false;
	}	

	if (document.tjstuform.StuHK_dl.value=="dq_bx"){
		window.alert("请选择户口所在地！");
		document.tjstuform.StuHK_dl.focus();
		return false;
	}	
	if (document.tjstuform.StuEduZY_name.value==""){
		window.alert("请填写专业名称！");
		document.tjstuform.StuEduZY_name.focus();
		return false;
	}

	if (document.tjstuform.StuEduZY_dl.value=="zy_bx"){
		window.alert("请选择专业分类！");
		document.tjstuform.StuEduZY_dl.focus();
		return false;
	}

	if(document.tjstuform.StuHomePhone.value=="" && document.tjstuform.StuIncPhone.value=="" && document.tjstuform.StuHandset.value=="" && document.tjstuform.StuBBCall.value=="" && document.tjstuform.StuEmail.value=="" && document.tjstuform.StuAddress.value==""){
		window.alert("请至少留下一种联系方式！");
		document.tjstuform.StuHomePhone.focus();
		return false;
	}
}

//后台发布新公告
function gglcheck(){
	if (document.gglform.text.value==""){
		window.alert("请填写公告内容！");
		document.gglform.text.focus();
		return false;
	}
}







function JS_trimLeft(s) {
	var whitespaces = " \t\n\r";
	for(n = 0; n < s.length; n++) { 
		if (whitespaces.indexOf(s.charAt(n)) == -1) 
			return (n > 0) ? s.substring(n, s.length) : s; 
	}
	return("");
}
function JS_trimRight(s){
	var whitespaces = " \t\n\r";
	for(n = s.length - 1; n  > -1; n--) { 
		if (whitespaces.indexOf(s.charAt(n)) == -1) 
			return (n < (s.length - 1)) ? s.substring(0, n+1) : s; 
	}
	return("");
}

function JS_trim(s) {
	return ((s == null) ? "" : JS_trimRight(JS_trimLeft(s))); 
}


function JS_isNumber(field, strBodyHeader) {
	var strVal = JS_trim(field.value);
	if (strVal.length == 0 || strVal.length > 999) return false;
	var 	x = 0;
	for (i=0;i < strVal.length; i++) { 
		if (strVal.charAt(i) >= '0' && strVal.charAt(i) <= '9') x++;
	}
	if (strVal.length > x) {
		alert(strBodyHeader);
		field.focus();
		return false;
	} 
	else {
		return true;
	}
}

function JS_isEmail(field, strBodyHeader) {
	var strMsg = ""; 
	var chAt  = '@'; 
	var chDot = '.'; 
	var strEmailAddr = JS_trim(field.value);
	   if (strEmailAddr.length == 0) return true;
	   if (strEmailAddr.indexOf(" ") == -1)
	   {
	       var iFirstAtPos = strEmailAddr.indexOf(chAt);
	       var iLastAtPos = strEmailAddr.lastIndexOf(chAt);
	       if (iFirstAtPos > 0 && iFirstAtPos < (strEmailAddr.length - 1) &&iFirstAtPos == iLastAtPos) {
		   // look for '.' there must be at least one char between '@' and '.'
		   var iDotPos = strEmailAddr.indexOf(chDot, iFirstAtPos + 1);
		   if (iDotPos > (iFirstAtPos + 1) && iDotPos < (strEmailAddr.length -1)) return true;
	       }
	   }
	   alert(strBodyHeader);
	   field.focus();
	   field.select();
	   return false;
}

//登录表单检测
function checklogin(){
	field=document.loginform.mobphone;

	if (field.value.length!=11){
		alert("请填写正确的手机号码！");
		document.loginform.mobphone.focus();
		return false;
	}

	if(!JS_isNumber(field, "必须输入数字！")){
		document.loginform.mobphone.focus();
		return false;
	}
	
	if (loginform.modpwd.value.length==0){
		alert("请填写登录密码");
		document.loginform.modpwd.focus();
		return false;	
	}	

	field=document.loginform.modpwd;
	if(!JS_isNumber(field, "必须输入数字！")){
		document.loginform.modpwd.focus();
		return false;
	}
	return true;
}
