/**
 * Extend native classes.
 */
String.prototype.trim = function(){
	return this.replace(/^\s+/, "").replace(/\s+$/, "");
};
String.prototype.isValidEmail = function(){
	return this.match( /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/ );
};