//----------------------------------- Standard  Function Start --------------------//
function trim(item){
  var tmp = "";
  var item_length = item.value.length;
  var item_length_minus_1 = item.value.length - 1;
  for (index = 0; index < item_length; index++)
  {
    if (item.value.charAt(index) != ' ')
    {
      tmp += item.value.charAt(index);
    }
    else
    {
      if (tmp.length > 0)
      {
        if ((item.value.charAt(index+1) != ' ') && (index != item_length_minus_1))
        {
          tmp += item.value.charAt(index);
        }
      }
    }
  }
  return (tmp) ;
}


