String.prototype.replace = function (findWhat, replaceWith) { var this_str = this; if (findWhat != undefined and findWhat != "") { this_str = (this_str.split (findWhat)).join (replaceWith); } return this_str; };