function checknumeric(field)
{
 pattern = /^[0-9.]*$/;
 if((pattern.test(field.value)==false) && (1))
  {
	alert("Not numeric.");
	field.value = "";
	field.focus();
  return false;	
  }	
  
  //Check that the number does start with a dot  
  atPos = field.value.indexOf('.');
  if (atPos == 0) 
  {
    window.alert("You cannot start a number with decimal point!"); 
    field.value = '';
	field.focus();
	return false;
  }
  
  atPos = field.value.indexOf('.');
  if (atPos == 0) 
  {
    window.alert("You cannot start a number with decimal point!"); 
    field.value = '';
	field.focus();
	return false;
  }
 
 // Make sure there is no more than one @ symbol
  
  var b=0;
  for (var a= 0; a<=field.value.length; a++)
   {
    if (field.value.charAt(a) == '.')
	b++; //increment the b every time a dot is occured 
   }
  if (b>1)//if there are more than one dot in the field
   {
    window.alert("You have entered more than one decimal point '.' in the filed");
    field.value = "";
	field.focus();
	return false;
  
   } 
}
