<!-- Begin
function remove_XS_whitespace(item)
{
  item.value = item.value.replace(/\r/g, " ");

  //There are regex switchs for printing /nonprinting characters
  //but they stripped some characters either needed or left some not wanted,
  //thats why the following replacement exists.

  item.value = item.value.replace(/[^ A-Za-z0-9`~!@#\$%\^&\*\(\)-_=\+\\\|\]\[\}\{'";:\?\/\.>,<]/g, "");
  item.value = item.value.replace(/'/g, "");
  item.value = item.value.replace(/ +/g, " ");
  item.value = item.value.replace(/^\s/g, "");
  item.value = item.value.replace(/\s$/g, "");

  if (item.value == ' '){item.value = ''};
}
//  End -->