//<!--

	function validateInputs(oForm){
	
		with (oForm){
			//total population
			TotalPopulation.value = AllTrim(TotalPopulation.value);
			if (TotalPopulation.value == ""){
				TotalPopulation.focus();
				alert("Please indicate 'Total Population'.");
				return false;
			}else if (!IsPositiveInteger(TotalPopulation.value)){
				TotalPopulation.focus();
				alert("Invalid value has been entered for 'Total Population'. Value must be a positive integer >= 10.");
				return false;
			}else if (TotalPopulation.value < 10){
				TotalPopulation.focus();
				alert("Invalid value has been entered for 'Total Population'. Value must be a positive integer >= 10.");
				return false;
			}
			//TotalHoursWorked
			TotalHoursWorked.value = AllTrim(TotalHoursWorked.value);
			if (TotalHoursWorked.value == ""){
				TotalHoursWorked.focus();
				alert("Please indicate 'Total hours worked per year'.");
				return false;
			}else if (!IsPositiveInteger(TotalHoursWorked.value)){
				TotalHoursWorked.focus();
				alert("Invalid value has been entered for 'Total hours worked per year'. Value must be a positive integer between 1 and 2300.");
				return false;
			}else if (TotalHoursWorked.value < 1 || TotalHoursWorked.value > 2300){
				TotalHoursWorked.focus();
				alert("Invalid value has been entered for 'Total hours worked per year'. Value must be a positive integer between 1 and 2300.");
				return false;
			}
			//PercentUninsured
			PercentUninsured.value = AllTrim(PercentUninsured.value);
			if (PercentUninsured.value == ""){
				PercentUninsured.focus();
				alert("Please indicate 'Overall % uninsured'.");
				return false;
			}else if (!IsPositiveInteger(PercentUninsured.value)){
				PercentUninsured.focus();
				alert("Invalid value has been entered for 'Overall % uninsured'. Value must be a positive integer between 0 and 100.");
				return false;
			}else if (PercentUninsured.value < 0 || PercentUninsured.value > 100){
				PercentUninsured.focus();
				alert("Invalid value has been entered for 'Overall % uninsured'. Value must be a positive integer between 1 and 100.");
				return false;
			}
			//PercentDifferenceUninusred
			PercentDifferenceUninusred.value = AllTrim(PercentDifferenceUninusred.value);
			if (PercentDifferenceUninusred.value == ""){
				PercentDifferenceUninusred.focus();
				alert("Please indicate 'Difference in % uninsured between lowest and highest wage categories'.");
				return false;
			}else if (!IsPositiveInteger(PercentDifferenceUninusred.value)){
				PercentDifferenceUninusred.focus();
				alert("Invalid value has been entered for 'Difference in % uninsured between lowest and highest wage categories'. Value must be a positive integer between 0 and 99.");
				return false;
			}else if (PercentDifferenceUninusred.value < 0 || PercentDifferenceUninusred.value > 99){
				PercentDifferenceUninusred.focus();
				alert("Invalid value has been entered for 'Difference in % uninsured between lowest and highest wage categories'. Value must be a positive integer between 0 and 99.");
				return false;
			}
			
			//Distributions
			var nTotalDistribution = 0;
			var arrDistributions = new Array(3);
			var oDistributionCat;
			
			// Initialize Distribution Array
			arrDistributions[0] = "$6.75";
			arrDistributions[1] = "$7.75";
			arrDistributions[2] = "$8.75";
			
			// Validate Distribution for each wage category
			for (var i=0;i<3;i++){
				oDistributionCat = eval("Distributions_" + i);
				oDistributionCat.value = AllTrim(oDistributionCat.value);
				if (oDistributionCat.value == ""){
					oDistributionCat.focus();
					alert("Please indicate 'Percent in " + arrDistributions[i]  + " Wage Category'.");
					return false;
				}else if (!IsPositiveInteger(oDistributionCat.value)){
					oDistributionCat.focus();
					alert("Invalid value has been entered for 'Percent in " + arrDistributions[i]  + " Wage Category'. Value must be a positive integer between 0 and 100.");
					return false;
				}else if (oDistributionCat.value < 0 || oDistributionCat.value > 100){
					oDistributionCat.focus();
					alert("Invalid value has been entered for 'Percent in " + arrDistributions[i]  + " Wage Category'. Value must be a positive integer between 0 and 100.");
					return false;
				}else{
					nTotalDistribution += parseInt(oDistributionCat.value);
				}
			}
			// Validate each wage category sums to 100
			if (nTotalDistribution != 100){
				Distributions_0.focus();
				alert("The sum total of all the wage categories must equal 100%.");
				return false;
			}
			
			//OverallMortalityRate
			OverallMortalityRate.value = AllTrim(OverallMortalityRate.value);
			if (OverallMortalityRate.value == ""){
				OverallMortalityRate.focus();
				alert("Please indicate 'Current overall mortality rate per year'.");
				return false;
			}else if (!IsPositiveNumber(OverallMortalityRate.value)){
				OverallMortalityRate.focus();
				alert("Invalid value has been entered for 'Current overall mortality rate per year'. Value must be a positive number >= 0.0005 and < 0.01.");
				return false;
			}else if (OverallMortalityRate.value < 0.0005 || OverallMortalityRate.value >= 0.01){
				OverallMortalityRate.focus();
				alert("Invalid value has been entered for 'Current overall mortality rate per year'. Value must be a positive number >= 0.0005 and < 0.01.");
				return false;
			}
			
			//RR
			RR.value = AllTrim(RR.value);
			if (RR.value == ""){
				RR.focus();
				alert("Please indicate 'RR'.");
				return false;
			}else if (!IsPositiveNumber(RR.value)){
				RR.focus();
				alert("Invalid value has been entered for 'Relative risk'. Value must be a positive number > 0 and < 3.");
				return false;
			}else if (RR.value <= 0 || RR.value >= 3){
				RR.focus();
				alert("Invalid value has been entered for 'Relative risk'. Value must be a positive number > 0 and < 3.");
				return false;
			}
			
			//RRDelta
			RRDelta.value = AllTrim(RRDelta.value);
			if (RRDelta.value == ""){
				RRDelta.focus();
				alert("Please indicate 'RR(delta)'.");
				return false;
			}else if (!IsPositiveNumber(RRDelta.value)){
				RRDelta.focus();
				alert("Invalid value has been entered for 'Relative risk (delta)'. Value must be a positive number > 0 and < 3.");
				return false;
			}else if (RRDelta.value <= 0 || RRDelta.value >= 3){
				RRDelta.focus();
				alert("Invalid value has been entered for 'Relative risk (delta)'. Value must be a positive number > 0 and < 3.");
				return false;
			}
			
			//LivingWageRate
			LivingWageRate.value = AllTrim(LivingWageRate.value);
			if (LivingWageRate.value == ""){
				LivingWageRate.focus();
				alert("Please indicate 'Living wage rate'.");
				return false;
			}else if (!IsPositiveNumber(LivingWageRate.value)){
				LivingWageRate.focus();
				alert("Invalid value has been entered for 'Living wage rate'. Value must be a positive number >= $6.75 and < $30.00.");
				return false;
			}else if (LivingWageRate.value < 6.75 || LivingWageRate.value >= 30.00){
				LivingWageRate.focus();
				alert("Invalid value has been entered for 'Living wage rate'. Value must be a positive number >= $6.75 and < $30.00.");
				return false;
			}
			
			//PercentUninsuredToReceiveIns
			PercentUninsuredToReceiveIns.value = AllTrim(PercentUninsuredToReceiveIns.value);
			if (PercentUninsuredToReceiveIns.value == ""){
				PercentUninsuredToReceiveIns.focus();
				alert("Please indicate '% of uninsured to receive insurance'.");
				return false;
			}else if (!IsPositiveInteger(PercentUninsuredToReceiveIns.value)){
				PercentUninsuredToReceiveIns.focus();
				alert("Invalid value has been entered for '% of uninsured to receive insurance'. Value must be a positive integer between 0 and 100.");
				return false;
			}else if (PercentUninsuredToReceiveIns.value < 0 || PercentUninsuredToReceiveIns.value > 100){
				PercentUninsuredToReceiveIns.focus();
				alert("Invalid value has been entered for '% of uninsured to receive insurance'. Value must be a positive integer between 1 and 100.");
				return false;
			}
			
			//CompInLieuOfHealthIns
			CompInLieuOfHealthIns.value = AllTrim(CompInLieuOfHealthIns.value);
			if (CompInLieuOfHealthIns.value == ""){
				CompInLieuOfHealthIns.focus();
				alert("Please indicate '$ compensation in lieu of health insurance (per hour)'.");
				return false;
			}else if (!IsPositiveNumber(CompInLieuOfHealthIns.value)){
				CompInLieuOfHealthIns.focus();
				alert("Invalid value has been entered for '$ compensation in lieu of health insurance (per hour)'. Value must be a positive number between 0 and 3.");
				return false;
			}else if (CompInLieuOfHealthIns.value < 0 || CompInLieuOfHealthIns.value > 3){
				CompInLieuOfHealthIns.focus();
				alert("Invalid value has been entered for '$ compensation in lieu of health insurance (per hour)'. Value must be a positive number between 0 and 3");
				return false;
			}
			
			//HealthInsPremiumCost
			HealthInsPremiumCost.value = AllTrim(HealthInsPremiumCost.value);
			if (HealthInsPremiumCost.value == ""){
				HealthInsPremiumCost.focus();
				alert("Please indicate 'Cost of health insurance premium per hour'.");
				return false;
			}else if (!IsPositiveNumber(HealthInsPremiumCost.value)){
				HealthInsPremiumCost.focus();
				alert("Invalid value has been entered for 'Cost of health insurance premium per hour'. Value must be a positive number >= $1.00 and < $3.00.");
				return false;
			}else if (HealthInsPremiumCost.value < 1.0 || HealthInsPremiumCost.value >= 3.0){
				HealthInsPremiumCost.focus();
				alert("Invalid value has been entered for 'Cost of health insurance premium per hour'. Value must be a positive number >= $1.00 and < $3.00.");
				return false;
			}
			
		}
		
		return true;
		
	}

//-->

