//IFRAMEHttpRequest like XMLHTTPRequest
function IFRAMEHttpRequest () {

  this.open = function (method,url,sync)
    {
      this.requestURL = url;
    };

  this.send = function (query)
    {
      this.ifm = document.createElement("IFRAME");
      this.ifm.id = "IFRAME_LOADER_" + IFRAMEHttpRequest.count++;
      this.div = document.createElement("DIV")
      with (this.div.style)
      {
        visibility = "hidden";
        position="absolute";
        left = "-10";
        top = "-10";
        width = "5";
        height = "5";
      }
      this.div.appendChild(this.ifm);
      document.body.appendChild(this.div);
      this.ifm.src = this.requestURL;

      var xmlobj = this;
      var func = function (event)
      {
        var doc;
        if (document.frames) doc = document.frames[xmlobj.ifm.id];
        if (!doc) doc = xmlobj.ifm.contentWindow;
        xmlobj.responseText = doc.document.body.innerHTML.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&amp;/g,'&');
        xmlobj.readyState = 4;
        xmlobj.onreadystatechange(event);
      };
      if (this.ifm.addEventListener) this.ifm.addEventListener('load', func, false);
      else if (this.ifm.attachEvent) this.ifm.attachEvent('onload',func);
    };

  this.onreadystatechange = function(){};

  return this;

}
IFRAMEHttpRequest.count = 1;
