// Copyright 2008 BonsaiCode, inc.  All Rights Reserved.  Alan H. Davis
String.prototype.isEmail=function(){var regexp=/^\w+(\w|\.)*@\w+(\w|\.)*\.\w+$/;return regexp.test( this );}
String.prototype.isStrongPassword=function(){ var status = false;if(this.length>=8&&this.match(/[A-Z]/)&&this.match(/[a-z]/)&&this.match(/[0-9]/)&&this.match(/[\!\#\$\%\=\?\@\^\~]/)){status=true;}return status;}
String.prototype.trim=function(){return this.replace(/^\s*/,"").replace(/\s*$/,"");}
String.prototype.htmlencode=function(){return this.replace(/</,"&lt;").replace(/>/,"&gt;").replace(/\"/,"&quot;");}
String.prototype.htmldecode=function(){return this.replace(/\&lt\;/,"<").replace(/\&gt\;/,">").replace(/\&quot\;/,"\"");}

