
   function is_zw(str)
  {
	exp=/[0-9a-zA-Z_]/g;
	if(str.search(exp) != -1)
	{
		return false;
	}
	return true;
  }
 
 function is_number(str)
{
	exp=/[^0-9()-]/g;
	if(str.search(exp) != -1)
	{
		return false;
	}
	return true;
}


 function check_reg(){
 if (document.reg.jobname.value==""){
 alert("职位名称不能为空！请继续发布...");
 document.reg.jobname.focus();
 return false;
 }
 
  if (document.reg.jobcount.value.match(/\D/)){
 alert("招聘人数必须是数字！请继续发布...");
 document.reg.jobcount.focus();
 return false;
 }

 if (document.reg.jobcount.value==""){
 alert("招聘人数不能是空值！请继续发布...");
 document.reg.jobcount.focus();
 return false;
 }
 
  if (document.reg.jobdescription.value==""){
 alert("岗位描述不能是空值！请继续发布...");
 document.reg.jobdescription.focus();
 return false;
 } 
 
 
 if (document.reg.contactperson.value==""){
 alert("联系人不能是空值！请继续发布...");
 document.reg.contactperson.focus();
 return false;
 }
 
  if (document.reg.mailbox.value==""){
 alert("邮箱必须输入！请继续发布...");
 document.reg.mailbox.focus();
 return false;
 }

 if(document.reg.mailbox.value.indexOf("@")==-1 || document.reg.mailbox.value.indexOf(".")==-1){ 
 alert("邮箱格式不正确！请继续发布...");
 document.reg.mailbox.focus();
 return false;
 }
	

 if (document.reg.c_contactphone.value==""){
 alert("联系电话不能是空值！请继续发布...");
 document.reg.c_contactphone.focus();
 return false;
 }
 if (!is_number(document.reg.c_contactphone.value)){
 alert("联系电话只能是数字0-9和-！请继续发布...");
 document.reg.c_contactphone.focus();
 return false;
 }
 
  if (!is_number(document.reg.companyfax.value)){
 alert("传真只能是数字0-9和-！请继续发布...");
 document.reg.companyfax.focus();
 return false;
 }

 if (document.reg.jiedao.value==""){
 alert("通讯地址必须输入！请继续发布...");
 document.reg.jiedao.focus();
 return false;
 }

 if (document.reg.zipcode.value==""){
 alert("邮政编码不能是空值！请继续发布...");
 document.reg.zipcode.focus();
 return false;
 }
 if (document.reg.zipcode.value.match(/\D/)){
 alert("邮政编码必须是数字！请继续发布...");
 document.reg.zipcode.focus();
 return false;
 }
 
 
 }



