function HtmlLoader(node, html_file, jscode) { 
  bindMethods(this);
  this.div = node;
  this.url = html_file;
  this.req = null;
  this.jscode = jscode;
}

HtmlLoader.prototype.invoqueHtmlDataRequest= function() {
  this.req = getXMLHttpRequest();
  if (this.req.overrideMimeType) { this.req.overrideMimeType("text/xml"); }
  this.req.open("GET", this.url, true);
  d = sendXMLHttpRequest(this.req).addCallback(this.renderHtml);
}

HtmlLoader.prototype.renderHtml = function(r) { 
  this.div.innerHTML=r.responseText;
  eval(this.jscode);
}

function initHtmlLoader(html_file, id_area, jscode) {
  var area = getElement(id_area);
  html = new HtmlLoader(area, html_file, jscode);
  html.invoqueHtmlDataRequest();
}
