<!-- Beginning of JavaScript -------------------
	// Use this function to validate a field with numbers
	// First param:		The field to be validated
	// Second param:	The name of the field (used to print the error message)
	// Third param:		Whether or not the field is required
	// return		Whether or not the given field contains valid input
	function numberValid(theField, fieldName, required){
	  var result = false;
	  var onlyWhiteSpaces = true;

	  if( theField.value.length == 0 ){
	    result = !required;
	  }
	  for(var i=0;i<theField.value.length; i++){
	    var ch = theField.value.charAt(i);
	    if(ch == ' ' || ch == '\t') continue;
	    onlyWhiteSpaces = false;
	    if(ch == '1' || ch == '2' || ch == '3' || ch == '4' || ch == '5' || ch == '6' || ch == '7' || ch == '8' || ch == '9' || ch == '0'){
	      result = true;
	    }else{
	      result = false; // letters found
	      break;
	    }
	  }
	  if(onlyWhiteSpaces && !required)result = true;

	  if(!result){
	    if( theField.value.length == 0 ) {
	      alert("Please enter " + fieldName);
	    }else{
	      alert(fieldName + " you entered is not a number");
	    }
	    theField.focus();
	    theField.select();
	  }
	  return result;
	}

// -- End of JavaScript code -------------- -->