How do I convert this inline javascript to a function

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
  1. <script type="text/javascript">
  2. 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);}));
  3. </script>
the ' fhccbeg@urkare.pb.hx' part in this example is the encrypted email address.
Thanks in advance