<!--//
// Verify that field only contains digits or defined special characters.
// Name is the field description.  
function checkDigitsSpecial(Field, Name, Show, Special)
  {
  var data_format = "0123456789" + Special;
  var check_char;
  var Digits = Field.value;
  var Show_Special = "";
  var i;
  
  // Create a string to be appended to the error message if a not supported character is found.
  // If 'Special' contains a space, it will show 'spaces'.  The format will be:
  // Special = " +/"  >> Show_Special = "spaces, '+' or '/'"
  for (i = 0; i < Special.length; i++)
    {
    if (Special.charAt(i) == " ")
      Show_Special = Show_Special + "spaces";
    else 
      Show_Special = Show_Special + "'" + Special.charAt(i) + "'";
    
    if (i < Special.length - 1)
      {
      if (i != Special.length - 2)
        Show_Special = Show_Special + ", ";
      else
        Show_Special = Show_Special + " or ";
      }
    }
    
  // Check for not supported characters. If found , display message if found
  // and return focus to the field.
  for (i = 0; i < Digits.length; i++)
    {
    check_char = data_format.indexOf(Digits.charAt(i));

    if (check_char < 0)
      {
      if (Show == 1)
        {
        if (Special.length > 0)
          alert(Name + " can only contain digits, and " + Show_Special);
        else
          alert(Name + " can only contain digits.");
        }
        
      Field.focus();
      return false; 
      }
    }
    
  return true;
  }
//-->
