function checkLoginAvailability(sLogin)
{
  var oAjax = new Ajax();

  oRequest =
  {
    "onLoaded": checkLoginAvailabilityResult
  };

  var sUrl = "http://" + location.host + "/";
  oAjax.get(sUrl + "Customer/CheckEmail/" + sLogin, oRequest);
}

function checkLoginAvailabilityResult(oXmlHttp)
{
  var aAnswer = oXmlHttp.responseText.split("|");

  if(aAnswer.length == 2 && aAnswer[0] == "0")
  {
    alert(aAnswer[1]);
  }
}