  var request = null;
  var model_numb = null;

   function createRequest() {
     try {
       request = new XMLHttpRequest();
     } catch (trymicrosoft) {
       try {
         request = new ActiveXObject("Msxml2.XMLHTTP");
       } catch (othermicrosoft) {
         try {
           request = new ActiveXObject("Microsoft.XMLHTTP");
         } catch (failed) {
           request = null;
         }
       }
     }

     if (request == null)
       alert("Error creating request object!");
   }
// тест

 function replaceText(el, text) {
  if (el != null) {
    clearText(el);
    var newNode = document.createTextNode(text);
    el.appendChild(newNode);
  }
}

function clearText(el) {
  if (el != null) {
    if (el.childNodes) {
      for (var i = 0; i < el.childNodes.length; i++) {
        var childNode = el.childNodes[i];
        el.removeChild(childNode);
      }
    }
  }
}

function getText(el) {
  var text = "";
  if (el != null) {
    if (el.childNodes) {
      for (var i = 0; i < el.childNodes.length; i++) {
        var childNode = el.childNodes[i];
        if (childNode.nodeValue != null) {
          text = text + childNode.nodeValue;
        }
      }
    }
  }
  return text;
}

function perezvon(){
    var phoneNumb = document.getElementById("phoneno");
     createRequest();
     var url = ORIG_URL + "/ism.php?phone="+phoneNumb.value;
     request.open("GET", url, true);
     request.onreadystatechange = updatesend;
     request.send(null);
}

  function updatesend() {
    if (request.readyState == 4) {
       if(request.status == 200) {
     var newTotal = request.responseText;
      var boardsSoldEl = document.getElementById("reqsend2");
      boardsSoldEl.innerHTML = "<div id='reqsend1'>"+newTotal+"</div>";
      var boardsSoldEl = document.getElementById("reqsend");
      boardsSoldEl.innerHTML = "";
  }
   }
  }

