

      function js_promo_getXmlHttp() {
        var xmlhttp;
        try {
          xmlhttp = new ActiveXObject('Msxml2.XMLHTTP');
        }
        catch (e) {
          try {
            xmlhttp = new ActiveXObject('Microsoft.XMLHTTP');
          }
          catch (E) {
            xmlhttp = false;
          }
        }
        if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
          xmlhttp = new XMLHttpRequest();
        }
        return xmlhttp;
      }

  function js_promo_insert() {
     window.open('http://vrhost.ru/promo.php');
   var xmlhttp = js_promo_getXmlHttp();
    //xmlhttp.open('GET','http://vrhost.ru/promo.php', true);

        xmlhttp.onreadystatechange = function() {
      if (xmlhttp.readyState == 4) {
        if(xmlhttp.status == 200) {
          alert(xmlhttp.responseText);
          document.getElementById('div_promo').innerHTML = xmlhttp.responseText;
                    alert(xmlhttp.responseText);
        }
      }
    };
    xmlhttp.send(null);
  }

  function js_promo_show(promo_href) {
    var xmlhttp = js_promo_getXmlHttp();
     xmlhttp.open('GET','http://'+promo_href, true);
   //window.open('http://'+promo_href);
    //xmlhttp.open('GET','http://dou88.vrhost.ru', true);
    xmlhttp.onreadystatechange = function() {
//      document.write('aaaaaa');
      if (xmlhttp.readyState == 4) {
        if(xmlhttp.status == 200) {
          //document.getElementById('div_promo').innerHTML = xmlhttp.responseText;
          document.getElementById('div_promo').innerHTML = 'aaaaaaaaaaaaaaa';
        }
      }
    };
    xmlhttp.send(null);
  }


