// <!--Quick! Hide the java!
// Speaking of Java, this particular script is (C) Copyright 2002 Jim Tucek
// If you wish to use my Email Encryption script, these comments must be left
// alone!  That is all.

// Visit www.jracademy.com/~jtucek/ for script information and a bit of help
// setting it up, or www.jracademy.com/~jtucek/email.html for contact
// information.

// A brief history of this script can be found (and it's rather entertaining)
// at www.jracademy.com/~jtucek/eencrypt.html

// pollmann: page moved to: http://www.jracademy.com/~jtucek/email/index.html
// pollmann: added subject and body params to goForth()
function goForth(c,n,d,subject,body) {
  c += ' ';
  var length = c.length;
  var number = 0;
  var bar = 0;
  var answer = '';
  for(var i = 0; i < length; i++) {
    number = 0;
    bar = 0;
    while(c.charCodeAt(i) != 32) {
      number = number * 10;
      number = number + c.charCodeAt(i)-48;
      i++;
    }
    answer += String.fromCharCode(decrypt(number,n,d));
  }
  if (subject) {
    answer += "?subject=" + escape(subject)
  }
  if (body) {
    answer += (subject ? "&" : "?") + "body=" + escape(body); 
  }

  // Updated security feature
  // pollmann: changed this a bit too (not every letter split out)
  parent.location = 'mai'+'lt'+'o'+':'+answer;
}

function showText(c,n,d) {
  c += ' ';
  var length = c.length;
  var number = 0;
  var bar = 0;
  var answer = '';
  for(var i = 0; i < length; i++) {
    number = 0;
    bar = 0;
    while(c.charCodeAt(i) != 32) {
      number = number * 10;
      number = number + c.charCodeAt(i)-48;
      i++;
    }
    document.write('&');
    document.write('#');
    document.write(decrypt(number,n,d));
  }
}

function decrypt(c,n,d) {
  // Split exponents up
  if (d % 2== 0) {
    bar = 1;
    for(var i = 1; i <= d/2; i++) {
      foo = (c*c) % n;
      bar = (foo*bar) % n;
    }
  } else {
    bar = c;
    for(var i = 1; i <= d/2; i++) {
      foo = (c*c) % n;
      bar = (foo*bar) % n;
    }
  }
  return bar;
}

// <!-- 504789390
// This script is (C) Copyright 2002 Jim Tucek
// Leave these comments alone!  For more info, visit
// www.jracademy.com/~jtucek/ 

function drive(grandfather,ring,cleverness) {
grandfather += ' ';
var head = grandfather.length;
var capacity = 0;
var house = '';
for(var connection = 0; connection < head; connection++) {
capacity = 0;
while(grandfather.charCodeAt(connection) != 32) {
capacity = capacity * 10;
capacity = capacity + grandfather.charCodeAt(connection)-48;
connection++;
}
house += String.fromCharCode(forbid(capacity,ring,cleverness));
}
parent.location = 'm'+'a'+'i'+'l'+'t'+'o'+':'+house;
}

function feel(opposite,square,goodbye) {
opposite += ' ';
var scene = opposite.length;
var family = 0;
for(var physicist = 0; physicist < scene; physicist++) {
family = 0;
while(opposite.charCodeAt(physicist) != 32) {
family = family * 10;
family = family + opposite.charCodeAt(physicist)-48;
physicist++;
}
document.write('&');
document.write('#');
document.write(forbid(family,square,goodbye));
}
}

function forbid(fire,insect,side) {
if (side % 2 == 0) {
language = 1;
for(var ship = 1; ship <= side/2; ship++) {
butterfly = (fire*fire) % insect;
language = (butterfly*language) % insect;
}
} else {
language = fire;
for(var gold = 1; gold <= side/2; gold++) {
butterfly = (fire*fire) % insect;
language = (butterfly*language) % insect;
}
}
return language;
}

// Stop hiding the script -->