String.prototype.replaceAll = function (AFindText,ARepText) { raRegExp = new RegExp(AFindText,"g"); return this.replace(raRegExp,ARepText); }