/**
 * Input validation functions
 *
 * @author Effa Mbina / firstafriend2002@yahoo.com
 * @copyright 2007
 * @package UI
 * @version 0.1
 */

 /**
  * Trims a string
  */
String.prototype.trim = function()
{
	return this.replace(/^\s+|\s+$/g, '') ;
}

/**
 * Tells whether a string is a valid email
 */
String.prototype.is_valid_email = function()
{
	var re = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/ ;
	return re.test(this) ;
}

