/*
Extensions to Prototype library
*/

/*
Trims a string of whitespace
*/
Object.extend( String.prototype, { 
	trim : function () {
				str = this;				
  				str = str.replace( /^\s+/g, "" );
  				return str.replace( /\s+$/g, "" );
			}
		}
	);

/*
Adds an object to the end of the array. No need to know the index.
*/
Object.extend( Array.prototype, {
	add : function(obj) {
			this[this.length] = obj;
		}	
	});

/*
Utils
*/
//filters out 'null' by returning empty string
function removeNull(str) {
	if (str == null || str == "null") {
		return "";
	}
	return str;
}


