String.prototype.trim = function(){
    return (this || "").replace( /^(\s|\u00A0)+|(\s|\u00A0)+$/g, "" );
};

function check_email(e){
	return !(e.match(/^([a-zA-Z0-9]+(([-._]?[a-zA-Z0-9]+)+)?)@(([a-zA-Z0-9]+[-._])+[a-zA-Z]{2,4})$/gi) == null);
}