/* CORE AJAX  */
function vytvorXMLHttpRequest2(handler) {
  //var xmlHttp=null
  if (window.XMLHttpRequest) {
    xmlHttp = new XMLHttpRequest();
  }
  else if (window.ActiveXObject) {
    try {
      xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (error) {
      xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
  return xmlHttp;
}
/*  //END CORE AJAX */
function linkTo_UnCryptMailto(kryptovany_email) {
  var xmlHttp = vytvorXMLHttpRequest2();

  xmlHttp.onreadystatechange = function () {
    vrat_dekryprovany_email();
  };
  xmlHttp.open('GET','exec/ajax-dekryptuj-email.php?str='+kryptovany_email,true);
  xmlHttp.send(null);
}

function vrat_dekryprovany_email() {
  if(xmlHttp.readyState == 4) {
    if(xmlHttp.status == 200) {
      location.href= 'mailto:' + xmlHttp.responseText;
      //document.write('mailto:' + xmlHttp.responseText);
    } else {
      alert('UNCRIPTED ERROR 0x458');
    }
  }
}
/* END AJAX */

