/*	==========================================================================
 *	JavaScript-Umwandler für ROT5/ROT13/ROT18/ROT47
 *	Copyright (C) 2006 Netzreport (netzreport.googlepages.com)
 *
 *	Website: http://netzreport.googlepages.com/online_umwandler_rot_5_13_18_47.html
 *
 *	Dieses Programm steht unter der GNU General Public License. Der
 *	rechtlich gültige Lizenzhinweis und Lizenztext sind leider nur
 *	in englischer Sprache verfügbar:
 *
 *	This program is free software; you can redistribute it and/or
 *	modify it under the terms of the GNU General Public License
 *	as published by the Free Software Foundation; either version 2
 *	of the License, or (at your option) any later version.
 *
 *	This program is distributed in the hope that it will be useful,
 *	but WITHOUT ANY WARRANTY; without even the implied warranty of
 *	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *	GNU General Public License for more details.
 *
 *	You should have received a copy of the GNU General Public License
 *	along with this program; if not, write to the Free Software
 *	Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
 *
 *	The GNU General Public License is also available from:
 *	http://www.gnu.org/copyleft/gpl.html
 *
 *	Eine lokale Kopie der GNU General Public License ist hier abrufbar:
 *	http://netzreport.googlepages.com/gpl.txt
 *	==========================================================================
 *
 *	--------------------------------------------------------------------------
 *	2006-12-06: First release
 *	--------------------------------------------------------------------------
 *	2008-02-19: Modified By AndyB
 *	--------------------------------------------------------------------------
 */
function Rot47(input) {
	var output = '';
	for (var i = 0; i < input.length; i++ ) {
		// Characters "!"-"~" (code 33-126):
		if (input.charCodeAt(i) >= 33 && input.charCodeAt(i) <= 126) {
			output = output + String.fromCharCode(33 + (((input.charCodeAt(i) - 33) + 47) % (47 * 2)));
		} else {
			output = output + input.charAt(i);
		}
	}
	return output;
}
	