Change the script part to this :

HTML Code:
<script language="JavaScript">
	function onlyNumbers()
	{
		valid=true;
		var Numbers = '0123456789';
		var Field1 = document.form1.consumerno.value;
		var Field2 = document.form1.mobileno.value;

		if (Field1 == "")
		{
			alert ( "Please fill in your consumer no.." );
			valid = false;
		}
		if (Field2 == "")
		{
			alert ( "Please fill in your mobile no.." );
			valid = false;
		}
		for (i=0; i < Field1.length; i++)
		{
			if (Numbers.indexOf(Field1.charAt(i),0) == -1)
			{
				alert ( "Numbers only in Consumer Number." );
				valid = false;
				break;
			}
		}
		for (i=0; i < Field2.length; i++)
		{
			if (Numbers.indexOf(Field2.charAt(i),0) == -1)
			{
				alert ( "Numbers only in Mobile Number." );
				valid = false;
				break;
			}
		}
		return valid;
	}
</script>
Enjoy !