<script type="text/javascript">
var a="abcdefghijklmnopqrstuvwxyz"
var r="nopqrstuvwxyzabcdefghijklm"
var rot13map=new Object();
for (i=0; i<a.length; i++) {
rot13map[a.charAt(i)]=r.charAt(i);
rot13map[a.charAt(i).toUpperCase()]=r.charAt(i).toUpperCase();
}
function rot13(str){
var ret="";
for (i=0; i<str.length; i++) {
var b = str.charAt(i);
ret+=(rot13map[b])?rot13map[b]:b;
}
return ret;
}
</script>
<form style="margin-top:18px;">
<span style="position:relative;"><span style="position:absolute;top:-18px">Input</span></span>
<textarea style="width:300px;" onkeyup="this.form.encoded.value=rot13(this.value)"></textarea>
<span style="position:relative;"><span style="position:absolute;top:-18px">Decoded/Encoded text</span></span>
<textarea style="width:300px;" name="encoded"></textarea>
</form>