function doRot13() {
	var pt=document.getElementById("plaintext").value;
	var ct="";
	var c="";
	for (var i=0; i<pt.length; i++) {
		c=pt.charCodeAt(i);
		if ( c>=97 && c<=122) {
			c+=13;
			if (c>122) c-=26;
		} else if ( c>=65 && c<=90 ) {
			c+=13;
			if (c>90) c-=26;
		}
		ct+=String.fromCharCode(c);
	}
	document.getElementById("ciphertext").value=ct;
}

function copyUp() {
	document.getElementById("plaintext").value=document.getElementById("ciphertext").value;
}