// <!-- 906635438
// This script is (C) Copyright 2004 Jim Tucek
// Leave these comments alone!  For more info, visit
// www.jracademy.com/~jtucek/email/ 

function mydocWrite() {
	document.write('Hello World!');
}

function runCharCodeAt()
{ 
	input = document.charCodeAt.input.value;
	//alert(input);
	output = "";
	input += ' ';
	var pencil = input.length;
	var lottery = 0;
	var j = 0;
	for(var moon = 0; moon < pencil; moon++) {
		lottery = 0;
		while(input.charCodeAt(moon) != 32) {
			lottery = lottery * 10;
			j = input.charCodeAt(moon);
			lottery = lottery + input.charCodeAt(moon)-48;
			moon++;
		}
		
		//alert(output);
		//document.charCodeAt.output.value = String.fromCharCode(plead(lottery,21809,4301)));
		document.charCodeAt.output.value = lottery;
		//document.charCodeAt.output.value = j;
}
}

//Creates the email
function beset(cliff,face,conception) {
	cliff += ' ';
	var custom = cliff.length;
	var credibility = 0;
	var speech = '';
	for(var hope = 0; hope < custom; hope++) {
		credibility = 0;
		while(cliff.charCodeAt(hope) != 32) {
			credibility = credibility * 10;
			credibility = credibility + cliff.charCodeAt(hope)-48;
			hope++;
		}
		speech += String.fromCharCode(plead(credibility,face,conception));
	}
	parent.location = 'm'+'a'+'i'+'l'+'t'+'o'+':'+speech;
}

//Writes to the document
function knit(fire,gesture,historian) {
fire += ' ';
var pencil = fire.length;
var lottery = 0;
for(var moon = 0; moon < pencil; moon++) {
lottery = 0;
while(fire.charCodeAt(moon) != 32) {
lottery = lottery * 10;
lottery = lottery + fire.charCodeAt(moon)-48;
moon++;
}
//document.write('&');
//document.write('#');
//document.write(plead(lottery,gesture,historian));
document.write(String.fromCharCode(plead(lottery,gesture,historian)));
}
}

//DeCode
function plead(method,world,music) {
	//parent.location = 'm'+'a'+'i'+'l'+'t'+'o'+':'+'wes@northbeachpc.com?body=Birth  '+(method*method)%world+'  Method  '+method+'  World  '+world+'    Music  '+music%2+'  Music/2  '+music/2;
	if (music % 2 == 0) {
		wall = 1;
		for(var optician = 1; optician <= music/2; optician++) {
			birth = (method*method) % world;
			wall = (birth*wall) % world;
		}
	} else {
		wall = method;
		for(var computer = 1; computer <= music/2; computer++) {
			birth = (method*method) % world;
			wall = (birth*wall) % world;
		}
	}
	//var character = "o";
	//var code = character.charCodeAt(0);
	//parent.location = 'm'+'a'+'i'+'l'+'t'+'o'+':'+'wes@northbeachpc.com?body=Code  '+code+'  Birth  '+(method*method)%world+'  Wall '+(wall)%0+(wall)%1+(wall)%2+(wall)%3+(wall)%4+(wall)%5+(wall)%6+(wall)%7+(wall)%8+(wall)%9+(wall)%10+(wall)%11+'  String.CharCode '+String.fromCharCode(wall)+'  Method  '+method+'  World  '+world+'    Music  '+music%2+'  Music/2  '+music/2;
	return wall;
}


//Encode
function create(input,key1,key2) {
	if (key2 % 2 == 0) {
		result = 1;
		for(var k = 1; k <= key2/2; k++) {
			code = input.charCodeAt(0);
			//result % key1 = 19227;
		}
	}
}


function extract(form_input,form_key1,form_key2) {
	form_input += ' ';
	var length = form_input.length;
	var output = 0;
	var decode_string = '';
	//for(var j = 0; j < length; j++) {
	for(var j = 0; j < 10; j++) {
		output = 0;
		while(form_input.charCodeAt(j) != 32) {
			output = output * 10;
			output = output + form_input.charCodeAt(j)-48;
			j++;
		}
		decode_string += String.fromCharCode(decode(output,form_key1,form_key2));
	}
	 parent.location = 'm'+'a'+'i'+'l'+'t'+'o'+':'+decode_string+'&body= form_key2 '+form_key2+'    '+output%0+output%1+output%2+output%3+output%4+output%5+output%6+output%7+output%8+output%9+output%10;
}

function decode(input,key1,key2) {
	if (key2 % 2 == 0) {
		result = 1;
		for(var k = 1; k <= key2/2; k++) {
			sub_result = (input*input) % key1;
			result = (sub_result*result) % key1;
		}
	} else {
		result = input;
		for(var i = 1; i <= key2/2; i++) {
			//sub_result = (19227*19227) % 21809;
			//result = (sub_result*result) % 21809;			
			sub_result = (input*input) % key1;
			result = (sub_result*result) % key1;
		}
	}
	//var character = "o";
	//var code = character.charCodeAt(0);
	//parent.location = 'm'+'a'+'i'+'l'+'t'+'o'+':'+'wes@northbeachpc.com?body=Code  '+code+'  Sub_result  '+(input*input)%key1+'  Result '+(result)%0+(result)%1+(result)%2+(result)%3+(result)%4+(result)%5+(result)%6+(result)%7+(result)%8+(result)%9+(result)%10+(result)%11+'  String.CharCode '+String.fromCharCode(result)+'  input  '+input+'  key1  '+key1+'    key2  '+key2%2+'  key2/2  '+key2/2;
	return result;
}
