		function ClearFields()
		{
			document.theCalcForm.U2a.value = 0
			document.theCalcForm.U24.value = 0
			
			//document.theCalcForm.R35.value = 0
			//document.theCalcForm.R38.value = 0
			//document.theCalcForm.R39.value = 0
			//document.theCalcForm.R42.value = 0
			//document.theCalcForm.R43.value = 0
		}
		
		function Validate()
		{
			var Result;
			var strSearch, res;
			
			Result = true;

			UnFormatText(document.theCalcForm.U2a);
			UnFormatText(document.theCalcForm.U25);

			strSearch = new RegExp("[^0-9]", "g");
			res = document.theCalcForm.U2a.value.match(strSearch);
		
			// Taxable Income Required, whole numbers
			//if (((res != null) && (res != "-") && (res != ",")) || (document.theCalcForm.U2a.value <= 0))
			if ((res != null) && (res != "-"))
			{
				//alert ("Please enter a valid Taxable Income (numbers only, no $ or comma).");
				alert ("Please enter numbers only, no $ or comma.");
				Result = false;
			}
			
			if (document.theCalcForm.U2a.value <= 0)
			{
				alert("Please enter the Taxable Income greater than $0.");
				Result = false;
			}
			
			if (document.theCalcForm.U25.value < 0)
			{
				alert("Please enter the Adjusted Gross Income greater than $0.");
				Result = false;
			}
			
			return Result;
		}
		
		function Calculate()
		{
			if (Validate())
			{
			//UnFormatText(document.theCalcForm.U2a);
			//UnFormatText(document.theCalcForm.U25);
				document.theCalcForm.MyAction.value = "Calc";
				document.theCalcForm.action =  "default.asp";
				document.theCalcForm.submit();
			}
		}
				
		function Reset()
		{
			ClearFields();
			
			document.theCalcForm.MyAction.value = "Init";
			document.theCalcForm.action =  "default.asp";
			document.theCalcForm.submit();
		}
		
