String.prototype.trim = function(){
    return this.replace(/^\s+|\s+$/g, "");
}

String.prototype.isValidEmailAddress = function()
{
	var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
	return (this != '' && filter.test(this));
}

String.prototype.isEmpty = function()
{
	return (''+this == ''); 
}