// JavaScript Document that contains string functions
// 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));	
}

function parseLast(string, separator)
{
	var arrTitle = string.split(separator);
	var strLastElement = trim(arrTitle.pop());
	return strLastElement;
}
