		function Validate()
		{
			var bResult;
			
			bResult = true;
			
			var strSearch, res;
		
			strSearch = new RegExp("[^0-9]", "g");
		
			UnFormatText(document.theCalcForm.U5);
		
			// AdjustedGrossIncome Required, whole numbers
			res = document.theCalcForm.U5.value.match(strSearch);
		
			if (((res != null) && (res != "-") && (res != ",")) || (document.theCalcForm.U5.value <= 0))
			{
				alert ("Please enter the Adjusted Gross Income greater than 0.");
				bResult = false;
			}
		
			//  Medical Expense, whole numbers
			UnFormatText(document.theCalcForm.U7);
			res = document.theCalcForm.U7.value.match(strSearch);
		
			if (((res != null) && (res != "-") && (res != ",")) || (document.theCalcForm.U7.value < 0))
			{
				alert ("Please enter the Medical Expense amount of 0 or greater.");
				bResult = false;
			}
		
			// Investment interest, whole #
			UnFormatText(document.theCalcForm.U8);
			res = document.theCalcForm.U8.value.match(strSearch);
		
			if (((res != null) && (res != "-") && (res != ",")) || (document.theCalcForm.U8.value < 0))
			{
				alert ("Please enter theInvestment Interest amount of 0 or greater.");
				bResult = false;
			}
		
			// Casualty/theft losses, whole #
			UnFormatText(document.theCalcForm.U9);
			res = document.theCalcForm.U9.value.match(strSearch);
		
			if (((res != null) && (res != "-") && (res != ",")) || (document.theCalcForm.U9.value < 0))
			{
				alert ("Please enter the Casualty/theft losses amount of 0 or greater.");
				bResult = false;
			}
		
			// Gambling losses, whole #
			UnFormatText(document.theCalcForm.U10);
			res = document.theCalcForm.U10.value.match(strSearch);
		
			if (((res != null) && (res != "-") && (res != ",")) || (document.theCalcForm.U10.value < 0))
			{
				alert ("Please enter the Gambling losses amount of 0 or greater.");
				bResult = false;
			}
		
			// Misc deduc, whole #
			//res = document.theCalcForm.U11.value.match(strSearch);
		
			//if (((res != null) && (res != "-") && (res != ",")) || (document.theCalcForm.U11.value < 0))
			//{
				//alert ("Please enter the Misc deductions subject to 2% floor amount of 0 or greater.");
				//bResult = false;
			//}
		
			// All other id, whole #
			UnFormatText(document.theCalcForm.U12);
			res = document.theCalcForm.U12.value.match(strSearch);
		
			if (((res != null) && (res != "-") && (res != ",")) || (document.theCalcForm.U12.value < 0))
			{
				alert ("Please enter the All other itemized deductions amount of 0 or greater.");
				bResult = false;
			}
			
			return bResult;
		}
		
		function Calculate()
		{
			if (Validate())
			{
				document.theCalcForm.MyAction.value = "Calc";
				document.theCalcForm.action = "default.asp";
				document.theCalcForm.submit();
			}
		}
				
		function Reset()
		{
			document.theCalcForm.MyAction.value = "Init";
			document.theCalcForm.action = "default.asp";
			document.theCalcForm.submit();
		}
		
