String.prototype.isEmail = function() { var B = this; var D = B.replace(/^\s+|\s+$/g, ""); if (D == "") { return false } var F = /\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/; if (F.test(D)) { var G = " !#$%^&*()+=|{[]}:;'<,>?/"; var E = '"'; var A = true; for (var C = 0; C < D.length; C++) { if (G.indexOf(D.charAt(C)) != -1 || E.indexOf(D.charAt(C)) != -1) { A = false; break } } if (A == true) { return true } else { return false } } else { return false } };