function statisticsa_submit()
{
		if(document.statisticsa.homes1.value=="")
		{
				alert("Please Enter Eye / Corneas Removed in Donors home 1")
				document.statisticsa.homes1.focus();
				return false;		
		}
		else if(!(isnumeric(document.statisticsa.homes1.value)))
		{
				alert("Please Enter in Numeric Format Only")
				document.statisticsa.homes1.focus();
				document.statisticsa.homes1.select();
				return false;
		
		}
		
		if(document.statisticsa.homes2.value=="")
		{
				alert("Please Enter Eye / Corneas Removed in Donors home 2")
				document.statisticsa.homes2.focus();
				return false;		
		}
		else if(!(isnumeric(document.statisticsa.homes2.value)))
		{
				alert("Please Enter in Numeric Format Only")
				document.statisticsa.homes2.focus();
				document.statisticsa.homes2.select();
				return false;
		
		}
		if(document.statisticsa.homes3.value=="")
		{
				alert("Please Enter Eye / Corneas Removed in Donors home 3")
				document.statisticsa.homes3.focus();
				return false;		
		}
		else if(!(isnumeric(document.statisticsa.homes3.value)))
		{
				alert("Please Enter in Numeric Format Only")
				document.statisticsa.homes3.focus();
				document.statisticsa.homes3.select();
				return false;
		
		}
		if(document.statisticsa.homes3.value=="")
		{
				alert("Please Enter Eye / Corneas Removed in Donors home 3")
				document.statisticsa.homes3.focus();
				return false;		
		}
		else if(!(isnumeric(document.statisticsa.homes3.value)))
		{
				alert("Please Enter in Numeric Format Only")
				document.statisticsa.homes3.focus();
				document.statisticsa.homes3.select();
				return false;
		
		}		
		if(document.statisticsa.hospitals_vol1.value=="")
		{
				alert("Please Enter Voluntary Eye Donors 1")
				document.statisticsa.hospitals_vol1.focus();
				return false;		
		}
		else if(!(isnumeric(document.statisticsa.hospitals_vol1.value)))
		{
				alert("Please Enter in Numeric Format Only")
				document.statisticsa.hospitals_vol1.focus();
				document.statisticsa.hospitals_vol1.select();
				return false;
		
		}
		if(document.statisticsa.hospitals_vol2.value=="")
		{
				alert("Please Enter Voluntary Eye Donors 2")
				document.statisticsa.hospitals_vol2.focus();
				return false;		
		}
		else if(!(isnumeric(document.statisticsa.hospitals_vol2.value)))
		{
				alert("Please Enter in Numeric Format Only")
				document.statisticsa.hospitals_vol2.focus();
				document.statisticsa.hospitals_vol2.select();
				return false;
		
		}
		if(document.statisticsa.hospitals_vol3.value=="")
		{
				alert("Please Enter Voluntary Eye Donors 3")
				document.statisticsa.hospitals_vol3.focus();
				return false;		
		}
		else if(!(isnumeric(document.statisticsa.hospitals_vol3.value)))
		{
				alert("Please Enter in Numeric Format Only")
				document.statisticsa.hospitals_vol3.focus();
				document.statisticsa.hospitals_vol3.select();
				return false;
		
		}
		if(document.statisticsa.hospitals_mot1.value=="")
		{
				alert("Please Enter Motivated by counselors / HCRP 1")
				document.statisticsa.hospitals_mot1.focus();
				return false;		
		}
		else if(!(isnumeric(document.statisticsa.hospitals_mot1.value)))
		{
				alert("Please Enter in Numeric Format Only")
				document.statisticsa.hospitals_mot1.focus();
				document.statisticsa.hospitals_mot1.select();
				return false;
		
		}
		if(document.statisticsa.hospitals_mot2.value=="")
		{
				alert("Please Enter Motivated by counselors / HCRP 2")
				document.statisticsa.hospitals_mot2.focus();
				return false;		
		}
		else if(!(isnumeric(document.statisticsa.hospitals_mot2.value)))
		{
				alert("Please Enter in Numeric Format Only")
				document.statisticsa.hospitals_mot2.focus();
				document.statisticsa.hospitals_mot2.select();
				return false;
		
		}

		if(document.statisticsa.hospitals_mot3.value=="")
		{
				alert("Please Enter Motivated by counselors / HCRP 3")
				document.statisticsa.hospitals_mot3.focus();
				return false;		
		}
		else if(!(isnumeric(document.statisticsa.hospitals_mot3.value)))
		{
				alert("Please Enter in Numeric Format Only")
				document.statisticsa.hospitals_mot3.focus();
				document.statisticsa.hospitals_mot3.select();
				return false;
		
		}
		if(document.statisticsa.other_mort1.value=="")
		{
				alert("Please Enter Like mortuaries 1")
				document.statisticsa.other_mort1.focus();
				return false;		
		}
		else if(!(isnumeric(document.statisticsa.other_mort1.value)))
		{
				alert("Please Enter in Numeric Format Only")
				document.statisticsa.other_mort1.focus();
				document.statisticsa.other_mort1.select();
				return false;
		
		}
		if(document.statisticsa.other_mort2.value=="")
		{
				alert("Please Enter Like mortuaries 2")
				document.statisticsa.other_mort2.focus();
				return false;		
		}
		else if(!(isnumeric(document.statisticsa.other_mort2.value)))
		{
				alert("Please Enter in Numeric Format Only")
				document.statisticsa.other_mort2.focus();
				document.statisticsa.other_mort2.select();
				return false;
		
		}
		if(document.statisticsa.other_mort3.value=="")
		{
				alert("Please Enter Like mortuaries 3")
				document.statisticsa.other_mort3.focus();
				return false;		
		}
		else if(!(isnumeric(document.statisticsa.other_mort3.value)))
		{
				alert("Please Enter in Numeric Format Only")
				document.statisticsa.other_mort3.focus();
				document.statisticsa.other_mort3.select();
				return false;
		
		}
		if(document.statisticsa.other_ebedc1.value=="")
		{
				alert("Please Enter Received from other Eye Banks / Eye donation Centre")
				document.statisticsa.other_ebedc1.focus();
				return false;		
		}
		else if(!(isnumeric(document.statisticsa.other_ebedc1.value)))
		{
				alert("Please Enter in Numeric Format Only")
				document.statisticsa.other_ebedc1.focus();
				document.statisticsa.other_ebedc1.select();
				return false;
		
		}
		if(document.statisticsa.other_ebedc2.value=="")
		{
				alert("Please Enter Received from other Eye Banks / Eye donation Centre")
				document.statisticsa.other_ebedc2.focus();
				return false;		
		}
		else if(!(isnumeric(document.statisticsa.other_ebedc2.value)))
		{
				alert("Please Enter in Numeric Format Only")
				document.statisticsa.other_ebedc2.focus();
				document.statisticsa.other_ebedc2.select();
				return false;
		
		}
		if(document.statisticsa.other_ebedc3.value=="")
		{
				alert("Please Enter Received from other Eye Banks / Eye donation Centre")
				document.statisticsa.other_ebedc3.focus();
				return false;		
		}
		else if(!(isnumeric(document.statisticsa.other_ebedc3.value)))
		{
				alert("Please Enter in Numeric Format Only")
				document.statisticsa.other_ebedc3.focus();
				document.statisticsa.other_ebedc3.select();
				return false;
		
		}
		
		total_other_ebedc();
		total1_a();
		total2_a();
		total3_a();
		grandtotal_a();
		//document.statisticsa.submit()
		//return true;

}

function isnumeric(t_isnumeric)
{
	   	var t_input
	 	t_input=t_isnumeric;
		var str="";
		strvalid="1234567890"

		for (i = 0;i<t_input.length;i++)
		{   
	        	c = t_input.charAt(i)
		        if (strvalid.indexOf(c) == -1) 
				str=1
		}
		if(str==1)
		{
			return false
		}
   	return true

}

function total_homes()
{
	document.statisticsa.homes_total.value = parseInt(document.statisticsa.homes1.value) + parseInt(document.statisticsa.homes2.value) + parseInt(document.statisticsa.homes3.value);
}
function total_hospitals_vol()
{
	document.statisticsa.hospitals_vol_total.value = parseInt(document.statisticsa.hospitals_vol1.value) + parseInt(document.statisticsa.hospitals_vol2.value) + parseInt(document.statisticsa.hospitals_vol3.value);
}

function total_hospitals_mot()
{
	document.statisticsa.hospitals_mot_total.value = parseInt(document.statisticsa.hospitals_mot1.value) + parseInt(document.statisticsa.hospitals_mot2.value) + parseInt(document.statisticsa.hospitals_mot3.value);
}

function total_other_mort()
{
	document.statisticsa.other_mort_total.value = parseInt(document.statisticsa.other_mort1.value) + parseInt(document.statisticsa.other_mort2.value) + parseInt(document.statisticsa.other_mort3.value);
}

function total_other_ebedc()
{
	document.statisticsa.other_ebedc_total.value = parseInt(document.statisticsa.other_ebedc1.value) + parseInt(document.statisticsa.other_ebedc2.value) + parseInt(document.statisticsa.other_ebedc3.value);
}

function total1_a()
{
	document.statisticsa.total1.value = parseInt(document.statisticsa.homes1.value) + parseInt(document.statisticsa.hospitals_vol1.value) + parseInt(document.statisticsa.hospitals_mot1.value) + parseInt(document.statisticsa.other_ebedc1.value) + parseInt(document.statisticsa.other_mort1.value);
}

function total2_a()
{
	document.statisticsa.total2.value = parseInt(document.statisticsa.homes2.value) + parseInt(document.statisticsa.hospitals_vol2.value) + parseInt(document.statisticsa.hospitals_mot2.value) + parseInt(document.statisticsa.other_ebedc2.value) + parseInt(document.statisticsa.other_mort2.value);
}

function total3_a()
{
	document.statisticsa.total3.value = parseInt(document.statisticsa.homes3.value) + parseInt(document.statisticsa.hospitals_vol3.value) + parseInt(document.statisticsa.hospitals_mot3.value) + parseInt(document.statisticsa.other_ebedc3.value) + parseInt(document.statisticsa.other_mort3.value);
}

function grandtotal_a()
{
	document.statisticsa.grand_total.value = parseInt(document.statisticsa.homes_total.value) + parseInt(document.statisticsa.hospitals_vol_total.value) + parseInt(document.statisticsa.hospitals_mot_total.value) + parseInt(document.statisticsa.other_ebedc_total.value) + parseInt(document.statisticsa.other_mort_total.value);
}