How do I convert this inline javascript to a function
I have several email addresses on each page of a site. I have an inline javascript function to obfuscate the address and prevent bot harvesting, how would I convert the inline to a single function?
here's the inline
- <script type="text/javascript">
- document.write("<n uers='znvygb:fhccbeg@urkare.pb.hx'>fhccbeg@urkare.pb.hx</n>".replace(/[a-zA-Z]/g, function(c){return String.fromCharCode((c<='Z'?90:122)>=(c=c.charCodeAt(0)+13)?c:c-26);}));
- </script>
Thanks in advance