﻿var xmlHttp = false;
function createRequest() {
try {
  xmlHttp = new XMLHttpRequest();
} catch (e) {
  try {
    xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
  } catch (e2) {
    try {
          xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
        }
   catch (e3) {
    xmlHttp = null;
   }
  }
 }
if (xmlHttp == null)
alert("Ошибка создания xmlHttp объекта!");
}
function getRequest() {
createRequest();
var n = document.getElementById("storage");
var r = n.selectedIndex;
var e = n.options[r].value;
xmlHttp.open("GET",e,true);
xmlHttp.onreadystatechange = updatePage;
xmlHttp.send(null);
}
function updatePage() {
  if (xmlHttp.readyState == 4) {
    var response = xmlHttp.responseText;
    document.getElementById("divstorage").innerHTML = response;
  }
}
