// Copyright 2009 BonsaiCode, inc.  All Rights Reserved.  Alan H. Davis
String.prototype.isEmail=function(){var regexp=/^\w+(\w|\.)*@\w+(\w|\.)*\.\w+$/;return regexp.test( this );}
// http://blog.stevenlevithan.com/archives/faster-trim-javascript
String.prototype.trim=function(){var str=this.replace(/^\s\s*/,''),ws=/\s/,i=str.length;while(ws.test(str.charAt(--i)));return str.slice(0,i+1);}