// -------------------------------------------------------
// Verschlüsselte MailTo-Links wieder entschlüsseln:
// 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

function goForth(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++;
}
answer += String.fromCharCode(decrypt(number,n,d));
}
// Updated security feature
parent.location = 'm'+'a'+'i'+'l'+'t'+'o'+':'+answer;
}

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;
}

// -----------------------------------------
// Für den IE6 - Hover-Effekte auch für IE6:
function TextInputAndTextareaHoverAndFocus() {
 var myForms = document.forms;
 for (var f = 0; f < myForms.length; f++) {
  var myInputs = myForms[f].getElementsByTagName("INPUT");
  for (var i = 0; i < myInputs.length; i++) {
   if(myInputs[i].type == "text") {
    myInputs[i].onmouseover = function() {this.style.backgroundColor="#ffc"};
    myInputs[i].onfocus = function() {
     this.onmouseover();
     this.onmouseout = function() {};
    };
    myInputs[i].onmouseout = function() {this.style.backgroundColor=""};
    myInputs[i].onblur = function() {
     this.onmouseout = function() {this.style.backgroundColor=""};
     this.onmouseout();
    };
   }
  }
  var myTextAreas = myForms[f].getElementsByTagName("TEXTAREA");
  for (var i = 0; i < myTextAreas.length; i++) {
   myTextAreas[i].onmouseover = function() {this.style.backgroundColor="#ffc"};
   myTextAreas[i].onfocus = function() {
    this.onmouseover();
    this.onmouseout = function() {};
   };
   myTextAreas[i].onmouseout = function() {this.style.backgroundColor=""};
   myTextAreas[i].onblur = function() {
    this.onmouseout = function() {this.style.backgroundColor=""};
    this.onmouseout();
   };
  }
 }
}

