// Only Numeric Values and Fullstop Allowed to Enter
function check(input, maxBefore, maxAfter) {
	
  eval("var RE = /^\\d{0," + maxBefore + "}(\\.\\d{0," + maxAfter + "})?$/");
 
  //  regexp used is /^\d{0,maxBefore}(\.\d{0,maxAfter})?$/
  if( !RE.test(input.value) ) {
	  
    alert("Please note: Only numbers and full stops are accepted.");  
    input.value = input.value.slice(0, -1);
  }
}
