
function Rule_JobLocation()
{
this.Validate=Rule_RegTest;
this.Alert=Rule_ShowMessage;
this.RegExp=/[^\s]/;
this.cnMessage='请选择工作地区！';
this.enMessage='Please select work location.';
}

function Rule_JobFunction()
{
this.Validate=Rule_RegTest;
this.Alert=Rule_ShowMessage;
this.RegExp=/[^\s]/;
this.cnMessage='请选择岗位类别！';
this.enMessage='Please select job function.';
}

function Rule_JobPostingPeriod()
{
this.Validate=Rule_RegTest;
this.Alert=Rule_ShowMessage;
this.RegExp=/[^\s]/;
this.cnMessage='请选择发布日期！';
this.enMessage='Please select post date.';
}

function Rule_MinYearsOfExperience()
{
this.Validate=Rule_RegTest;
this.Alert=Rule_ShowMessage;
this.RegExp=/^[0-9]{0,2}$/;
this.cnMessage='请正确填写最小工作年限！';
this.enMessage='Please enter valid minimum year of experience.';
}

function Rule_MaxYearsOfExperience()
{
this.Validate=Rule_RegTestMaxYearsOfExperience;
this.Alert=Rule_ShowMessage;
this.RegExp=/^[0-9]{0,2}$/;
this.enMessage='Please enter valid maximum year of experience.';
this.enMessage='!';
}

function Rule_RegTestMaxYearsOfExperience(v)
{
  if (!this.RegExp.test(v))
	return false;
  if ((v!='') && (v>70))
	return false;
return true;
}

function Rule_MaxMinYearsOfExperience()
{
this.Validate=Rule_RegTestBoolean;
this.Alert=Rule_ShowMessage;
this.RegExp='';
this.cnMessage='请按正确的顺序填写工作年限！';
this.enMessage='Please enter the year of experience in chronological order.';
}

function Rule_MinAge()
{
this.Validate=Rule_RegTestMinAge;
this.Alert=Rule_ShowMessage;
this.RegExp=/^[0-9]{0,2}$/;
this.cnMessage='请正确填写最小年龄！';
this.enMessage='Please enter valid minimum age.';
}

function Rule_RegTestMinAge(v)
{
  if (!this.RegExp.test(v))
	return false;
  if ((v!='') && (v<18))
	return false;
return true;
}

function Rule_MaxAge()
{
this.Validate=Rule_RegTestMaxAge;
this.Alert=Rule_ShowMessage;
this.RegExp=/^[0-9]{0,2}$/;
this.cnMessage='请正确填写最大年龄！';
this.enMessage='Please enter valid maximum age.';
}

function Rule_RegTestMaxAge(v)
{
  if (!this.RegExp.test(v))
	return false;
  if ((v!='') && ((v<18) || (v>70)))
	return false;
return true;
}

function Rule_MaxMinAge()
{
this.Validate=Rule_RegTestBoolean;
this.Alert=Rule_ShowMessage;
this.RegExp='';
this.cnMessage='请按正确的顺序填写年龄要求！';
this.enMessage='Please enter the ages in chronological order.';
}

function Rule_Keyword()
{
this.Validate=Rule_RegTestBlank;
this.Alert=Rule_ShowMessage;
this.RegExp=/[^\s]$/g;
this.cnMessage='请正确填写关键字！';
this.enMessage='Please enter valid keyword.';
}

function Rule_LoginKeyword()
{
this.Validate=Rule_RegTestBlank;
this.Alert=Rule_ShowMessage;
this.RegExp=/[^\s]{1,30}$/g;
this.cnMessage='请正确填写关键字！';
this.enMessage='Please enter valid keyword.';
}

function Rule_MinSalary()
{
this.Validate=Rule_RegTest;
this.Alert=Rule_ShowMessage;
this.RegExp=/^[0-9]{0,6}$/;
this.cnMessage='请正确填写最低月薪要求！';
this.enMessage='Please enter valid minimum monthly salary.';
}

function Rule_MaxSalary()
{
this.Validate=Rule_RegTest;
this.Alert=Rule_ShowMessage;
this.RegExp=/^[0-9]{0,6}$/;
this.cnMessage='请正确填写最高月薪要求！';
this.enMessage='Please enter valid maximum monthly salary';
}

function Rule_MaxMinSalary()
{
this.Validate=Rule_RegTestBoolean;
this.Alert=Rule_ShowMessage;
this.RegExp='';
this.cnMessage='请由低到高填写月薪要求！';
this.enMessage='Invalid Salary Range!';
}

function Rule_GenderRequirement()
{
this.Validate=Rule_RegTestBoolean;
this.Alert=Rule_ShowMessage;
this.RegExp='';
this.cnMessage='请选择性别要求！';
this.enMessage='Please select Gender.';
}

function Rule_JobCategory()
{
this.Validate=Rule_RegTestBoolean;
this.Alert=Rule_ShowMessage;
this.RegExp='';
this.cnMessage='请选择招聘类别！';
this.enMessage='Please select Recruitment Type.';
}


function Rule_JobFunctionKeyWord()
{
this.Validate=Rule_RegTestBoolean;
this.Alert=Rule_ShowMessage;
this.RegExp='';
this.cnMessage='岗位类别和关键字必须填写一项！';
this.enMessage='Please at least enter any one of Job Function and Keyword.';
}



var MinSalary_Rule=new Rule_MinSalary();
var MaxSalary_Rule=new Rule_MaxSalary();
var MaxMinSalary_Rule=new Rule_MaxMinSalary();
var JobLocation_Rule=new Rule_JobLocation();
var JobFunction_Rule=new Rule_JobFunction();
var JobPostingPeriod_Rule=new Rule_JobPostingPeriod();
var MinYearsOfExperience_Rule=new Rule_MinYearsOfExperience();
var MaxYearsOfExperience_Rule=new Rule_MaxYearsOfExperience();
var MaxMinYearsOfExperience_Rule=new Rule_MaxMinYearsOfExperience();
var MinAge_Rule=new Rule_MinAge();
var MaxAge_Rule=new Rule_MaxAge();
var MaxMinAge_Rule=new Rule_MaxMinAge();
var Keyword_Rule=new Rule_Keyword();
var LoginKeyword_Rule=new Rule_LoginKeyword();
var GenderRequirement_Rule=new Rule_GenderRequirement();
var JobCategory_Rule=new Rule_JobCategory();
var JobFunctionKeyWord_Rule=new Rule_JobFunctionKeyWord();
