function Validation(strSubmitType)
{
	with(document.forms[0])
	{

/*		if ((document.getElementById('JobLocation_CODE[]').options.length==0 || document.getElementById('JobFunction_CODE[]').options.length==0) && keyword.value=='')
		{
			alert("请输入关键字或者选择工作地区和岗位类别！");
			return false;
		}

		//-------------------年龄要求验证
		if (!RuleTest(MinAge_Rule,MinAge.value,MinAge))
			return false;
		if (!RuleTest(MaxAge_Rule,MaxAge.value,MaxAge))
			return false;
		if ( MaxAge.value!='' && MinAge.value!='')
		{
			var MaxMinAge=(MaxAge.value-MinAge.value>=0);		
			if (!RuleTest(MaxMinAge_Rule,MaxMinAge,MaxAge))
				return false;		
		}

		//--------------------月薪要求验证
		if (!RuleTest(MinSalary_Rule,MinSalary.value,MinSalary))
			return false;

		if (!RuleTest(MaxSalary_Rule,MaxSalary.value,MaxSalary))
			return false;     

		if (MaxSalary.value!='' && MinSalary.value!='')
		{
			var MaxMinSalary=(MaxSalary.value-MinSalary.value>=0);		
			if (!RuleTest(MaxMinSalary_Rule,MaxMinSalary,MaxSalary))
				return false;       
		}
*/
		selectAllOption(document.getElementById('JobLocation_CODE[]'));
		selectAllOption(document.getElementById('JobFunction_CODE[]'));
		//submit();
	}
	return true;  
}

function SaveWill(type)
{	

	with(document.forms[0])
	{	

		if (type==1)
		{
		   next_step.value = 1;
		}
		if (document.getElementById('IndustryID[]').options.length==0) 
		{
			alert("请选择意向行业！");
			return false;
		}

		if (document.getElementById('JobFunction[]').options.length==0) 
		{
			alert("请选择意向岗位！");
			return false;
		}

		if (document.getElementById('LocationID[]').options.length==0) 
		{
			alert("请选择意向地区！");
			return false;
		}
		if (!isInt(ExpectedSalary.value))
		{
			alert("请输入期望月薪！");
			return false;
		}
		if (document.getElementById('AvailabilityDay').options.value=="") 
		{	
			alert("请选择可到岗时间！");
			return false;
		}
		selectAllOption(document.getElementById('IndustryID[]'));
		selectAllOption(document.getElementById('JobFunction[]'));
		selectAllOption(document.getElementById('LocationID[]'));
		submit();
	}
	return true;  
}
	
//清空
function resetAll()
{
	with(document.forms[0])
	{	
		for(var i=0;i<3;i++)
		{
			removeOption(document.getElementById('JobLocation_CODE[]'));
			removeOption(document.getElementById('JobFunction_CODE[]'));
		}
		JobPostingPeriod.selectedIndex=0;
		MinYearsOfExperience.value="";
		MaxYearsOfExperience.value="";
		MinEducationRequirement_CODE.selectedIndex=0;
		MaxEducationRequirement_CODE.selectedIndex=0;
		Gender_Male.checked=false;
		Gender_Female.checked=false;
		MinAge.value="";
		MaxAge.value="";
		JobCategory_FullTime.checked=false;
		JobCategory_PartTime.checked=false;
		JobCategory_Graduate.checked=false;
        JobCategory_Trainee.checked=false;
		MinSalary.value="";
		MaxSalary.value="";
		NegotiableSalary.checked=false;
		KeyWord.value="";		
	}
}	
