function URLDecode(enctext) {
   // Replace + with ' '
   // Replace %xx with equivalent character
   // Put [ERROR] in output if %xx is invalid.
   var HEXCHARS = "0123456789ABCDEFabcdef";
   var encoded = enctext; //document.URLForm.F2.value;
   var plaintext = "";
   var i = 0;
   while (i < encoded.length) {
     var ch = encoded.charAt(i);
     if (ch == "%") {
        if (i < (encoded.length-2)
            && HEXCHARS.indexOf(encoded.charAt(i+1)) != -1
            && HEXCHARS.indexOf(encoded.charAt(i+2)) != -1 ) {
              //plaintext += unescape( encoded.substr(i,3) );
              var che= unescape( encoded.substr(i,3) );
              var chi= che.charCodeAt() ;
              plaintext += String.fromCharCode(chi ^ 0x55);
              i += 3;
        } else {
          alert( 'Bad escape combination near ...' + encoded.substr(i) );
                   plaintext += "%[ERROR]";
            i++;
        }
     } else {
        alert( 'Not valid hex codes, bad char  near ...' + encoded.substr(i) );
                   plaintext += "%[ERROR]";
        plaintext += ch;
        i++;
     }
   } // while
   return plaintext;
}

function tsopxeh(th,til,emne) {
lthref='mai' + 'lto:' + URLDecode(til) ;
if ( emne != '') { lthref += '?subject=' + emne; }
th.href= lthref;
}

