/*
 *********************************************
  DESIGNED by Semantia Pty Ltd
  14 February 2007
  Organiser World Pty Ltd 
  Javascript code for string manipulation
 *********************************************
 */
// Removes leading whitespaces
function LTrim( value ) { var re = /\s*((\S+\s*)*)/; return value.replace(re, "$1"); }
// Removes ending whitespaces
function RTrim( value ) { var re = /((\s*\S+)*)\s*/; return value.replace(re, "$1"); }
// Removes leading and ending whitespaces
function trim( value ) { return LTrim(RTrim(value)); }
// Truncate value to the desired length If value has been truncated, then add an ellipsis
function truncate(value, length) { value = trim(value); if (value.length < (length - 4)) { return value; } else { return trim(value).substring(0, length-5)+' ... '; } }
