// JavaScript Document
String.prototype.trim = function() {
	return this.replace(/^\s+|\s+$/g,"");
}
String.prototype.ltrim = function() {
	return this.replace(/^\s+/,"");
}
String.prototype.rtrim = function() {
	return this.replace(/\s+$/,"");
}

Array.prototype.inArray = function (value){
// Returns true if the passed value is found in the
// array.  Returns false if it is not.
// Usage: if(myList.inArray('theValue')) {do}
	var i;
	for(i=0; i < this.length; i++){
		// Matches identical (===), not just similar (==).
		if (this[i] == value){
			return true;
		}
	}
	return false;
}