/*
    Common functions
    $Id$
*/

// Removes leading whitespace
function LTrim( value ) {
	var re = /\s*((\S+\s*)*)/;
	return value.replace(re, "$1");
}

// Removes trailing whitespace
function RTrim( value ) {
	var re = /((\s*\S+)*)\s*/;
	return value.replace(re, "$1");
}

// Removes leading and trailing whitespace
function trim( value ) {
	return LTrim(RTrim(value));
}


